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

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -