c# - MVC RedirectToAction is not working properly -


in 1 of controllers, have return looks this:

return redirecttoaction("administerfiles/viewdatafiles?catid=14"); 

but when renders result browser string becomes one:

administerfiles/administerfiles/viewdatafiles%3fcatid%3d14 

how can solve ? .

you need action parameter (along route data):

return redirecttoaction("viewdatafiles", new { catid = 14 }); 

if want specify controller (it defaults current controller), can this:

return redirecttoaction("viewdatafiles", "administerfiles", new { catid = 14 }); 

Comments

Popular posts from this blog

How do you change vbulletin's home page to the forums instead of the default (CMS or Activity Stream)? -

java - stack overflow exception on xml transformation -