Click here to Skip to main content
15,908,112 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi all

PHP
$.ajax({
                     url: 'GetTagComment.aspx?Tag=' + tagName,
                     success: function (data) {
                         $('.TagComment').html(data);
                     }
                 });


for Example (If tagName== C#)then In PageLoad Of GetTagComment.aspx:
string TagName = Request.QueryString["Tag"];

i See TagName is C,Beacuse # Should Encode and I downt Know How to Encode It?!
Please Help me
thanks so much
Posted
Updated 15-Nov-12 23:57pm
v3

1 solution

Hi,

Encoding:
C#
string result = HttpUtility.UrlEncode(tagName);
Response.Redirect("*.aspx?Tag=" + result);


Decoding:
C#
string result = HttpUtility.UrlDecode(Request.QueryString["Tag"].ToString());
 
Share this answer
 

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