楼上说的对!
asp:LinkButton ID="LinkButton1" runat="server" CommandName="Delete" OnClientClick="return confirm('真的删除吗');" Text="删除" OnCommand="ApplyedGrid_RowCommand" ></asp:LinkButton> 加上OnCommand看看,没有环境没有测试,说错莫怪。
asp:LinkButton ID="LinkButton1" runat="server" CommandName="Delete" OnClientClick="return confirm('真的删除吗');" Text="删除" OnCommand="ApplyedGrid_RowCommand" ></asp:LinkButton> 加上OnCommand看看,没有环境没有测试,说错莫怪。
代码没有贴全,再贴过
<asp:GridView ID="ApplyedGrid" DataKeyNames="id" runat="server" AutoGenerateColumns="False" BackColor="White"
BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" CellPadding="4" ForeColor="Black"
GridLines="Vertical" OnRowDataBound="ApplyedGrid_RowDataBound" OnRowDeleting="ApplyedGrid_RowDeleting">
jsyxo(爱情海的猪) 我事件触发写了的。cantops(翡翠梦境里的熊猫人) 说得方法我也试过,不行会报错。to dwxing() 那个方法没有问题,我现在改成commandfield列是能正常执行的,就是改成模版列后不能执行!!
缺少 commandargument
你需要 <asp:LinkButton commandargument='<%#eval("id")' />
第二个方法 没有错.