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
Solved

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

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

828 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