RadStrip Page Control

1 posts, 0 answers
  1. Atif
    Atif avatar
    1 posts
    Member since:
    Aug 2012

    Posted 08 Aug 2012 Link to this post

    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;
                }>
Back to Top