Click here to Skip to main content
15,886,816 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi.
how can i show my url in addressbar un unicode format.
when i write unicode text in my response.redirect("http://mysite/?current=سلام");
it is ok in Chrome and firefox. but i see soem %%?? in IE.
i know there is a solution coz this site :

http://www.varzesh3.com/news.do?itemid=45189&title=ليگ_برتر_فوتبال_انگليس_ركورد_شكست_

And This :
http://www.tabnak.ir/fa/news/167612/17-هرم-جدید-در-مصر-کشف-شد

Is there any idea?
Thank u.
Posted
Updated 29-May-11 0:26am
v2

I dont know why, but i found out it u use response.redirect("with unicode text"); u cant see the unicode text in IE.
But if u use Hyperlink or (a Tag) u can see the unicode in URL currectly.
For example :
XML
<asp:HyperLink ID="HyperLink1" runat="server"
    NavigateUrl="~/TrimDemo.aspx?current=سلام">سلام</asp:HyperLink>

    <a href="TrimDemo.aspx?current=سلام">خداحافظ</a>

<asp:LinkButton ID="LinkButton1" runat="server" onclick="LinkButton1_Click">LinkButton</asp:LinkButton>

And in codeBehind :

C#
protected void LinkButton1_Click(object sender, EventArgs e)
{
    Response.Redirect("~/TrimDemo.aspx?current=سلام");
}


Hyperlink and (a Tag) show Currect name if u support that unicode language,
But Redirect from linkbutton show something with %&&%d in IE anyway


Thanks any way.
 
Share this answer
 
v2
Comments
Kim Togo 31-May-11 2:07am    
Good you solved it :-) - I find an old link about Similar problem.
http://stackoverflow.com/questions/1888933/c-httpwebresponse-header-encoding
You cannot. It is up to the internet browser to show the URL. If I copy & past one of the 2 urls into Internet Explorer 9 it show correct. But redirect it show wrong.
 
Share this answer
 
Comments
thatraja 29-May-11 10:33am    
[Comment from OP]
so u think how they redirect their links to these pages?
u can go to those sites and click on links on the left of page and u'll see that pages redirect to another page with unicode url.
do know how they can do that?

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