如何更改“ asp:LinkBut​​ton文本值<span>”

时间:2019-06-10 12:06:52

标签: c# asp.net

我是asp.net的初学者,我正在为asp:Button使用以下代码,效果很好。

<asp:Button ID="btnLoadLoction" OnClientClick="this.value = 'Loading....';this.style.backgroundColor = '#DC143C';" runat="server" OnClick="btnLoadLoction_Click" Text="Load" />

asp:linkbutton出现问题,我正在尝试将按钮文本更改为如下所示:

<asp:LinkButton ID="btnLoadLoction" OnClientClick="this.value = 'Loading....'; this.style.backgroundColor = '#DC143C';" runat="server" CssClass="btn btn-info" OnClick="btnLoadLoction_Click"><span aria-hidden="true" class="glyphicon glyphicon-repeat"></span> Load</asp:LinkButton>