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

RadStrip Page Control

0 Answers 30 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Atif
Top achievements
Rank 1
Atif asked on 08 Aug 2012, 05:03 AM
How can i load .aspx page in below code instead of usercontrol page

< protected void Page_Load(object sender, System.EventArgs e)
            {
                if (!Page.IsPostBack)
                {
                    AddTab("Orders");
                    AddPageView(RadTabStrip1.FindTabByText("Orders"));
                    AddTab("Products");

                   
                }
            }

       private void AddTab(string tabName)
       {
           RadTab tab = new RadTab();
           tab.Text = tabName;
           RadTabStrip1.Tabs.Add(tab);
       }

       

       protected void RadMultiPage1_PageViewCreated(object sender, RadMultiPageEventArgs e)
       {
           string userControlName = e.PageView.ID + ".ascx";

           Control userControl = Page.LoadControl(userControlName);
           userControl.ID = e.PageView.ID + "_userControl";

           e.PageView.Controls.Add(userControl);
       }

            private void AddPageView(RadTab tab)
            {
                RadPageView pageView = new RadPageView();
                pageView.ID = tab.Text;
                RadMultiPage1.PageViews.Add(pageView);
                pageView.CssClass = "pageView";
                tab.PageViewID = pageView.ID;
            }

            

            protected void RadTabStrip1_TabClick(object sender, RadTabStripEventArgs e)
            {
                AddPageView(e.Tab);
                e.Tab.PageView.Selected = true;
            }>

No answers yet. Maybe you can help?

Tags
TabStrip
Asked by
Atif
Top achievements
Rank 1
Share this question
or