The Tabs control in the AJAX Control Toolkit behaves like a regular postback control

I have the following markup in an ASP.NET page:

<html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">

<title>Untitled Page</title>

</head>

<body>

<form id="form1" runat="server">

<div>

 

<cc1:ToolkitScriptManager runat="Server" EnablePartialRendering="true" ID="ScriptManager1"></cc1:ToolkitScriptManager>

<asp:UpdatePanel ID="UpdatePanel1" runat="server">

<ContentTemplate>

<cc1:TabContainer ID="TabContainer1" Height="138px" runat="server" Width="402px" ActiveTabIndex="0">

<cc1:TabPanel HeaderText="Test1" ID="Test1" runat="server">

<ContentTemplate>

<asp:UpdatePanel ID="up2" runat="server">

<ContentTemplate>

<asp:Label ID="lblTest1" Text="test1" runat="server"></asp:Label><br />

<asp:Button ID="btnTest" Text="Click me" runat="server" onclick="btnTest_Click" />

</ContentTemplate>

</asp:UpdatePanel>

</ContentTemplate>

</cc1:TabPanel>

<cc1:TabPanel HeaderText="Test2" ID="Test2" runat="server">

<ContentTemplate>

<asp:UpdatePanel ID="UpdatePanel2" runat="server">

<ContentTemplate>

<asp:Label ID="lblTest2" Text="test2" runat="server"></asp:Label><br />

<asp:Button ID="btnTest2" Text="Click me" runat="server" OnClick="btnTest2_Click" />

</ContentTemplate>

</asp:UpdatePanel>

</ContentTemplate>

</cc1:TabPanel>

</cc1:TabContainer>

</ContentTemplate>

</asp:UpdatePanel>

</div>

</form>

</body>

</html>

 Here's my code-behind:

public partial class _Default : System.Web.UI.Page

{

protected void Page_Load(object sender, EventArgs e)

{

this.lblTest1.Text = "test";this.lblTest2.Text = "test";

}

protected void btnTest_Click(object sender, EventArgs e)

{

this.lblTest1.Text = this.TabContainer1.ActiveTab.HeaderText;

}

protected void btnTest2_Click(object sender, EventArgs e)

{

this.lblTest2.Text = this.TabContainer1.ActiveTab.HeaderText;

}

}

When I click on the buttons it causes the page to flicker, like a regular postback as opposed to an asynchronous postback.

What am I doing wrong?

 


Thanks.
0
HotmailUser
12/25/2007 1:03:03 AM
asp.net.ajax_control_toolkit 17816 articles. 1 followers. Follow

2 Replies
1092 Views

Similar Articles

[PageSpeed] 22

Hi,

It's still a asynchronous postback. But according to tabcontainer's working mechanism, it will be disponsed and initialized again upon a postback.

So there will be a flicker on the control, not the page.

Here is a sample that demonstrate that there is no normal postback. 

 

<%@ Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

   protected void Page_Load(object sender, EventArgs e)

{
this.lblTest1.Text = "test";this.lblTest2.Text = "test";

}
protected void btnTest_Click(object sender, EventArgs e)

{
this.lblTest1.Text = this.TabContainer1.ActiveTab.HeaderText;

}
protected void btnTest2_Click(object sender, EventArgs e)

{
this.lblTest2.Text = this.TabContainer1.ActiveTab.HeaderText;

}
</script>

<html xmlns="http://www.w3.org/1999/xhtml">

<head id="Head1" runat="server">
<title>Untitled Page</title>

</head>

<body>

<form id="form1" runat="server">

<div>

 
<% = DateTime.Now.ToString() %>
<ajaxtoolkit:ToolkitScriptManager runat="Server" EnablePartialRendering="true" ID="ScriptManager1"></ajaxtoolkit:ToolkitScriptManager>

<asp:UpdatePanel ID="UpdatePanel1" runat="server">

<ContentTemplate>

<ajaxtoolkit:TabContainer ID="TabContainer1" Height="138px" runat="server" Width="402px" ActiveTabIndex="0">

<ajaxtoolkit:TabPanel HeaderText="Test1" ID="Test1" runat="server">

<ContentTemplate>

<asp:UpdatePanel ID="up2" runat="server">

<ContentTemplate>

<asp:Label ID="lblTest1" Text="test1" runat="server"></asp:Label><br />

<asp:Button ID="btnTest" Text="Click me" runat="server" onclick="btnTest_Click" /><br />
<% = DateTime.Now.ToString() %>

</ContentTemplate>

</asp:UpdatePanel>

</ContentTemplate>

</ajaxtoolkit:TabPanel>

<ajaxtoolkit:TabPanel HeaderText="Test2" ID="Test2" runat="server">

<ContentTemplate>

<asp:UpdatePanel ID="UpdatePanel2" runat="server">

<ContentTemplate>

<asp:Label ID="lblTest2" Text="test2" runat="server"></asp:Label><br />

<asp:Button ID="btnTest2" Text="Click me" runat="server" OnClick="btnTest2_Click" /><br />
<% = DateTime.Now.ToString() %>

</ContentTemplate>

</asp:UpdatePanel>

</ContentTemplate>

</ajaxtoolkit:TabPanel>

</ajaxtoolkit:TabContainer>

</ContentTemplate>

</asp:UpdatePanel>

</div>
</form>

</body>

</html>
  
0
Raymond
12/27/2007 2:25:47 AM

I've gotten rid of the flicker by removing the outer UpdatePanel from the markup.

 


Thanks.
0
HotmailUser
12/27/2007 12:58:29 PM
Reply:

Similar Artilces:

AJAX Control Toolkit Tabs Control...
I have a tab control where I would like make the height of the control 100%. Can someone give me an example or provide me with direction on how to accomplish this...   Thanks... Hi there, In the TabContainer properties you can specify hight. Not sure about percentage though! <Ajax:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0" Height="300px"> Hope that answers your questionKind regardsMikael Thanks but, I was already aware that there was the height property. However, it does not allow percentages...  Any ideas..?? I guess you could request suppo...

Ajax Control Toolkit Tab Control
Hi Folks,  I am trying to get the Tab Container working. I have spent the past 3 days going through each and every post online and right now I am writing this as a last resort. I do not want any postback. I have a container with two tabs. I have a few text boxes, labels and one calendar extender in each tab and all I do in each tab is collect user information depending on the user type. When I run the code, only one tab shows up with all of its contents.This is the tab with the ActiveTabIndex="0". The other tab shows none of its controls when selected - only the ...

Ajax Control Toolkit: Tab Control Hidden
Hi,I have added a tab control to a page, and set everything up to be visible, however when I view the page the control is hidden.I have tried making sure it is visible via the code behind (tab1.visible = true), but this still doesn't show the control.Here is the code I have used to create the control: 1 <ajax:TabContainer runat="server" ID="Tab1"> 2 <ajax:TabPanel runat="server" ID="Panel1" HeaderText="Add"> 3 Add 4 </ajax:TabPanel> 5 </ajax:TabContainer>   I have trie...

I do not see Tab control in my AJAX Control Toolkit.
First, how do I update my version of the AJAX Control Toolkit to the latest? Second, is there a way to tell what version of AJAX Control Toolkit I have? Third, I do not see the Tab control as one of the available AJAX controls in my Toolbox. Am I missing something? If you just have a reference to the AjaxControlToolkit.dll - you just need to delete it and reference the latest version. If you have a project reference, you'll need to make sure the project is the version you want and rebuild it. You'll also be able to see if the folder for Tabs is there - it should be as I believe it was in ...

Page and Control Flashing Using AJAX Control Toolkit Controls
Page and Control Flashing Using AJAX Control Toolkit Controls I'm using IE7 and the ASP.NET AJAX Control Toolkit.  I'm using two controls -- Accordion and CollapsiblePanelExtender.  I'm actually using 2 CollapsiblePanelExtenders, and the Accordion control is inside one of the panels for the CollapsiblePanelExtender (see the code below). The problem I'm seeing is that when I click an Accordion pane to open/close it or click the CollapsiblePanelExtender panel to open/close the panels, the controls and page flash while the animation is in progess.  Everything el...

Ajax Control Toolkit: Control cannot be created because Visual Studio cannot find the control's type in the control assembly.
Hi All, Good Day.  I am using ASP.Net 2.0 Framework, i have downloaded Ajax 3.0 and added reference into the project. But i am not able to add controls to the page. When i tried to add control into the page getting following error message "Control cannot be created because Visual Studio cannot find the control's type in the control assembly". I checked some forums on the web, added references in Web.Config. Still not able to proceed further. Please revert asap.  Thanks. AJAX 3.0 not work in 2.0 Framework its work in 3.5 Framework try to download another ...

Ajax Control Toolkit extenders to controls in VS 2008 not visible from control prompt
 Joe Stagner on this video shows how to have Ajax Control Toolkit intergrated into VS 2008.There is one moment that he sais, that after the toolkit is added, web controls in VS are "extensions-aware", i.e the little arrow is displayed near the example asp:Button control with an option to "Add Extender" and then choose from the available extender for this control from the automatically generated list. I do not have this "little arrow" and i do have VS 2008 TE, .NET 3.5 and Ajax Control Toolkit referenced in my toolbox.Any ideas? Łukasz Podolak Hi Podi...

AJAX Control Toolkit's Tabs control in an UpdatePanel
If you place the Tabs control in an UpdatePanel and set the AutoPostBack property of the TabContainer to true, every time you click on one of the TabPanel controls which causes the active tab to change, the rendering of the control causes a flicker. It appears like a postback, although it is not. Any way to get around this? Thanks.  Thanks. I used it . i never got the problem.<script type="text/javascript">            function PanelClick(sender, e) {    }    function ActiveTabChanged(sen...

I don't have slider or tab control in my ajax control toolkit.
I referenced the ajaxcontroltoolkit.dll from the latest download, what now?  I have a slider extender and a tab container but no slider or tab panel.  Help.Thanks for your help!Greg NewDays, 1. There is no slider control, per se.  To get a slider, what you do is add a slider extender to your page and set a textbox as the Target Control for the slider extender.  The extender will then render your textbox control into a slider. 2. To get tabs, you just need to add the Tab Container first.  In the designer, you can then click on your container to add Tab Panel ...

Ajax Control toolkit ----Tab control ---Button click event is not firing
 Hi frdsi'm using ajax control toolkit controls in my web applicationi have done an application which uses tab controllogin tab and register tabfor both the bustton event is not firinghere is the code in html  <%@ Page Language="VB" MasterPageFile="~/DefaultMaster.master" AutoEventWireup="false" CodeFile="Tab1.aspx.vb" Inherits="Tabs_Tab1" title="Untitled Page" %> <asp:Content ID="Content1" ContentPlaceHolderID="SampleContent" Runat="Server"> <ajaxToolkit:ToolkitScriptM...

Ajax Control Toolkit
Hi,  I'm new to Asp.net Ajax I tried to create an Ajax Rating control dynamically in my site. The rating control is included inside a placeholder and when the user click on the submit button the current rating value of the rating control is added to the database.  But the problem is when the client click on the submit button (when the page is refreshed) , Current Rating of the control set back to zero.  The user selected value is vanished.   my code is as follows // code for creating the rating control dynamically  AjaxControlToolkit.Rating Rating_Feedb...

AJAX Control Toolkit with Wizard Control
Hi there,  I am trying to add a 4 stage wizard control to a modal popup control and keep it up for the duration of the wizard. However every time the 'Next' button is pressed, the Modal popup window closes but the wizard moves on a step. I know this because next time you press the button to activate the wizard it comes up on the next stage. Is it possible to keep it open throughout the entire wizard process? Thanks, Matt MattSystems Engineer / ASP.NET Web Developermbaughan@raecomputing.com Are you using an update panel with the wizard control so the page doesn't do a ful...

No Intellisence on Ajax Control Toolkit Controls
Intellisence of AjaxControlToolkit's controls won't work if I open my projects from a mapped network drive. any ideas?...

Ajax Control Toolkit not bringing up all the controls that it should
Hello, I have installed Ajax on my computer and it has finally worked. My collagues are using the same installations files that I used but they are not seeing all the Ajax Controls that I am seeing. I have from Accordion to Validator CalloutExtender. They don't have this toolbox Ajax Ext? Do you know what could have happened. If there is a certain order or If they need to configure something differently. Please help.. Thanks !!!Tatiana Kingking.tatiana@gmail.comcel:(561)699-4493 There is the extensions and the toolkit. You probably have both. They don'tPlease "Mark As...

Web resources about - The Tabs control in the AJAX Control Toolkit behaves like a regular postback control - asp.net.ajax_control_toolkit

HasOffers Customers and Partners Event - Postback 2013 Tickets, Seattle - Eventbrite
This is going to be an incredible event with some of the smartest people in user acquisition, publishing, and performance advertising. Look ...

GeekWire Calendar Picks: Postback 2015, Hack the Dot Seattle, and more
Fast-growing Seattle startup Tune is holding its annual marketing conference, Postback 2015, at Seattle Center July 23 – 24. At last year’s event ...

ASP.NET MVC Framework - Wikipedia, the free encyclopedia
Based on ASP.NET , ASP.NET MVC allows software developers to build a web application as a composition of three roles: Model , View and Controller ...

Bentours - Travel Specialist Australia - Hotels, Tours, Flights, Cruises & Packages in Scandinavia, Russia ...
Bentours is a leading Travel Agent based in Australia. We fulfill our client's dream to explore and discover amazing travel destinations.


Amitech Business Solutions
Amitech Business Solutions, Creative Technology Startup ventures , Innovative IT company of India, allevents.in trendround

Drink of the Week - Logicum
Logicum It's Logical to share Menu Skip to content Home Contests Food Recipes Drink of the Week Health Technology Sports Space World Day Weapons ...

Publishers
Login An Adworkz Publisher gets paid for driving sales and leads to Advertiser Campaigns. Browse the network to find a campaign that matches ...

Sitefinity 4 Calendar Widget Released!
August 28th, 2011 I work for a software firm in Fort Wayne, IN. For the longest time, we used Sitefinity 3 as our standard content management ...

Second state of the Belgian Twitosphere
On April 17, 2007 I published the first state of the Twitosphere in Belgium , my home country. With this new state of the Twitosphere I want ...

Resources last updated: 12/8/2015 11:46:23 AM