Solved

Ajax Control Toolkit Tab Control Tab Index change does not load the selected tab content

Posted on 2011-03-25
2
669 Views
Last Modified: 2012-06-27

Open in new window

protected void Page_Load(object sender, EventArgs e)
        {
           
         
            if (Request.QueryString["tab"] != null)
            {
                int tab = Convert.ToInt32(Request.QueryString["tab"].ToString());
                SetCurrentTab = (MyUtility.Enum_MasterPageCurrentTab)tab;
            }
           
           
        }

        protected void ActiveTabChanged(object sender, EventArgs e)
        {
           
            if (SATabs.ActiveTabIndex == 0)
            {
                Response.Redirect("~/Issues/AddIssue.aspx?tab=0");
            }
            else if (SATabs.ActiveTabIndex == 1)
            {
                 Response.Redirect("~/Issues/MyIssues.aspx?tab=1");
            }
            else if (SATabs.ActiveTabIndex == 2)
            {
                  Response.Redirect("~/Issues/ManageIssues.aspx?tab=2");
            }
            else if (SATabs.ActiveTabIndex == 3)
            {
                  Response.Redirect("~/Admin/SiteSettings.aspx?tab=3");
            }
        }
0
Comment
Question by:dotnetkb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 22

Accepted Solution

by:
Mrunal earned 500 total points
ID: 35224762
try by putting your page load code in !IspostBack property.

It should be executed only once.

http://www.codeproject.com/KB/aspnet/IsPostBack.aspx
0
 
LVL 15

Expert Comment

by:rajeeshmca
ID: 35274311
Also add the line

SATabs.ActiveTabIndex = tab

eg:

 protected void Page_Load(object sender, EventArgs e)
        {
           
         
            if (Request.QueryString["tab"] != null)
            {
                int tab = Convert.ToInt32(Request.QueryString["tab"].ToString());
                SATabs.ActiveTabIndex = tab
                SetCurrentTab = (MyUtility.Enum_MasterPageCurrentTab)tab;
            }
           
           
        }
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…

731 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question