This is a migrated thread and some comments may be shown as answers.

TabStrip in SharePoint 2010 application page

0 Answers 38 Views
Sharepoint Integration
This is a migrated thread and some comments may be shown as answers.
Ibsa
Top achievements
Rank 1
Ibsa asked on 06 Aug 2012, 06:33 PM
I implemented a simple TabStrip/Wizard control as shown in this demo http://demos.telerik.com/aspnet-ajax/tabstrip/examples/applicationscenarios/wizard/defaultcs.aspx 

I have one aspx with rad TabStrip and three ascx pages that feed the content of each tab. When the parent page is opened, the content of the first tab loads from the associated user control with no error. When I click next to navigate to the second tab, however, the below error occurs.

Is there something special I need to do in order for this to work in SharePoint 2010 application page?

Any help is much appreciated,

Thanks,
Ibsa

Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; GTB7.3; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; MDDR; .NET4.0C; .NET4.0E; InfoPath.2)
Timestamp: <time>

Message: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500
Line: 4723
Char: 21
Code: 0
URI: http://<server-name>/ScriptResource.axd?d=oxveds8lFOxv5Jc_vbLat_faNgPVzPdfeB0qCW2XezdNMjthEgXqrFCPb3GgVTLPaFSVq-wtsnpHOHDRcGQhwTt8eJiQT7-4eYDP4wCVj0dY7mlDgUNo8OpFQgy2jPFWXfv2ZbjY9M3pqKTBzAoCrGx1FQPzT-koBUUT3efDYAsF7WRA0&t=ffffffffb868b5f4 


Parent aspx page:

<div class="exampleWrapper"> 
<telerik:RadAjaxLoadingPanel runat="server" ID="LoadingPanel1">
    </telerik:RadAjaxLoadingPanel>       
    <telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel1" LoadingPanelID="LoadingPanel1" Height="100%">
        <div style="float:left; width:500px">
            <telerik:RadTabStrip ID="RadTabStrip1" SelectedIndex="0" runat="server" MultiPageID="RadMultiPage1"
                Skin="Sunset" CssClass="tabStrip">
            </telerik:RadTabStrip>
            <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0" OnPageViewCreated="RadMultiPage1_PageViewCreated" CssClass="multiPage">
            </telerik:RadMultiPage>
        </div>
   </telerik:RadAjaxPanel>
</div>
protected void Page_Load(object sender, System.EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                AddTab("Personal Info", true);
 
                RadPageView pageView = new RadPageView();
                pageView.ID = "Personal";
                RadMultiPage1.PageViews.Add(pageView);
 
                AddTab("Education Info", false);
                AddTab("Professional Info", false);
            }
        }
 
        private void AddTab(string tabName, bool enabled)
        {
            RadTab tab = new RadTab(tabName);
            tab.Enabled = enabled;
            RadTabStrip1.Tabs.Add(tab);
        }
 
        protected void RadMultiPage1_PageViewCreated(object sender, RadMultiPageEventArgs e)
        {
            Control pageViewContents = LoadControl(e.PageView.ID + "CS.ascx");
            pageViewContents.ID = e.PageView.ID + "userControl";
 
            e.PageView.Controls.Add(pageViewContents);
        }

User Control for Tab1
<asp:Button runat="server" ID="nextButton" Text="Next" OnClick="nextButton_Click" CssClass="nextButton" />
protected void nextButton_Click(object sender, EventArgs e)
        {
            GoToNextTab();
        }
 
        private void GoToNextTab()
        {
            RadTabStrip tabStrip = (RadTabStrip)Page.FindControl("RadTabStrip1");
            RadTab educationInfoTab = tabStrip.FindTabByText("Education Info");
            educationInfoTab.Enabled = true;
            educationInfoTab.Selected = true;
 
            GoToNextPageView();
        }
 
        private void GoToNextPageView()
        {
            RadMultiPage multiPage = (RadMultiPage)Page.FindControl("RadMultiPage1");
            RadPageView educationInfoPageView = multiPage.FindPageViewByID("Education");
            if (educationInfoPageView == null)
            {
                educationInfoPageView = new RadPageView();
                educationInfoPageView.ID = "Education";
                multiPage.PageViews.Add(educationInfoPageView);
            }
            educationInfoPageView.Selected = true;
        }

No answers yet. Maybe you can help?

Tags
Sharepoint Integration
Asked by
Ibsa
Top achievements
Rank 1
Share this question
or