Hi all, I'm facing a problem that I can't solve with hours of research!
I really need your help...
I want to postback my page to content fields on my page get filled when I select an item of my dropdownlist that is filled when I click on a button...
Inside the contents of the UpdatePanel I have the dropdownlist and the button to fill dropdownlist... Everything goes fine when i click the button... But the problem is when i click on an item of my dropdownlist don't postback (refresh whole page)..
Where is my code.
<asp:ScriptManager ID="ScriptManager1" runat="server">
<asp:UpdatePanel ID="PleaseWaitPanel" runat="server" RenderMode="Inline">
<asp:DropDownList ID="cmbTrabalhador" runat="server" Width="300px"
style="margin-left:-4px;" AutoPostBack="True" onselectedindexchanged="cmbTrabalhador_SelectedIndexChanged">
<asp:Button ID="cmdpreenche" runat="server" Text="Preencher/Actualizar Lista"
<asp:AsyncPostBackTrigger ControlID="cmbTrabalhador" EventName="SelectedIndexChanged" />
<asp:Panel ID="PleaseWaitMessagePanel" runat="server" CssClass="modalPopup" Height="50px"
Please wait<br />
<img src="img/ajax-loader.gif" alt="Please wait" /></asp:Panel>
<asp:Button ID="HiddenButton" runat="server" CssClass="hidden" Text="Hidden Button"
ToolTip="Necessary for Modal Popup Extender" />
<asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server" BehaviorID="PleaseWaitPopup" TargetControlID="HiddenButton" PopupControlID="PleaseWaitMessagePanel" BackgroundCssClass="modalBackground">
Not too clear by what you mean But the problem is when i click on an item of my dropdownlist don't postback (refresh whole page)..
Let me tell what your page design is doing:
1. You have two controls in your update panel - butotn and dropdownlist,
2. You have one async trigger defined
Now, based on above 2, following happens:
1. Dropdown selected change happens asynchronously and partially updates update panel
2. Button click partially updates update panel.
Async trigger defined was not needed as by default the controls in UpdatePanel postsback page asynchronously.
Now, if you wanted to have a complete page postback on dropdown values selection, then you need to use
PostBackTrigger instead of
I replaced all my body content inside the ContentTemplate tags of UpdatePanel to fill all my fields correctly but when I press the "cmdPreenche" button my loading screen don't stops from loading... With only dropdownlist and button inside the ContentTemplate tags all works fine but with the problem that I refered on my last question above...
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)