0

I want to pass a value (specifically subdomain value) from action link to a custom subdomain route constraint (implementing IRouteConstraint) in such a way that the value is invisible in url. By passing the value via route value collection I couldnt be able to hide that value from url. It is always visible in url.

So how can I achieve this? Is there another way of passing data so that value is invisible?

rovsen
  • 4,932
  • 5
  • 38
  • 60

1 Answers1

1

You could create the link to your action method with the value you need. Then in the action method grab the "hidden" value and do a redirect passing the value in a cookie/session/tempdata.

This way you can grab the info you need, and the value would not be visible in the URL you redirect to.

Andy T
  • 10,223
  • 5
  • 53
  • 95