简体   繁体   中英

How to hide URL in Browser asp.net

I know this is repeated question on Stack. But in my case the URL which I am using is passing the querystring details.

http://servername:82/root/ReportViewer.aspx?Id=/test/base/eg1 &Name=ReportDeatilName & User=783534

How can I hide the whole query string?

If you can, instead of making a call with GET, you could generate the call using a POST.
So your url will look cleaner (eg: servername:82/root/ReportViewer.aspx), because all the infos are sent in the <form> .

You can use Server.Transfer from your code behind.

This'd look that you're responsing from the same page. Similar to Response.Redirect but simply changes the "focus" on the Web server and transfers the request.

Server.Transfer("http://servername:82/root/ReportViewer.aspx?Id=/test/base/eg1 &Name=ReportDeatilName&User=783534");

从您的代码后面使用Server.Transfer

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM