Click here to Skip to main content
15,904,348 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am also do this
XML
<asp:ScriptManager ID="ScriptManager" runat="server"></asp:ScriptManager>
   <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                    <ContentTemplate>

<asp:button ID="btn2" runat="server" Text="Delete Selected"
onclick="btn2_Click" />
XML
</ContentTemplate>
 <Triggers>
     <asp:PostBackTrigger ControlID="btn2" />
     </Triggers>
   </asp:UpdatePanel>
Posted
Comments
Ch Smrutiranjan 16-Oct-14 3:50am    
There a property AutoPostBack="True". Just use this. I think it will solve your problem.

let the code be:

<asp:button ID="btn2" runat="server" AutoPostBack="True" Text="Delete Selected"
onclick="btn2_Click" />

1 solution

Hi,

Please add a property AutoPostBack="true" and then check.

Autopostback is the mechanism, by which the page will be posted back to the server automatically based on some events in the web controls. In some of the web controls, the property called auto post back.

If it is set to true,it will send the request to the server when an event happens in the control.

Whenever we set autopostback attribute to true in any of the controls, the .net framework will automatically insert few code in to the HTML generated to implement this functionality.

1.) A Java script method with name __doPostBack (eventtarget, eventargument)
2.) Two Hidden variables with name __EVENTTARGET and __EVENTARGUMENT
3.) OnChange JavaScript event to the control

Hope this helps :)

Regards,
Praneet
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900