How can I prevent ASP.NET from converting to the & character and adding a URL to control attributes?

This is what I add and it displays &as&

sharelink.Attributes.Add ("addthis: url", "http: //" and Request.Url.Host and "/Resources/PublicView.aspx?RID=" and R.ResourceID and "& Key =" and key)

I need to do this

?RID=64&Key=%2fwEUKwEDAgQCFAJA

instead of this

?RID=64&Key=%2fwEUKwEDAgQCFAJA
+3
source share
2 answers

The conversion is &true, and browsers should be able to handle it.

Source

To prove this, look at the source of this hyperlink .

. , . <a href="a.com?b=c&d=e"> . , ASP.Net , <asp:Label runat="server" Text="><><" />, , .

+2

- .

SLaks, XHTML.

& &amp;, W3C.

http://74er.net/labs/amp-or-not.html w3c , .

, 14:

href="http://www.google.com/search?q=stackoverflow&ie=UTF-8"

19 &amp; :

href="http://www.google.com/search?q=stackoverflow&amp;ie=UTF-8"
0

Source: https://habr.com/ru/post/1729498/


All Articles