Javascript File
function SaveActiveTabIndex(sender)
{
var activetabindex = sender.get_activeTab().get_tabIndex();
setCookie(activetabindex);
}
function setCookie(value)
{
document.cookie = "tabIndex=" + escape(value);
}
C# FileRegister the tab control with OnClientActiveTabChanged.e.g.
tabProgramInfo.OnClientActiveTabChanged = "SaveActiveTabIndex";
and retrive the active tab index of this tab control from cookie.
int activeTabIndex=Convert.ToInt32(Server.HtmlEncode(Request.Cookies["tabIndex"].Value));
Tuesday, June 2, 2009
Getting active tab index of a tab using Javascript
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment