Showing posts with label tabcontainer. Show all posts
Showing posts with label tabcontainer. Show all posts

Saturday, March 24, 2012

Triggering UpdatePanel with controls inside TabPanel

I have a TabContainer with several TabPanels inside, and several of the TabPanels contain Button controls.

<ajaxToolkit:TabContainer ID="InstructionTabs" runat="server" Height="300px">
<ajaxToolkit:TabPanel ID="XLSInstructions" runat="server" HeaderText="Excel">
<ContentTemplate>
<asp:Button ID="btnSubmit" runat="server" OnClick="btnSubmit_Click" Text="Submit" />
</ContentTemplate>
</ajaxToolkit:TabPanel>
</ajaxToolkit:TabContainer>

Elsewhere on the page, I have an UpdatePanel (not contained inside theTabContainer or TabPanels), and I want to trigger this UpdatePanelusing one of the controls inside the TabPanels.

<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
...
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnSubmit" />
</Triggers>
</asp:UpdatePanel>

When I hardcode the Trigger, i get an error:

A control with ID 'btnSubmit' could not be found for the trigger in UpdatePanel 'UpdatePanel1'.

Also, using the designer to set the Triggers collection on he UpdatePanel, none of the controls inside the TabPanels are visible, just the TabContainer control itself. Any ideas how to get the UpdatePanel to trigger off a control in a TabPanel?


What you can do is, trigger your UpdatePanel with a javascript function or call UpdatePanel1.Update() inside your btnSubmit_Click() function.

Troubble with asp:fileUpload and TabContainer

Hello everybody!!Big Smile

I have been developping an aplication with the tabcontainer and tabconteiner of the AjaxControlToolKit, when the asp:fileUpload is outside of tabContainer the application works fine but when the asp:fileUpload is inside of tabContainer the fileupload's property "HasFile" is falseSad

any ideas??

thanks in advancedBig Smile

Hello,

thefileupload control can NOT be inside an updatepanel, andrequires a full postback. Maybe that's your issue? Got updatepanels in the tab?


Thanks a Lot NNMBig Smile, you are correct, thank u very much, I had put an updatepanel in my pageTongue TiedEmbarrassed i didn't know that it coudn't be possible...