Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2011-03-25
2
Medium Priority
?
677 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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…
Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

650 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