首页 > 代码库 > 模板列onclick事件中绑定跳转页参数(onclick location.href Eval)

模板列onclick事件中绑定跳转页参数(onclick location.href Eval)

 <asp:GridView runat="server" ID="gvCheckList" AutoGenerateColumns="false">            <Columns>                <asp:BoundField HeaderText="订单号" DataField="planid" />                 <asp:BoundField HeaderText="订单状态" DataField="status" />                               <asp:BoundField HeaderText="总价(元)" DataField="totalCost" />                <asp:TemplateField HeaderText="订单操作">                    <ItemTemplate>                        <input type="button" value="编辑" onclick=‘<%#"location.href=http://www.mamicode.com/"CheckUpdate.aspx?planid="+Eval("planid")+"\";"%>‘ />                        <input type="button" value="删除" />                    </ItemTemplate>                </asp:TemplateField>                           </Columns>        </asp:GridView>

 

模板列onclick事件中绑定跳转页参数(onclick location.href Eval)