Don't use <
if you want it to appear as normal text. Use an html entity instead:
<asp:LinkButton runat ="server" ID="lnkTest"><lll</asp:LinkButton>
Use <
, <
, or <
, any one should work.
Question
I create a new web project in Visual studio and put one asp:LinkButton Control in Default.aspx.
<asp:LinkButton runat ="server" ID="lnkTest"><lll</asp:LinkButton>
When I start the project and Visual Studio redirects me to the browser nothing is render. If I go to View Page source everything looks fine
<a id="MainContent_lnkTest" href="javascript:__doPostBack('ctl00$MainContent$lnkTest','')"><lll</a>
If i go to Inspect Element, the tool show me this:
<a id="MainContent_lnkTest" href="javascript:__doPostBack('ctl00$MainContent$lnkTest','')"><lll< a>
</lll<></a>
Why this happen and can I fix it.
P.S. If the text not start with '<' rendering is normal and the control is visible.
Solution
Don't use <
if you want it to appear as normal text. Use an html entity instead:
<asp:LinkButton runat ="server" ID="lnkTest"><lll</asp:LinkButton>
Use <
, <
, or <
, any one should work.