隐藏response.redirect()中的值 [英] hide values in response.redirect()

查看:84
本文介绍了隐藏response.redirect()中的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用response.redirect()隐藏值

response.redirect("xxx.aspx"?id = 100);

解决方案

您正在使用querystring将值发送到另一个页面,并且查询字符串在URL中可见.如果您不希望如何取值,那么

1.使用其他状态管理方式. 请参阅此内容以了解该怎么做. [ ^ ]
2.在发送页面上加密值,在接收页面上解密.


如果您需要在不使用查询字符串的情况下将ID发送到下一页,请尝试将其添加到Session中.

会话[" ] =   idValue";

response.redirect(" ); 



在您的下一页

 如果(会话["  ID"]!=  var  id =(字符串)会话["  ID"]; 


HI
使用REWRITE URL通过使用response.redirect()隐藏值 尝试


how to hide values by using response.redirect()

response.redirect("xxx.aspx"?id=100);

in url id=100 is visible., how to hide this?

解决方案

You are sending values to another page using querystring and query strings are visible in URL. if you want to not how the value then

1. use some other way of state management. refer this to know how that can be done.[^]
2. encrypt the value on the sending page and decrypt on recieving page. it will still be visible but less understadable.


If you need to send ID to next page without using query string, then try to add it to the Session

Session["ID"] = "idValue";

response.redirect("second.aspx");



in your next page

if (Session["ID"] != null)
   var id = (string)Session["ID"];


HI
TO USE THE REWRITE URL to hide values by using response.redirect()
TRY THIS


这篇关于隐藏response.redirect()中的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆