Click here to Skip to main content
15,912,072 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
While doing below code Entire page is refreshing Instead of UpdatePanel


XML
<script type="text/javascript">
    $(function () {

        $('#<%=txtItemCode.ClientID %>').focusout(function () {
           

            __doPostBack('#<%=UpdatePanel2.ClientID %>', '');


        });

    });
</script>



Help me If any one know
Thanks
Posted
Updated 29-Jan-14 19:50pm
v3

1 solution

You can use an AsyncPostBackTrigger with the UpdatePanel to do this.
try some thing like this:-

without any hidden button;-
__doPostBack('<%=UpdatePanel1.ClientID %>', null);

or with hidden button:-
XML
<asp:UpdatePanel ID="UpdatePanel1" runat="server" >
    <ContentTemplate>

    </ContentTemplate>
    <Triggers>
        <asp:AsyncPostBackTrigger ControlID="ReloadThePanel" EventName="Click" />
    </Triggers>
</asp:UpdatePanel>
<asp:Button ID="ReloadThePanel" runat="server" style="display:none;" />

When you want the panel to be updated, you just need to call:
__doPostBack('<%=ReloadThePanel.ClientID %>', null);
 
Share this answer
 
Comments
Bajid Khan 30-Jan-14 3:22am    
Still Not working... Thanks for reply...........

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