在ASP.NET中加密和解密锚标记查询字符串 [英] Encrypting and decrypting anchor tag query string in ASP.NET

查看:80
本文介绍了在ASP.NET中加密和解密锚标记查询字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

I have read a lot of articles on how to encrypt and decrypt query string but can't seems to find any on how to use it in html tag. This is what i'm trying to achieve The product id is an interger but i don't want to send it to the SingleProduct.aspx page like that. I want to encrypt it and then decrypt it on the page to make it of it for other operation





我尝试了什么:





What I have tried:

<a href="Singleproduct.aspx?Product=<%#Eval("Product_Id")) %>">

推荐答案

首先,您还没有向我们展示您已经尝试过的内容以及问题是什么你已经尝试了什么。



建议-1:如果你想加密查询字符串

< a href =https://www.codeproject.com/Articles/33350/Encrypting-Query-Strings>加密查询字符串 [ ^ ]

使用C#和VB.Net在ASP.Net中加密和解密QueryString参数值 [< a href =https://www.asp snippets.com/Articles/Encrypt-and-Decrypt-QueryString-Parameter-Values-in-ASPNet-using-C-and-VBNet.aspx\"target =_ blanktitle =New Window> ^ ]

Asp.Net在C#,VB.NET中加密和解密QueryString参数值 - ASP.NET,C#.NET,VB.NET,JQuery,JavaScript,Gridview [ ^ ]



建议-2:如果您不想在URL中显示查询字符串

在Webforms之间传递数据的方法! - Haissam [MCAD] [ ^ ]

如何:在ASP.NET Web窗体页面之间传递值 [ ^ ]



按照您的要求进行示例,如果您遇到任何实施问题,请告诉我们,我们'我会尽力帮助你。



希望,它会有所帮助:)
First of all, you haven't shown us what you already have tried and what is the issue with what have you tried already.

Suggestion -1: If you want to encrypt the querystring
Encrypting Query Strings[^]
Encrypt and Decrypt QueryString Parameter Values in ASP.Net using C# and VB.Net[^]
Asp.Net Encrypt and Decrypt QueryString Parameter Values in C#, VB.NET - ASP.NET,C#.NET,VB.NET,JQuery,JavaScript,Gridview[^]

Suggestion -2: If you don't want to reveal the querystring at all in the URL
Ways to Pass Data Between Webforms! - Haissam [MCAD][^]
How to: Pass Values Between ASP.NET Web Forms Pages[^]

Follow an example as per your requirement and let us know if you face any issue implementing it, we'll try to help you out.

Hope, it helps :)


这篇关于在ASP.NET中加密和解密锚标记查询字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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