Solved

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

Posted on 2011-03-25
2
655 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
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
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 is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

757 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now