Thursday 15 May 2014

asp.net mvc - Passing value from action link to route constraint -


I have a custom subdomain route barrier (implementing the IROTE Consultant) from the action link (in particular the subdomain value) I want to give a way that the value in the URL is invisible, by passing the value through the path value collection, I could not hide the value from the URL. It always appears in the url.

How can I get it? Is there another way to pass data so that the value is invisible?

You can create a link to your action method with the value you need. Then grab the "hidden" value in the verb method and continue redirecting the value to the cookie / session / tempdata.

In this way, the information you can require, and its value will not show up in the URL you redirect.

No comments:

Post a Comment