change the url in popupform

Nov 18, 2011 at 9:35 PM
Edited Nov 18, 2011 at 9:36 PM

hi,

I'm trying to implement a popupform:

I can see in firebug that the url that is being called is 'http://localhost:30326/sonar/sendmessage?sonarId=f1d44fd2-711e-4e46-9747-be5d1f26ca95&email=arnab%40sree.in'.

This is throwing an error as

There is a custom route in global.asax

routes.MapRoute(              "SonarSendMessage",                                           // Route name   

          "sonar/sendmessage/{sonarId}/{email}",                            // URL with parameters     

        new { controller = "sonar", action = "sendmessage" }   

          ); 

So 'http://localhost:30326/sonar/sendmessage/f1d44fd2-711e-4e46-9747-be5d1f26ca95/arnab%40sree.in' works fine.

Is there a way to solve this as I can not change the global.asax

 

Thanks

Arnab

Coordinator
Nov 18, 2011 at 9:49 PM
Edited Nov 18, 2011 at 9:49 PM

I think you have to put just id instead of sonaryId in order to make it generate the second link that works

I think MapRoutes aren't used for generating links just for handling them