I am redirecting to a page in my asp.net application using which passes a parameter in the url.
HttpApplication app = (HttpApplication) sender;
HttpResponse response = app.Context.Response;
app.Response.Redirect("~/auth/SignOn.aspx?capath=" + capath);
Is there a way to send execution or direct to that page and pass the paremeter without showing it in the url? Thanks.
When you use Response. Redirect("Default. aspx",true ) which is by default true then the execution of current page is terminated and code written after the Response. Redirect is not executed instead of executing code written after the Response.
url parameters are very insecure. it is a simple string that goes visible to everyone. you should either encrypt it or use sessions. if it is an id you are passing in the url, you can use uniqueidentifier as an id.
I think the best and easiest way is to send it via Sessions.
You can't hide values sent in query string, but you can encrypt the values, if you want them not to be readable. OR Instead of simple redirection you will have look for other option to navigate to next page
How to: Pass Values Between ASP.NET Web Pages
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With