We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

TabStrip page redirect and selection state

Thread ID:

Created:

Updated:

Platform:

Replies:

74460 Jun 13,2008 03:20 PM Jun 28,2008 12:10 AM ASP.NET Web Forms (Classic) 2
loading
Tags: Tools
Administrator [Syncfusion]
Asked On June 13, 2008 03:20 PM

hello,

How do you retain the selection state for a TabStrip control on a master page when each item redirects to another aspx page ?

Only the default selected item shows.


Melba Winshia [Syncfusion]
Replied On June 16, 2008 08:03 AM

Hi Sorin,

Thank you for your interest in Syncfusion Products.

You can retain the selection state for a TabStrip control on a master page when each item redirects to another aspx page by using below code:

[Javascript]

window.onload=function()
{
//Callback to get the previous and current tab selection
CallbackPanel2.callback();
}
[c#]

protected void CallbackPanel2_CallbackRefresh(object sender, Syncfusion.Web.UI.WebControls.Shared.CancellableCallbackEventArgs e)
{
this.previousTabHidden.Value = this.CurrentTabHidden.Value;

//Get Current selection
value = Application["selectedvalue"] as string;

//Get previous selection to remove selection
value2 = Application["curentetab"] as string;

if (value != null)
{

foreach (TabStripItem item in this.TabStrip1.Items)
{
if (item.Selected == true && item.Text == value2)
{

item.Selected = false;
}

if (item.Text == value)
{

item.Selected = true;
}

}
}
}



Please refer the sample in the below link which illustrates the above:

http://www.syncfusion.com/support/user/uploads/Tools_ASP_TabSelection_1c5fbf92.zip

Please try this and let me know if this helps.

Thanks,
Melba


Administrator [Syncfusion]
Replied On June 28, 2008 12:10 AM

Thank you !!!


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;