內部網格視圖圖像按鈕不是使用ASP.NET Web表單觸發的。如果我將使用ASP Button,然後工作Button並輕鬆添加。內部網格視圖圖像按鈕不是使用ASP.NET Web表單觸發
下面是我設計的網格視圖代碼Button。
<FooterTemplate>
<asp:ImageButton ID="imgbtnAdd" runat="server" CommandName="AddNew" ImageUrl="~/Imgs/grid_add.png" ToolTip="click here to add" CausesValidation="true" ValidationGroup="Team_involved_directly" />
<%-- <asp:Button ID="Button1" runat="server" Text="Add" CommandName="AddNew" CausesValidation="true" ValidationGroup="Team_involved_directly" ToolTip="click here to add" />--%>
</FooterTemplate>
如果我將使用上面的註釋按鈕,然後工作正常,但圖像按鈕只給問題。我還在頁面加載中使用了!Page.IsPostBack
。
你添加到gridview事件「OnRowCommand」?添加了像是OnRowCommand =「Gridview1_RowCommand」的 –
。 @mww – MMK
其他命令觸發這個事件只是這個按鈕不是? –