开发者

ASP.NET GridView Image Command Button Problem (Multiple PostBacks)

开发者 https://www.devze.com 2023-03-31 18:45 出处:网络
ASP.NET GridView Image Command Button causes Multiple PostBacks.Is this is a known issue ?or is there any solution(not 开发者_如何学编程workaround).Try using this way

ASP.NET GridView Image Command Button causes Multiple PostBacks.Is this is a known issue ? or is there any solution(not 开发者_如何学编程workaround).


Try using this way

<asp:TemplateField>
 <ItemTemplate>
    <asp:ImageButton ID="Button" runat="server" ImageUrl="../images/Editicon.png" OnClick="Button_Click" /> 
 </ItemTemplate>
</asp:TemplateField>

protected void Button_Click(object sender, EventArgs e)

{}

I m sure you wont face ne problem with this

0

精彩评论

暂无评论...
验证码 换一张
取 消