forum

Home / DeveloperSection / Forums / How to maproute and querystings in mvc?

How to maproute and querystings in mvc?

Manoj Bhatt174530-Oct-2014
I have two routes:
routes.MapRoute(
            "FetchVenue",                                    
            "venue/fetchlike/{q}",                                    
            new { controller = "venue", action = "fetchlike" }     
       );
 
       routes.MapRoute(
            "venue",                                        
            "venue/{venueId}",                                 
            new { controller = "Venue", action = "Index" }  
        );

The url /venue/fetchlike/test is passed to the correct controller The url /venue/fetchlike/?q=test is however passed to the index action.

I want to be able to pass data as a querystring.


Updated on 30-Oct-2014

Can you answer this question?


Answer

1 Answers

Liked By