Click here to Skip to main content
15,881,248 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello everyone, i am still having a full page postback after using an updatepanel on asp.net webpage, does anyone know what might be the cause? here is my code:


XML
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
   <ContentTemplate>
    <asp:DropDownList ID="DropDownList2" runat="server" AutoPostBack="True"
                    style="z-index: 1; left: 548px; top: 366px; position: absolute">
                    <asp:ListItem>---Select---</asp:ListItem>
                    <asp:ListItem>True</asp:ListItem>
                    <asp:ListItem>False</asp:ListItem>
                </asp:DropDownList>

 </ContentTemplate>
 </asp:UpdatePanel>
Posted
Updated 4-Aug-13 13:15pm
v2
Comments
I.explore.code 5-Aug-13 4:18am    
have you tried Googling for this? i would be surprised if you did but didn't get any relevant results. This is a pretty common problem and has hundreds of posts on the matter. Obviously your DropDownList is meant to be "trigger" (hint).
Uwakpeter 5-Aug-13 5:00am    
yes i did all that, but still not working, many solutions on google dont seem to work! i dont know why, i even check the config file to remove the legacy lineof code. any further help will be appreciated.
I.explore.code 5-Aug-13 5:16am    
can you put the rest of page mark-up on here as well? i have just tried with your code and it seems to work..something else must be amiss.
Uwakpeter 5-Aug-13 5:37am    
yes it works fine if i use it on a new project, i have an existing project that i want to use Ajax on all the form pages, but it is not working on this existing project!

1 solution

XML
Try,

  <asp:UpdatePanel ID="UpdatePanel1" runat="server">
   <ContentTemplate>
    <asp:DropDownList ID="DropDownList2" runat="server" AutoPostBack="True"
                    style="z-index: 1; left: 548px; top: 366px; position: absolute">
                    <asp:ListItem>---Select---</asp:ListItem>
                    <asp:ListItem>True</asp:ListItem>
                    <asp:ListItem>False</asp:ListItem>
    </asp:DropDownList>
 </ContentTemplate>
<Triggers>
  <asp:AsyncPostBackTrigger ControlID="your control which postback" EventName="event name" />
  </Triggers>
 </asp:UpdatePanel>



Hope it helps.
 
Share this answer
 
Comments
Uwakpeter 7-Aug-13 3:18am    
yes i did all that, i just discovered a Jquery reference in my MasterPage was preventing it from working, i removed the Jquery from MasterPage and it is working now.

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