I have a problem with my AJAX and ASP.NET 3.5 :( Problem is really weird, as I'm using the same thing on different page and it works fine in there, but on this specific page, this is not working.
Here's what I have:
<asp:UpdatePanel ID="upMain" runat="server" UpdateMode="Conditional" Visible="true" RenderMode="Inline">
<ContentTemplate>
<asp:DropDownList ID="ddlNewService_PortTelco" runat="server" Width="250" CssClass="dropdown" AutoPostBack="true" OnSelectedIndexChanged="Provision_PortedTelcoChanged"></asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel>
On the way before the DropDown there is one DIV (html one), and then few asp:Panels. I do not understand why this is causing a FULL POST BACK ?!
Any ideas ? Thanks
How do you bind your DropDown? The code that you have provided works on my side with static items. Perhaps it is something in the other controls that is causing the problem.
I have noticed that your UpdatePanel has its UpdateMode property set to conditional, however you haven't defined any triggers.You can try to explicitly set that the update panel should perform async postback when your dropdown triggers its selectedIndexChanged event. You can use something like the following markup:
Me having the same problem...
CHECK your WEB.CONFIG
for this line.. and JUST REMOVE IT!!
Worked for me. Thanks http://andrew-murphy.co.uk/?p=152
Setting the AutoPostBack attribute to true should be enough to cause a partial postback but it's not what happens and a full postback is triggered instead as you correctly described.
The following workaround works for me:
This is how the original DropDownList should look like:
For more details regarding the WebForm_PostBackOptions parameters see below:
http://msdn.microsoft.com/en-us/library/system.web.ui.postbackoptions_members(v=VS.90).aspx
Set AutoID value to ClientIDMode property. It worked for me. I have had different behaviour in different browsers (i.e. Google chrome and Firefox).
One alternative to fix this issue is:
Declare the library
Then you can do something on these lines
You have your drop down list with an
AutoPostBack
set totrue
. That's why you have it post back instead ofAsyncPostBack
, if that is what you wanted.Remove the
AutoPostBack=true
from the dropdownlist and set anAsync
trigger for your UpdatePanel set to the dropdownlist and itseventname="SelectedIndexChanged"