0
votes

It seems like when I input hebrew text inside asp:HyperLink on NavigateUrl property, it gets coded into its UTF8 coding, instead of just presenting me the hebrew word (like on regular non runat server link on same page).

So for

<asp:HyperLink ID="hypID" runat="server" NavigateUrl="שלום" />

I get

<a id="cphMiddle_repRightCol_hypCat_0" href="%d7%a9%d7%9c%d7%95%d7%9d">text</a>

Output on page, instead of

<a id="cphMiddle_repRightCol_hypCat_0" href="שלום">
text</a>

Can this be avoided?

Thanks everyone

2

2 Answers

0
votes

As a workaround, you could try using the HTML control equivalent, which is less constricting:

<a runat="server" href="שלום" ..

EDIT: Also, have you setup the correct encoding for the site as a whole? Via: http://msdn.microsoft.com/en-us/library/39d1w2xf.aspx

0
votes

You are correct, NavigateUrl will encode the url in UTF8.
What you CAN do, is omit the NavigateUrl altogether and use the href tag instead:

<asp:HyperLink ID="hypID" runat="server" href="שלום" Text="Link" />

Which will render it like this:

<a id="hypID" href="שלום">Link</a>

Hope it helps... ובהצלחה