CSDN博客

img huanghui22

DataGrid超级链接列中绑定一个以上字段

发表于2004/10/11 15:27:00  1576人阅读

分类:

<TemplateColumn>
    <ItemTemplate>
       <asp:HyperLink Runat="server" NavigateUrl='<%# "Details.aspx?EmployeeID=" & Container.DataItem("ID")&"&EmployeeName=" & Container.DataItem("FirstName")%>'/>
    </ItemTemplate>
</TemplateColumn>

<TemplateColumn>
    <ItemTemplate>
      <asp:HyperLink Runat="server" NavigateUrl='<%# _
         BuildUrlWithQueryString("Details.aspx", "EmployeeID", Container.DataItem("ID"),"EmployeeName", Container.DataItem("FirstName")) %>' />
   </ItemTemplate>
</TemplateColumn>


<asp:TemplateColumn HeaderText="购买">
<ItemTemplate>
<asp:HyperLink id=HyperLink1 runat="server"
 Text='<%# DataBinder.Eval(Container, "DataItem.dinggou")%>'
 NavigateUrl='<%# "../gouwu/gouwu_ls.aspx?commoditytype=" &
  DataBinder.Eval(Container, "DataItem.commoditytype")
  & "&commodityname=" & DataBinder.Eval(Container, "DataItem.commodityname")%>' />
</ItemTemplate>
</asp:TemplateColumn>


阅读全文
0 0

相关文章推荐

img
取 消
img