?
Solved

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

Posted on 2011-03-25
2
Medium Priority
?
676 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 2000 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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses
Course of the Month8 days, 19 hours left to enroll

764 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