Click here to Skip to main content
12,699,351 members (34,087 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# ASP.NET Ajax

I use a tab container (ajax tab container)and I have 3 tab panels ..My problem is
if I enter a textbox in 2nd tabpanel and then enter,the button in the 1st tab panel
is working....(or event in 1st tab panel is call) can I solve this...
Posted 6-Jan-13 20:52pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Use the following code to select which tab should be loaded inside the pageLoad() function in C#.
protected void Page_Load(object sender, EventArgs e)
    TabContainer1.ActiveTab = TabContainer1.Tabs[0];
  else if(secondEnterButton.clicked)
    TabContainer1.ActiveTab = TabContainer1.Tabs[1];

Use can use various options such as Querystring to make this work.

Like on clicking the first Enter button, the page should be reloaded using Response.Redirect() function with the path as "yourpage.aspx?page=1"

protected void enter1_Click(object sender, EventArgs e)

and in the PageLoad function, use the if condition as

if (Page.Request.QueryString["page"] == "1")
            TabContainer1.ActiveTab = TabContainer1.Tabs[0];

and so on.. Its upto you how to use it.


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170118.1 | Last Updated 7 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100