Hi - I am using Infragistics webtab (v 10.2) to move between two aspx pages and here is code snippet.
<
ig:WebTab ID="WebTab1" runat="server" Height="200px" Width="300px" EnableValidation="true" EnableViewState="false">
<Tabs><ig:ContentTabItem runat="server" Text="Tab 1" ContentUrl="Page1.aspx">
</ig:ContentTabItem>
<ig:ContentTabItem runat="server" Text="Tab 2" ContentUrl="Page2.aspx">
</ig:ContentTabItem></Tabs>
<PostBackOptions EnableLoadOnDemandUrl="true" EnableLoadOnDemand="true" EnableReloadingUnselectedTab="true" EnableAjax ="true"/>
<AutoPostBackFlags SelectedIndexChanged ="On"/>
</ig:WebTab>
Here is the issue I am facing -
When I move from Tab1 (Page1.aspx) to Tab2 (Page2.aspx) Page1.aspx is loaded as expected, but Page2.aspx is loaded twice.
Am I missing any settings?
Appreciated quick response.
IE calls the TabSelectedIndexChanged twice, so you need to do something like this:
( note that these loadcnt(s) are maintained in a persisted class and cleared on page_load)
Private Sub tabRotation_SelectedIndexChanged(ByVal sender As Object, ByVal e As Infragistics.Web.UI.LayoutControls.TabSelectedIndexChangedEventArgs) Handles tabRotation.SelectedIndexChanged ' infragistics webtab event model wants to run the tabindex changed event always twice ' way too much over head involved, limit this to once only Select Case tabRotation.SelectedIndex
'Case 0 is my default tab and is loaded by default
Case 1 ' Description If (MSS_Rotation.tabDescriptionloadcnt = 0 AndAlso Request.Browser.Browser <> "IE") OrElse (MSS_Rotation.tabDescriptionloadcnt = 1 AndAlso Request.Browser.Browser = "IE") Then LoadDescription() End If MSS_Rotation.tabDescriptionloadcnt += 1 Case 2 ' Scheduling If (MSS_Rotation.tabSchedulingloadcnt = 0 AndAlso Request.Browser.Browser <> "IE") OrElse (MSS_Rotation.tabSchedulingloadcnt = 1 AndAlso Request.Browser.Browser = "IE") Then LoadSchedulingTab() End If MSS_Rotation.tabSchedulingloadcnt += 1 Case 3 ' Tags If (MSS_Rotation.tabTagsloadcnt = 0 AndAlso Request.Browser.Browser <> "IE") OrElse (MSS_Rotation.tabTagsloadcnt = 1 AndAlso Request.Browser.Browser = "IE") Then LoadTagsTab() End If MSS_Rotation.tabTagsloadcnt += 1 Case 4 ' Students If (MSS_Rotation.tabStudentsloadcnt = 0 AndAlso Request.Browser.Browser <> "IE") OrElse (MSS_Rotation.tabStudentsloadcnt = 1 AndAlso Request.Browser.Browser = "IE") Then LoadStudents() End If MSS_Rotation.tabStudentsloadcnt += 1 End Select End Sub
*Also, note that if you let the webtab sit for a couple of minutes (on a fired off tab), *then* switch to another tab *WHICH HAS NOT BEEN LOADED ON DEMAND*:
1. for IE, it might never fire off the event
2. for IE, it might never fire off the 2nd selectedindexchanged (so a persisted Boolean might be a better choice versus a counter style implementation)
Hi,
Thank you for report.That scenario was missed by logic of webtab on client. Following happened:When selected tab was changed, then ContentUrl (iframe.src) of new selected tab was set and that triggered reload of that iframe and break point on server for that ContentPane was hit (at this point WebTab was not aware that change-selection will trigger full postback by its base class). Straight after that the whole page was submitted, because of enabled autopostback attached to selection-change event. After main page was reloaded, the ContentUrl of selected tab item was loaded again as part of main page and break point was hit again.
That issue was fixed and updates will be available within service releases.
HI,
I am experiencing the same problem. Any idea when will the fix be available for this bug?
Thanks.
Hi Preet919,
That is possible that you have different scenario compare to original report.
It would be great if you write simplest possible sample (aspx and aspx.cs files are enough), zip those files and attach within Options tab. Also provide exact steps to reproduce that issue.
Hello,
The fix for this issue should have gone out a while ago. Could you provide me with some more information about your implementation? It is possible that you may be facing a new issue that wasn't covered by the fix for the previous issue.
Hello again,
I upgraded my Infragistics to the latest service release i.e. 11.1.20111.2158. And the above problem IS STILL NOT fixed!!!!
Can someone from Infragistcs please reply? I have to get my project out and I cannot go with this double post-backs!
I have Infragistics 11.1.20111.2064. The problem still exists. Is there a workaround to fix it?
Please let me know.
History in tfs shows that it was already merged into RELEASE branch. It means that it was already tested and verified. In most cases time between fixes and services releases take around 1-2 months. That was fixed less than a month ago. I guess, it should be available in next service release.