locked
Routing not working RRS feed

  • Question

  • User-902880243 posted

    I have a webusercontrol which I'm using as a template instead of the normal edit.aspx template.

    Normal routing will work like this: 

    routes.Add(
    New DynamicDataRoute("{table}/{action}.aspx") With { _

    .Constraints = New RouteValueDictionary(New With {.Action = PageAction.Edit}), _

    .ViewName = "edit", _

    .Model = model})

     

     

     

    however when I attempt to do this (specify a different template) the routing doesn't work:

     routes.Add(New DynamicDataRoute("{table}/EditSubGridViews.aspx") With { _

    .Constraints = New RouteValueDictionary(New With {.Action = PageAction.Edit}), _

    .ViewName = "edit", _

    .Model = model}

     

    the url is built correctly but the web page complains it cannot find resource

    any ideas would be very much appreciated.

     

     

    Saturday, December 27, 2008 1:44 PM

All replies

  • User-902880243 posted

    this did the trick: 

    routes.Add(New DynamicDataRoute("{table}/EditSubGridViews.aspx") With {.Action = PageAction.Edit, .ViewName = "EditSubGridViews", .Model = model})

     

    Saturday, December 27, 2008 2:20 PM
  • User-1005219520 posted

    Thanks for posting the solution.

    Monday, December 29, 2008 1:51 PM