当前位置: 代码迷 >> ASP.NET >> 向数据库中插入数据时如何才能插入超链接,然后在绑定到DataList中
  详细解决方案

向数据库中插入数据时如何才能插入超链接,然后在绑定到DataList中

热度:9147   发布时间:2013-02-26 00:00:00.0
向数据库中插入数据时怎么才能插入超链接,然后在绑定到DataList中
??????????

------解决方案--------------------------------------------------------
<asp:DataList RepeatColumns= "4 " runat= "server " ID= "dlShow " Width= "100% " RepeatDirection= "horizontal " >
<ItemTemplate>
<table style= "border:0;width:100% " cellpadding= "0 " cellspacing= "0 ">
<tr> <td>
<a href= ' <%# DataBinder.Eval(Container.DataItem, "URL " %> '>
<%# DataBinder.Eval(Container.DataItem, "URLName " %>
</a>
</td> </tr>
</table>
</ItemTemplate>
</asp:DataList>