Thursday, April 4, 2013
Using Request.QueryString in Page_Load in SharePoint page layout
Below is an example of using the Request.QueryString collection in the Page_Load method in a SharePoint page layout. In this case we're looking for the variable named 'tab' and checking for various conditions.
try
{
int index = System.Convert.ToInt32(Request.QueryString["tab"]);
if (index > 1 && index < 5)
{
if (RadTabStrip1.Tabs[index-1].Visible)
{
RadTabStrip1.Tabs[index-1].Selected = true;
RadMultiPage1.PageViews[index-1].Selected = true;
}
}
}
catch (Exception ex)
{
// Response.Write(ex.Message);
}
Labels:
.NET,
SharePoint
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment