想在asp中显示链接

时间:2012-06-28 12:56:48

标签: asp.net html

是否有任何可能的方法来编辑此代码

<asp:LoginName ID="LoginName1" runat="server" style="top: 165px; left: 888px; position: absolute;" Font-Names="verdana" ForeColor="black" Font-Size="13px" />

所以我没有显示用户名,而是显示链接到页面的img

1 个答案:

答案 0 :(得分:1)

正如@PraVN所说,FormatString应该是很好的:

<asp:LoginName ID="LoginName1" runat="server" FormatString="&lt;a href=&quot;http://www.myurl.com&quot;&gt;&lt;img src='myimage.jpg' /&gt;&lt;/a&gt;" />