Update panel postback on Internet explorer - asp.net

I have an update panel and inside that I have a repeater and a button.
On button click it filters some data and binds the repeater.
Everything is working fine on local host. On server, everything is working perfectly in chrome, firefox, safari, but in Internet explorer it does a full postback.
I tried with putting button click in
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnupdaetd" />
</Triggers>
But to no effect. Except Internet explorer, on each browser everything is working fine.
I even tried
<meta http-equiv="X-UA-Compatible" content="IE=9" />
with no luck.
Nothing is wrong in code, as everything is working perfectly in chrome, firefox, safari. The only issue is with Internet explorer in server. On local it's working in internet explorer too.

Try changing this
<asp:AsyncPostBackTrigger ControlID="btnupdaetd" />
to
<asp:AsyncPostBackTrigger ControlID="btnupdaetd" EventName="Click" />
and add ClientIDMode to AutoID on your asp button like this
<asp:Button runat="server" ID="btnupdaetd" ClientIDMode="AutoID" Text="Click" OnClick="btnupdaetd_Click" />
also in your update panel add UpdateMode="Conditional" like this
<asp:UpdatePanel ID="upd1" runat="server" UpdateMode="Conditional">

Related

Dropdown lists don't work correctly with Modal Popup Extenders in newer version of Firefox

I recently updated firefox to the latest version, 40.0.2, and have come across a problem dealing with the AJAX ModalPopupExtender and dropdown lists.
The issue is that when I open a ModalPopupExtender and try to select one of the values from the dropdown list, it does nothing. It keeps the dropdown list open an nothing gets selected. Furthermore, if I click and hold, it allows me to drag the Popup as if I was dragging the header.
My popups are in the following format:
<ajax:ModalPopupExtender id="mpeModal" runat="server" PopupControlId="pnlModal" PopupDragHandleControlID="pnlModalHeader" />
<asp:Panel id="pnlModal" runat="server" CssClass="modal-panel" style="display:none">
<asp:Panel id="pnlModalHeader" runat="server">
<uc:PopupHeader id="phModalHeader" Text="Header Text" runat="server />
</asp:Panel>
<div class="modal-content">
<asp:TextBox id="txtField" runat="server" />
<asp:DropdownList id="ddlField" runat="server />
</div>
</asp:Panel>
The last version of Firefox I was using was 34, so I'm not sure if a version between 34 and 40 would have changed how this works.
Any idea what would cause this issue with Dropdown Lists in AJAX Modal Popups?
After more testing of my app, I found a few cases where it did work correctly.
The issue was that in some cases pnlModalHeader was not present in the markup and PopupDragHandleControlID was set to pnlModal. This is how all the old Modal Popups in the app were being done and in previous version of Firefox (and all other browsers) this caused the user to be able to drag the ModalPopup by clicking anywhere in the panel, not just the header. I changed this, but must have missed a couple.
It now works appropriately in the newer version of Firefox.

AjaxToolKit Issues in Modal Popup in IE 10

I have a following implementation in an asp.net application.
In abc.aspx i have this tag:
<ajaxToolkit:ModalPopUpExtender popupControlId="pnl">
<asp:Panel id="pnl">
<iframe src="example.aspx" id="fr2">
</asp:Panel>
Now the example.aspx has a PopUp Control Extender as like this
<asp:Textbox id="txt">
<asp:UpdatePanel id=udp>
<ContentTemplate>
<asp:Button/>
<asp:CheckBoxList>
<asp:Button/> .
</ContentTemplate>
</asp:UpdatePanel>
<ajaxToolkit:PopUpControlExtender targetControlId="txt">
</ajaxToolkit>
Now that PopupControlExtender in example.aspx runs fine when it is normally rendered as an aspx page.When the Page is Implemented as above in an iframe,in IE10, the PopUp Control Extender Doesnot Work as Desired.But it Works Fine In compatibility modes of IE as Well as Normal modes in Firefox,Chrome and Safari.
Please Help on this ..

Listbox not causing post back in Chrome and Safari

In chrome and safari I am having problems with a list box I have. The data is loaded on the backend initially which works fine. But then on the event SelectedIndexChange I want to figure out what they selected and update my panel with that info. Problem is chrome and safari is not calling the event. Ive checked for script erros and get none. IE and FF work just fine, so I am just wondering what is wrong with those browsers and what I can do to fix this. Basically this is a control that sits inside a sharepoint 2007 page.
<asp:UpdatePanel ID="ISudpl" runat="server">
<ContentTemplate>
<strong>Product</strong><br /><asp:ListBox runat="server" ID="Product"
OnSelectedIndexChanged="Filter_SelectedIndexChanged" EnableViewState="true" AutoPostBack="true"
SelectionMode="Multiple" Rows="15" CssClass="designIntent"/>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Product" EventName="SelectedIndexChanged" />
</Triggers>
</asp:UpdatePanel>
I think this is a documented issue with Microsoft AJAX and webkit based browsers check here http://blog.turlov.com/2009/01/aspnet-ajax-compatibility-patch-for.html and here Asp.Net, DropDownList, AutoPostBack and Google Chrome for a possible solution
You do not need Trigger because your control(ListBox) is inside same UpdatePanel. Please remove the complete <Triggers></Triggers> block from your code and check if it works in Chrome?

UpdatePanel not working in IE or Chrome

I have an updatepanel on my masterpage. Within the contentplace holder I have my update progress control. When a user clicks on the button I load some data into a gridview. This works perfectly in FireFox. User clicks the button, the loading image in my updateprogress fires and loads the gridview. When I test this in IE 6 or 7 or in Chrome. It does a full postback and the updateprogress is never shown. So the updatepanel doesnt seem to be working in these two browsers. Code is below. Again...it works perfect in FireFox.
***From Masterpage ***
<asp:UpdatePanel ID="UpdatePanel" runat="server">
<contenttemplate>
<asp:contentplaceholder id="holder" runat="server" />
</contenttemplate>
</asp:UpdatePanel>
**From aspx page ****
<asp:UpdateProgress ID="UpdateProgress1" runat="server">
<ProgressTemplate>
<img src="ajax-loader.gif" />
</ProgressTemplate>
</asp:UpdateProgress>
We had some namespace and dll issues with this.

Postback issues with firefox on an aspx page

I have a strange problem on an aspx page. In short, I have 3 radio buttons and a table on the page. When the user activates the middle radio button two text boxes and a button is shown to the user. The button serves as a way to post back the page. Anyway, the postback should be only a partial postback. Everything works fine in IE but in Firefox I found out that if I click outside of the two text boxes and then hit the refresh button, the whole page is posted back instead of a partial postback. If I select a date from the two text boxes and don't get the cursor out of one of the text boxes and then hit the button, only a partial post back is performed, which is what I want. The question is, how could I resolve this issue with Firefox ?
The page basically looks like this:
<asp:RadioButtonList>
<asp:ListItem Value="1" />
<asp:ListItem Value="2" />
<asp:ListItem Value="3" />
<asp:RadioButtonList>
<div>
...
<asp:TextBox />
...
<asp:TextBox />
...
<asp:Button ID="refreshButton" />
</div>
...
<asp:UpdatePanel>
<ContentTemplate>
<GridView ... />
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger
ControlID="filterRBL"
EventName="SelectedIndexChanged" />
<asp:AsyncPostBackTrigger
ControlID="numberOfRecordsPerPageDDL"
EventName="SelectedIndexChanged" />
<asp:AsyncPostBackTrigger
ControlID="refreshButton"
EventName="Click" />
</Triggers>
</asp:UpdatePanel>
Thanks in advance.
You may need to put the group of controls into a <asp:Panel> tag and/or change the UpdateMode="Conditional" on your UpdatePanel tag

Resources