GridView做一个超链接跳转并且绑定参数

1.  <%# DataBinder.Eval(Container.DataItem, "orderno")%>的绑定形式 <%#  Eval("orderno")%>...


<asp:TemplateField HeaderText="订单号">
                             <ItemTemplate>//展示列                                                                               
                                      <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# "Orderdetaile.aspx?OrderNO="+ DataBinder.Eval(Container.DataItem, "orderno")%>'> <%# DataBinder.Eval(Container.DataItem, "orderno")%></asp:HyperLink>
                            
                             </ItemTemplate>

                             <EditItemTemplate>//编辑列
                                     <asp:TextBox ID="TextBox1" runat="server" Text='<%# Eval("orderno") %>'></asp:TextBox>
                             </EditItemTemplate>
  </asp:TemplateField>

posted on 2016-01-05 19:19  只为_更加优秀!  阅读(475)  评论(0编辑  收藏  举报

导航