Click here to Skip to main content
15,880,891 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
<asp:Button ID="btnSave" runat="server" Text="Save" CommandName="Update" />
Posted
Updated 12-Aug-15 7:40am
v2
Comments
Roshan 11862764 12-Aug-15 14:31pm    
Have you added proper Trigger for the Update Panel
If you have added trigger for btnSave, is it PostBack Trigger or AsyncPostBack Trigger?
Member 11520626 12-Aug-15 14:35pm    
I have a postback trigger for the formview, that I had to use before for another thing. How could I write a trigger for a button that's inside the formview, where do I put it?

1 solution

A PostBack trigger will always refresh entire page as it calls all the PageLifeCycle events.

To add a trigger to a UpdatePanel, at the end of </ContentTemplate>
write the Triggers
XML
<Triggers>
               <asp:AsyncPostBackTrigger ControlID="Button1" />
</Triggers>


If you want a PostBackTrigger then Replace the AsyncPostBackTrigger with PostBackTrigger in the above snippet.
Make sure that ChildAsTrigger property of UpdatePanel is set to True

Refer : https://msdn.microsoft.com/en-us/library/bb399001.aspx[^]
 
Share this answer
 
Comments
Member 11520626 12-Aug-15 15:46pm    
The problem is that the button is within a formview, the formview can be found but not the button. Even with the ChildrenAsTrigger property set to true

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