Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
280
Problem with tab
posted

Hi friends,

I have problem with tab control . i,e I have one master page inside content page I have Ultraweb tab , i have attached .aspx page to each tabs.

My need is , i want to get the no of controls and control's ID from each tab(.aspx page of that tab) .Please any body can give me the solution for this.

Thanks

Sharan

  • 24497
    posted

    Hi Sharan,

    When the TargetUrl is used, then the only UltraWebTab does is creates <iframe> and sets its src to target. That is all.

    So, application should do exactly the same if it had line similar to <iframe src="MyPage.aspx"> in its main aspx (or content page).

    To "access" on server child control located in TargetUrl, application may use shared objects like Session. For example, if TargetUrl for Tab1 has TextBox1, then application may process OnLoad (or similar) event of that target page and

    Session["TextBox1_Tab1_Text"] = this.TextBox1.Text;
    Session["TextBox1_Tab1_ID"] = this.TextBox1.ClientID;

    To get those values in main page, application may

    string text1_text_tab1 = Session["TextBox1_Tab1_Text"] as string;
    string text1_tab1_id = Session["TextBox1_Tab1_ID"] as string;

    To "access" on client child control located in TargetUrl, application may use following members of tab: elemIframe, findControl(id), getTargetUrlDocument(). Example:

    var webtab = igtab_getTabById(clientIdOfUltraWebTab);
    var tab1 = webtab.Tabs[0];
    var iframe = tab1.elemIframe;
    var textBox1 = tab1.findControl('TextBox1');