I have one question about redirecting in ASP.NET. I know how to redirect with Redirect function on other ASP.NET page and read parameters from URL from Request, but I don’t want GET, I need POST, I am sending IDs over URL, so user doesn’t need to see that. How to redirect with POST method and read parameters in ASP.NET ?
Share
A redirect, by definition, is a GET, you can’t do a 301 or 302 redirect with a POST. If you are trying to prevent the user from seeing a value, then you can store that value in the session, then retrieve it after the redirect. Though I have found in the past that trying to protect something by not allowing the users to see it is not the best approach (security through obscurity). You should put other measures into place to protect users from doing something they shouldn’t, even if they know the value.
Even if I’m wrong and it is possible that you can redirect with POST, then the value would need to be part of the redirect, and therefore the user does have a chance to learn about it if they are using something to monitor HTTP traffic.