主题:  asp.net超连接的问题

yukous

职务:普通成员
等级:1
金币:0.0
发贴:76
注册:2003/5/16 11:53:27
#12004/10/13 17:21:56
<aspataGrid ID="DataGrid1" runat="server" AutoGenerateColumns="false"
BackColor="#FFFFFF" BorderColor="tan" BorderWidth="1px" BorderStyle="Solid" CellPadding="2"
CellSpacing="0" Font-Name="Verdana" Font-Size="9pt" DataKeyField="id">
<columns>
<asp:BoundColumn HeaderText="客户编号" DataField="id">
<headerstyle Width="60px">
</headerstyle>
</asp:BoundColumn>
<asp:BoundColumn HeaderText="客户名称" DataField="com_name">
<headerstyle Width="260px">
</headerstyle>
</asp:BoundColumn>
<asp:BoundColumn HeaderText="联系人" DataField="com_con">
<headerstyle Width="60px">
</headerstyle>
</asp:BoundColumn>
<asp:BoundColumn HeaderText="行业类别" DataField="com_type">
<headerstyle Width="80px">
</headerstyle>
</asp:BoundColumn>
</columns>
<headerstyle BackColor="DarkRed" ForeColor="white" Font-Bold="true">
</headerstyle>
<itemstyle ForeColor="DarkSlateBlue">
</itemstyle>
<alternatingitemstyle BackColor="Beige"/>
</aspataGrid>

请问我想把客户名称做超连接到他们自己的网站,类似与asp里的****.asp?url=<%=rs("url"%>,在ASP。NET里用HyperLink控件是怎么实现的呢? 谢了!!!



蓝鲸

职务:版主
等级:5
金币:42.1
发贴:2614
注册:2001/12/20 15:57:57
#22004/10/13 19:45:29
一种是直接在SQL里替换语句,
不过最好还是用DataSet或DataView,把该字段先替换掉URL字串后,绑定。


非常大鱼