FindTabByText("RadTabStrip1") Object reference error

2 posts, 0 answers
  1. GARY078
    GARY078 avatar
    11 posts
    Member since:
    Jun 2012

    Posted 10 Sep 2012 Link to this post

    I am getting an object reference error when using FindControl("RadTabStrip1").

    I followed the Telerik Wizard demo to achieve this and I can see from other people's questions in the forum that this is a very common error to have. However none of the recommended solutions seemed to work for me.

    I have attached 2 screenshots of the relevant code.

    TabTestCS.png shows the code behind for the default page (not the Site.Master) showing the creation of tabs and pageviews.

    Step2CS.png shows the code-behind for the "Next" button (from Step1.ascx.cs control page) which will be for the transition of Step1 to Step2 in the wizard.

    TabTestASPX.png shows the TABTEST.aspx page where the RadTabStrip1 control is created.

    I have tried assigning values to the tabs and locating them that way, but that didn't work either.

    Any help you can provide would be much appreciated,

    Thank you.
  2. GARY078
    GARY078 avatar
    11 posts
    Member since:
    Jun 2012

    Posted 11 Sep 2012 Link to this post


    The method I used instead was:

    protected void
    Tab2_Next(object sender, EventArgs e)
        RadTabStrip tabStrip = (RadTabStrip)this.RadTabStrip1;

        RadTab Step2Tab = tabStrip.FindTabByValue("1");

        Step2Tab.Enabled = true;
        Step2Tab.Selected = true;


        RadMultiPage multiPage = (RadMultiPage)this.RadMultiPage1;

        RadPageView Step2PageView = multiPage.FindPageViewByID("Step2PageView");

        Step2PageView.Selected = true;





  3. DevCraft R3 2016 release webinar banner
Back to Top