Hello,
I have created an application that uses the TabStrip. My application has a Master Page that loads the ASPX page containing the TabStrip. I have a RadScriptManager and a RadAjaxManager (EnableAJAX is set to 'true') in my MasterPage. I've set the "EnableHistory" to "true" for the RadScriptManager, and when the user clicks on a Tab, within the TabClick event, I add a HistoryPoint that stores the Tab's "text" value. Withing the "OnNavigate" event for the RadScriptManager I can find the TabStrip and MultiPage controls, and I can find the Tab from it's text. However, when I set the "selected" property of the tab to 'true' nothing happens. The tab does not get loaded. What am I doing wrong? Is there a better way to achieve browser's "Back-button" navigation for the TabStrip that's been ajaxified?
Sample Code:
OnNavigate event for the RadScriptManager:
protected void rsmSiteMaster_Navigate(object sender, HistoryEventArgs e)
{
string backPage = Server.HtmlEncode(e.State["BackNavigation"]);
ContentPlaceHolder cphTabStrip = (ContentPlaceHolder)Page.Master.FindControl("cphTabStrip");
RadAjaxLoadingPanel alpTabStrip = (RadAjaxLoadingPanel)Page.Master.FindControl("alpTabStrip");
RadTabStrip rtabstripTabs = (RadTabStrip)cphTabStrip.FindControl("rtabstripTabs");
RadMultiPage rmpTabStrip = (RadMultiPage)cphTabStrip.FindControl("rmpTabStrip");
RadTab tab = rtabstripTabs.FindTabByText(backPage);
tab.Selected = true;
tab.DataBind();
}
This is how I set the HistoryPoint withing the "TabClick" event:
string key = "BackNavigation";
RadScriptManager.GetCurrent(this).AddHistoryPoint(key, e.Tab.Text);
Thanks,
Shawn A.