0

I am passing '© Alt+ 0169' in my serach fields in query string.

When i am getting QueryString in page like Request.QueryString("SearchVal") then value will be : '© Alt 0169' .

It reomove '+'.

Could u tell me how can i get it..

Thanks Pankaj Pareek

1 Answer 1

3

Use System.Web.HttpUtility.UrlEncode() method.

string encode = HttpUtility.UrlEncode("© Alt+ 0169"); Response.Redirect("Page1.aspx?searchVal=" + encode); 
Sign up to request clarification or add additional context in comments.

2 Comments

I am using javascript like this:-window.location.href='Test.aspx?SearchVal=' + strSearch and this strSearch = © Alt+ 0169 If i am using Server.UrlEncode then string changed.
Please check out this link - stackoverflow.com/questions/332872/…

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.