Click here to Skip to main content
15,890,557 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I have a hyperlink, And I need to do a validation against the querystring in my hyperlink. Is there any way to do validation in the querystring against XSS attack?


XML
<a href='MySecondPage.aspx?ProdcutID=<%# Convert.ToString(DataBinder.Eval(Container.DataItem, "ProductID")) %>'>
<b><%# HttpUtility.HtmlEncode(Convert.ToString(DataBinder.Eval(Container.DataItem, "ProdcutTitle"))) %></b></a>



I have done HtmlEncode for the Hyperlink text. But I want to know about the XSS validation on href URL and its querystring.

Help much appreciated.

Thanks
Mydeen.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900