0

I have the following Route:

routes.MapPageRoute("RouteTest",
            "Path1/Path2/Path3/{PARAM1}-{PARAM2}/{OPTPARAM}",
            "~/MyPath/Default.aspx",
            True,
            New RouteValueDictionary(New With {.OPTPARAM = Nothing}),
            Nothing,
            Nothing)

I know the value of the two non-optional parameters: PARAM1 (let's say 20) and PARAM2 (let's say 30).

How to use Route.GetVirtualPath to build the path in my ASPX.VB page? The result should be Path1/Path2/Path3/20-30/. Ideally I don't want to work directly with the string, replacing the values (specially because there are optional values like OPTPARAM.

igorjrr
  • 790
  • 1
  • 11
  • 22

0 Answers0