将值传递到下一页 [英] Passing values to next page

查看:95
本文介绍了将值传递到下一页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Am using a hyperlinkField and its passing values but problem is the values show in my URL how can i hide them?


<asp:HyperLinkField HeaderText="Create Appointment" Text="Create Appointment"DataNavigateUrlFormatString="FinalizeAppointment.aspx?Fullname={0}&EmployeeID={1}" DataNavigateUrlFields="Fullname,EmployeeID"/>

推荐答案

对其进行加密,并在querystring和Decryp中传递Encrypted值在下一页中将其显示.

对于加密和解密,使用了很多算法,您可以使用其中任何一种算法

看看加密和解密查询字符串+ [ ^ ]和 .NET Encryption Simplified [ .NET简化加密 [^ ]
Encrypt them, pass the Encrypted values in the querystring and Decrypt them in the next page.

For Encryption and Decryption there are a lot of algorithm are used, you can use any of them

Have a look on encrypt and decrypt query string+[^] and .NET Encryption Simplified[^].NET Encryption Simplified[^]


尝试重写URL.它将解决您的问题.要了解有关URL重写的信息,请查看这些链接.
http://www.15seconds.com/issue/030522.htm [ http://www.simple -talk.com/dotnet/asp.net/a-complete-url-rewriting-solution-for-asp.net-2.0/ [ http://weblogs.asp.net/fmarguerie/archive/2004/11/18/265719.aspx [ ^ ]
Try to rewrite the URL. It will solve your problem.To know on URL rewriting have a look into these links.
http://www.15seconds.com/issue/030522.htm[^]
http://www.simple-talk.com/dotnet/asp.net/a-complete-url-rewriting-solution-for-asp.net-2.0/[^]
http://weblogs.asp.net/fmarguerie/archive/2004/11/18/265719.aspx[^]


另一个选项是跨页回发,其中viewstate包含您上一页的信息.这有点骇人听闻,但确实有效.您还可以使用会话存储数据-这是最安全的数据,因此根本就不在客户端上.
Another option is cross page postback, where the viewstate contains your information from the previous page. It''s a bit of a hack, but it works. You can also use the session to store your data - that''s the most secure of all, then it simply is never on the client side at all.


这篇关于将值传递到下一页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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