Routing

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
4/26/2016 3:38:37 PM
Gravatar
Total Posts 190

Routing

Hi Joe,

(Hope all is going well with you!) Call me thick headed by I haven't gotten around to figuring out how to implement my routes that I'm still using that RouteHelpers class to translate. Considering a routeconfig in the old style config file:

  <Route name="Schedules" routeUrl="Route/{route}/{service}/{pick}" virtualPath="~/Schedules/WebSchedules.aspx">
    <Restrictions>
      <add parameterName="route" restriction="\w{1,3}"></add>
      <add parameterName="service" restriction="\d{1,2}"></add>
      <add parameterName="pick" restriction="\d{1,3}"></add>
    </Restrictions>
    <Defaults>
      <add parameterName="service" defaultValue="0"/>
      <add parameterName="pick" defaultValue="0"/>
    </Defaults>
  </Route>
 

What would be the correct way to setup this route using the methods in the newer IRegisterRoutes class implementation?

Thanks again,

John

5/5/2016 7:21:15 AM
Gravatar
Total Posts 190

Re: Routing

anybody?

5/5/2016 7:33:41 AM
Gravatar
Total Posts 18439

Re: Routing

sorry John, but that was 2 years ago when you last asked me about it and I just don't remember much about it at this point and don't have time to research it.

my only recollection about it is that I implemented a project just for you, to map the old way to the newer way so you could keep using the old way. you may be the only person using routing with mojoPortal as far as I know

I think in theory you could compile that code and plug it in so you could keep using the old route config files, but I don't even remember exactly how to plug that in off the top of my head

5/6/2016 10:35:47 AM
Gravatar
Total Posts 190

Re: Routing

Hi Joe,

Yes, that is some old business there. Actually, I am still using that route helper project you added for me back then. What I'm trying to do now is get rid of that project, but I'm just not exactly sure how to configure the routing I have configured in the old XML file into a newer Register method in a IRegisterRoutes class. What I was hoping for was an example of how to take the route parameters from the XML fragment I included from the routing config file I'm using now and convert that to a proper MapHttpRoute method. I think I have most of it but I'm still missing something in the concept. Just not sure what.

Thanks,

John

You must sign in to post in the forums. This thread is closed to new posts.