You can use Label instead of html-span (which also appears as span), or you can add runat="server" .
<span id="expTrainingShow" runat="server" class="clsLink" style="margin-left: 20px;" onclick="GridChanger();" ></span>
somewhere in codebehind (span - HtmlGenericControl on the server):
expTrainingShow.InnerHtml = yourText ' set the text '
or
expTrainingShow.Visible = False ' hide it '
Please note that Visible=False on the server means that the control is not displayed at all on clientide, therefore it does not exist in html and can only be accessed on servers.
If you just want to hide it, but make it anyway, you should use CSS or expTrainingShow.Style.Add("display","none") .
source share