Showing posts with label master. Show all posts
Showing posts with label master. Show all posts

Wednesday, March 28, 2012

System.WebForms.PageRequestManagerParserErrorException The message revieved from the serve

I am trying to use update panel's feature to asyncronously postback and update the data in one of my grid. I am using Master Page and ASPX and a User Control that actually contains the button, Update Panels and a Grid.

When I click btnRefresh I get the following error:

System.WebForms.PageRequestManagerParserErrorException The message revieved from the server could not be parsed...

My ascx looks like this:

<asp:ScriptManagerID="ScriptManager1"runat="server">
</asp:ScriptManager>

<asp:UpdatePanelID="UpdatePanel1"runat="server"UpdateMode="Conditional">
<ContentTemplate>
<asp:ImageButtonID="btnRefresh"runat="server"ImageUrl="~/refresh.gif"OnClick="ImageButton1_Click"/>
</ContentTemplate>
</asp:UpdatePanel>

<asp:UpdatePanelID="UpdatePanel2"runat="server">
<Triggers>
<asp:AsyncPostBackTriggerControlID="btnRefresh"/>
</Triggers>
<ContentTemplate>
<igtbl:UltraWebGridID="UltraWebGrid1"runat="server"Height="200px"Width="468px"style="left: 1px; top: 226px">
</igtbl:UltraWebGrid>
</ContentTemplate>
</asp:UpdatePanel>

Could someone please suggest on this? Is the problem with User Controls??

Guys,

I added the script manager in my Master Page and then added scriptManagerProxy at my user controls which resolved the problem.

Cheers,

Ashish

Tab Container/Panel with Master Page

I have a VB.Net/Asp.Net 2005 application and I would like to use a Master Page with a tab control

Inside the master page I have a tab control with five Tab Panels and I would like to put a ContentPlaceholder inside each tab's ContentTemplate but I am not allowed to do that. Does anyone have any good samples using Tab Containers/Panels inside a master page like this?

thanks

Hi,

As you've discovered, it can't be used this way unless you change the access modifier of TabPanelContainer to public and rebuild it.

Monday, March 26, 2012

Tab control & master pages

How do I access a tab control that is on a Default.aspx form, which is diplayed in the ContentPlaceholder from my MasterPage.

Page.FindControl(string controlId) ?

I'm not sure, but I think this works...

Agapito


Nope it does not work.

Maybe im explaining wrong. The control resides in a Default.aspx that will be the ContentPlaceholder. I want to access the control from the master pages. The Tab control resides on the Default.aspx


I also tried

//Page.FindControl(TabContainer1);//Master.FindControl(TabControl1);this.ContentPlaceHolder1.FindControl(TabControl);

Given a Content Placeholder of "GCSContent" and a Tab Container of "TabContainer1", I am able to successfully find the control in the Page_Unload event of MasterPage.master using the following syntax:

this.GCSContent.FindControl("TabContainer1");

how do I accomplish this............?

It tells me that the TabContainer1 does not exist in the current context

protected void MenuItem_Click(object sender, MenuEventArgs e)
{
if (this.Menu1.SelectedItem.Value.Equals("1"))
{


this.ContentPlaceHolder1.FindControl("TabContainer1");
TabContainer1.ActiveTab = TabPanel2;

}

}


What is the ID of the tabContainer?

TabContainer myTabContainer = (TabContainer) this.ContentPlaceHolder1.FindControl("whatever_ID");

tab control problem

I have a default page that takes it from master page, I have put update panel and model pop up inside the my default page. Now I want to use Tab control for my default page. Three tabs, and when they click first one my panel1 will display, second tab clicked panel2 third panel3 will display. I have my pop up on panel 2.

I have created everything by watching video from example, but I cannot see my panel 2 and 3, only can see panel1. What I need to add. Maybe javascript?

Hi,

Here is a sample page made according to your description, please try it. In masterPage, there is nothing more than a ScriptManager.

<%@. Page Language="C#" MasterPageFile="~/MasterPage.master" Title="Untitled Page" %><asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <ajaxToolkit:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="1"> <ajaxToolkit:TabPanel ID="TabPanel1" runat="server" HeaderText="TabPanel1"> <ContentTemplate> <asp:Panel ID="Panel1" runat="server" Height="50px" Width="125px"> Panel 1</asp:Panel> </ContentTemplate> </ajaxToolkit:TabPanel> <ajaxToolkit:TabPanel ID="TabPanel2" runat="server" HeaderText="TabPanel2"> <ContentTemplate> <asp:Panel ID="Panel2" runat="server" Height="50px" Width="125px"> Panel 2</br> <asp:Panel ID="Panel4" runat="server" Height="50px" Width="125px"> Popup<br /> <asp:Button ID="btnOK" runat="server" Text="OK" /></asp:Panel> <ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender1" runat="server" PopupControlID="Panel4" OkControlID="btnOK" TargetControlID="Button1"> </ajaxToolkit:ModalPopupExtender> <asp:Button ID="Button1" runat="server" Text="Pop" /> </asp:Panel> </ContentTemplate> </ajaxToolkit:TabPanel> <ajaxToolkit:TabPanel ID="TabPanel3" runat="server" HeaderText="TabPanel3"> <ContentTemplate> <asp:Panel ID="Panel3" runat="server" Height="50px" Width="125px"> Panel 3</asp:Panel> </ContentTemplate> </ajaxToolkit:TabPanel> </ajaxToolkit:TabContainer> </ContentTemplate> </asp:UpdatePanel>  </asp:Content>

Tab control wont see script manager on page

I have a master page setup. I have no Ajax controls in the masterpage at all, I am doing this purely in the content page. I am using Ajax 1.0 and the toolkit. I did install the CTP just in case it was looking for something there but it didn't help.

I am using a existing project that had no ajax setup originally. I edited the webconfig file and added all the relavent sections except the bit about IIS 7 which I am not using and the webservices which I am also not using.

I add a script manager and an update panel. The update panel is working perfectly. I then add a tab container and a tab panel from the toolkit and the tab panel gives me an error saying a script manager is required on the page. I tried moving the scriptmanager to the masterpage itself based on a few posts I saw here but it didn't make any difference.

Here is the source code. I removed most of the excess code so you could see the control placement without too much confusion.

<%

@dotnet.itags.org.PageLanguage="VB"MasterPageFile="~/Master1.master"AutoEventWireup="false"CodeFile="InvComputerRpt.aspx.vb"Inherits="Inventory_InvComputerRpt"title="IT Report" %>
<%@dotnet.itags.org.RegisterAssembly="AjaxControlToolkit"Namespace="AjaxControlToolkit"TagPrefix="cc1" %>
<%@dotnet.itags.org.RegisterAssembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"Namespace="System.Web.UI"TagPrefix="asp" %>

<asp:ContentID="Content1"ContentPlaceHolderID="ContentPlaceHolder1"Runat="Server">
<asp:ScriptManagerid="ScriptManager1"runat="server"></asp:ScriptManager>

<cc1:TabContainerID="TabContainer1"runat="server"></cc1:TabContainer>
<cc1:TabPanelID="TabPanel1"runat="server"></cc1:TabPanel><asp:MultiViewID="MultiView1"runat="server"ActiveViewIndex="0">
<asp:ViewID="View1"runat="server"><asp:UpdatePanelid="UpdatePanel1"runat="server">
<contenttemplate>
<asp:CheckBoxListid="CheckBoxList1"runat="server"></asp:CheckBoxList>
<asp:DropDownListid="ddlDept"</asp:DropDownList>
<asp:DropDownListid="ddlCat"runat="server"</asp:DropDownList>
<asp:GridViewid="GridView1"runat="server"></asp:GridView>
</contenttemplate>
</asp:UpdatePanel>

</asp:View>
</asp:MultiView>
</asp:Content>

Here's a version of your sample that runs fine in the SampleWebSite that comes with the Toolkit (note that TabPanel belongs inside TabContainer):

<%@. Page Language="C#" MasterPageFile="~/DefaultMaster.master" Title="Untitled Page" %><%@. Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %><asp:Content ID="Content1" ContentPlaceHolderID="SampleContent" runat="Server"> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <cc1:TabContainer ID="TabContainer1" runat="server"> <cc1:TabPanel ID="TabPanel1" runat="server"> </cc1:TabPanel> </cc1:TabContainer> <asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex="0"> <asp:View ID="View1" runat="server"> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <asp:CheckBoxList ID="CheckBoxList1" runat="server"> </asp:CheckBoxList> <asp:DropDownList ID="ddlDept" runat="server"> </asp:DropDownList> <asp:DropDownList ID="ddlCat" runat="server"> </asp:DropDownList> <asp:GridView ID="GridView1" runat="server"> </asp:GridView> </ContentTemplate> </asp:UpdatePanel> </asp:View> </asp:MultiView></asp:Content>

Hi David,

Thankyou, moving it between the container tags helped. I should have mentioned I was using Web Developer Express. I don't know if the behaviour is different in VS2005 but part of the problem was the designer not showing anything either so I didn't think it was working. Now I twigged that I am editing the source code to set my page up.

Regards

Victoria

Saturday, March 24, 2012

Tab Panel using ContentPlaceHolder not working inside Master Page.

I just downloaded the latest version of the AJAX toolkit and have noticed that with the new version my master pages now have new errors. It seems that the tab panels cant be used in master page and using contentplaceholders. Anyone have any fixes or solutions for this. The error I get is

Error 1 'AjaxControlToolkit.TabPanel.TabPanelContainer' is inaccessible due to its protection level c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\pubsubgui\6a434f43\4362c5b0\App_Web_dl4gjyhw.0.cs 185

Hi,

You can modify the access identifier of TabPanelContainer from internal to public in the source of the AjaxControlToolKit to solve it.


This should be fixed in the next release of the Toolkit due soon. Thanks!


Has this been resolved? I downloaded the Jun 18 release but I still seem to be having this issue (first time Ive used the control toolkit, so I cant tell you if it existed for me previously).

I have a content place holder in my Master page, and Im using the Tab Container/Panel control in my content page. The content pane renders blank. If I view source on the page the style for the tab container/panel is set to visibility:hidden;display:none; I have no idea why that happens but that might be part of the issue (Ive set the Style manually in the page_load but it doesnt act like a tab control, rather i just see the tab panel header text).

-Chris


Please send along a simple, self-contained demonstration of the problem for folks to have a look at. Maybe have a peek at the Tabs sample page which also uses MasterPage/ContentPage and seems to work okay.


OK, so this is my first time using AJAX, and the first control im using, and im already getting a fatal error like this?? Am I going to have problems like this with other controls? Should i wait on using AJAX?? It doesnt seem like its quite ready to use in a professional setting, with deadlines. Thanks


Hey... In general the AJAX toolkit is great and really fleshes out more for your web page. If you go and get the latest change source... this has been fixed. Go here and download and build the latest version of the code.http://www.codeplex.com/AtlasControlToolkit/SourceControl/ListDownloadableCommits.aspx


OK, isnt there a way to just download all of the fixes? I dont know what I am looking for in that link. Maybe the June 18th entry at 1:06 by davidans "take care of code analysis issue in tabpaneldesigner" ?? Sounds like person above downloaded that with now help. And how do I know where to add this souce code?? I build it into that sample project that comes with the toolkit?? And use the DLL it creates??

Wednesday, March 21, 2012

TabContainer hidden on postback!

i have a page that is derived from a master page. The page contains a tabContainer with three TabPanels. Each of the TabPanels contains an updatePanel.

One of the updatePanels contains a TabContainer with two Tabpanels that contain CascadingDropdowns. Everything works fine till i perform a postback

from within the update panel. Upon return the inner most tabContainer is hidden -- i can see it in ViewSource, but it is set to hidden and display of none.

There are no exceptions in the code. The Page Load event completes perfectly, the event handler for the button that causes the postback executes

perfectly. everything works, except that the tabContainer is "gone"...

If i remove the UpdatePanel that contains the tabContainer then everything works. Putting back the UpdatePanel causes the inner TabContainer to

disappear on postback even though everything works in the code behind. I tried to explicitly set the TabContainer to enabled and visible in Page Load

event to no avail. I do not know if the fact that the page is derived from a master page makes a difference.

summary of hierarchy

MasterPage

-- ClientPage

-- TabContainer

-- TabPanel

-- UpdatePanel -->this seems to cause the problem on postback.

-- TabContainer --> disappears on postback

-- TabPanel --> this works, has no TabContainers

-- TabPanel -->this works, has no Tabcontainers

Help??!!!


i found the solution to all the problems i've been having with tabs disappearing upon deployment.

Turns out the microsoftajax.js was different. Reinstalling Ajax extensions fixed it. The problem i

have with this is that this was the released v1.0 that was installed. The machine had no atlas, no

previews, no nothing before Ajax 1 was installed on it few weeks ago. Downloading and re-installing

fixed it, but clearly installed a different set of files... The hint that finally got me to this path was

issues with sys.debug that were not related to caching the js files in the browser nor in IIS.



I downloaded the latest controltoolkit.dll, however, I am still having the same problem with firefox as you had above.

Any suggestions?

Thanks


Hi,

If anyone is still having this issue....

Firefox had a bug. I just downloaded the latest release of Firefox from this link: (I guess it is not officially released?)

ftp://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2007-03-09-19-firefox2.0.0.3

In the new Firefox, the tabContainer seems to work fine.

Thanks

TabContainer in Master Page, TabPanel in Content Page...does it work?

I just started a new project, and before I go wasting my time and energy on this concept, let me find out for certain. If in my Master Page, I declare a TabContainer, and between those opening and closing tags I put the declaration of the ContentPlaceholder, then in each Content page, the entireity of the content is inside a TabPanel...will that work? Can I do it that way at all, even if there have to be some workarounds? And if there are, what are those workarounds?

Appreciate any help anybody can offer!

Hi Ando,

Yes , you can do it like this .

<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<ajaxToolkit:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0">
<ajaxToolkit:TabPanel ID="TabPanel1" runat="server">
<HeaderTemplate>
Tab1</HeaderTemplate>
<ContentTemplate>
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</ContentTemplate>
</ajaxToolkit:TabPanel>
<ajaxToolkit:TabPanel ID="TabPanel2" runat="server">
<HeaderTemplate>
Tab2</HeaderTemplate>
<ContentTemplate>
<asp:ContentPlaceHolder ID="ContentPlaceHolder2" runat="server">
</asp:ContentPlaceHolder>
</ContentTemplate>
</ajaxToolkit:TabPanel>
</ajaxToolkit:TabContainer>
</form>

ContentTemplate works like a container(Div);

I hope this help.

Best regards,

Jonathan


Does this example only work on a certain AJAX.NET release (I'm current using release 10920)? It'll certainly be handy if this method worked :)

I've tried the above but I'm getting the following Exception:

System.Web.HttpException was unhandled by user code
Message="TabContainer cannot have children of type 'System.Web.UI.WebControls.ContentPlaceHolder'."
Source="AjaxControlToolkit"
ErrorCode=-2147467259
StackTrace:
at AjaxControlToolkit.TabContainer.AddParsedSubObject(Object obj) in d:\E\AjaxTk-AjaxControlToolkit\Release\AjaxControlToolkit\Tabs\TabContainer.cs:line 311
at System.Web.UI.Control.System.Web.UI.IParserAccessor.AddParsedSubObject(Object obj)
at ASP.presentation_masterpage_master.__BuildControlTabContainer1() in d:\Data\Visual Studio 2005\WebSites\PTOK\Presentation\MasterPage.master:line 16
at ASP.presentation_masterpage_master.__BuildControlform1() in d:\Data\Visual Studio 2005\WebSites\PTOK\Presentation\MasterPage.master:line 11
at ASP.presentation_masterpage_master.__BuildControlTree(presentation_masterpage_master __ctrl) in d:\Data\Visual Studio 2005\WebSites\PTOK\Presentation\MasterPage.master:line 1
at ASP.presentation_masterpage_master.FrameworkInitialize() in d:\Data\Visual Studio 2005\WebSites\PTOK\Presentation\MasterPage.master.cs:line 912306
at System.Web.UI.UserControl.InitializeAsUserControlInternal()
at System.Web.UI.UserControl.InitializeAsUserControl(Page page)
at System.Web.UI.MasterPage.CreateMaster(TemplateControl owner, HttpContext context, VirtualPath masterPageFile, IDictionary contentTemplateCollection)
at System.Web.UI.Page.get_Master()
at System.Web.UI.Page.ApplyMasterPage()
at System.Web.UI.Page.PerformPreInit()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)


Hi SpaceToaster,

I have tested on V10920 and it works pretty well. Please make sure that you have put the sample code inside the Master.page and make the content page as simple as possible. For example,

<%@. Page Language="C#" MasterPageFile="~/MasterPage.master" Title="Untitled Page" %>

<script runat="server">

</script>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<%=DateTime.Now.ToString()%>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
2131
</asp:Content>

I hope this help.

Best regards,

Jonathan


Hi Jonathan,

I don't see how the code you posted above is the same as the original example you have shown.

The exception was thrown after I've placed a ContentPlaceHolder inside a TabContainer.

Thanks,


Hi Spacetoaster,

My first reply provide Master Page code and the second reply provide the Content Page code. So combine them will get a test sample.

Would you please test it on your machine? I have tested it on IE7 and Firefox2. Please make sure the TabContainer which contains aContentPlaceHolder is located inside the Master Page. If this doesn't work, please feel free to let me know with a simple repro which certainly can reproduce your issue.

Hope this help.

Best regards,

Jonathan


Hello Jonathan ;

I m using the same style as you replied in post 2 of this thread. I can add my one .aspx page in first Contentplaceholder1 but cant add second .aspx page in the second Contentplaceholder2 which is in second tab?

FYI: I have two pageload events in these two different pages? Do i have remove one ??


Hi Saqib_dotnet,

saqib_dotnet:

FYI: I have two pageload events in these two different pages? Do i have remove one ??

Yes, or one pageLoad function will be ignored.

Best regards,

Jonathan


So i have two different aspx file.

Tab1.aspx and Tab2.aspx files.

I will keep Page_Load Tab1.aspx and remove from the other, then how the other page will be processed with the first page? I mean what will invoke the Tab2.aspx functions?

REgards


Hi Saqib_dotnet,

UserControls located in the same page works as these functions & controls are put in the same page. So you can call the function directly.

saqib_dotnet:

I will keep Page_Load Tab1.aspx and remove from the other, then how the other page will be processed with the first page? I mean what will invoke the Tab2.aspx functions?

Please make sure that the right function name is pageLoad but not PageLoad or Page_Load. I suggest that you can change the pageLoad function to a common js fucntion (modify name) and remain them in the original place. Then , add pageLoad function to the end of the page, now we can call the other functions on pageLoad.

Best regards,

Jonathan



Hi Saqib_dotnet,

If you mean server side method, all Page_Loads will be executed. If it is a client side function(javascript function), you should usepageLoad function.

Best regards,

Jonathan


I thought we are talking about the Page_Load event handler function ?

Is there any other function pageLoad?


Hi Saqib_dotnet,

That's based on your implementation. I think you should add breakkpoints and find out the exact root cause.

Best regards,

Jonathan


First of all i never went so far where I worked with JS functions. All i m using is ScriptManager and it looks like, it is handling everything.

Now my question is: I created master page with two tabs like described above. Then added two different aspx pages to the ContentPlaceHolders respectively. Both pages are in two different files and both have server side Page_Load functions.

Now when i run theApplication, only my defult page get populated in first Tab but not the other page which should be populated in second Tab.

Where the problem is?

Also, I m trying to load the second tab when user clicks it? What should I do for this as well.

Regards

TabContainer inside Master page

Hi everyone

In my Webapplicaton i have Master Page .

One of my webpage i have placed the Tabcontainer inside the

Design Code:

<%@dotnet.itags.org.PageLanguage="C#"MasterPageFile="~/MstrPages/Default.master"AutoEventWireup="true"CodeFile="VQuote.aspx.cs"Inherits="VQuote"Title="Untitled Page" %>

<%@dotnet.itags.org.RegisterAssembly="AjaxControlToolkit"Namespace="AjaxControlToolkit"TagPrefix="cc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true"
runat="server">
</asp:ScriptManager>

<div>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<contenttemplate>
<cc1:TabContainer ID="SampleTabContainer" runat="server" ActiveTabIndex="0" TabIndex="0">
<cc1:TabPanel ID="Panel1" runat="server" HeaderText="Panel1">
<ContentTemplate>
</ContentTemplate>
</cc1:TabPanel>
<cc1:TabPanel ID="Panel2" runat="server" HeaderText="Panel2">
<ContentTemplate>
<table>
<tr>
<td>
<asp:Label ID="Label1" runat="server">Group Name</asp:Label>
</td>
<tr>
<asp:Label ID="lblGrouName" runat="server"></asp:Label>
</tr>
</table>
</ContentTemplate>
</cc1:TabPanel>
</cc1:TabContainer>
</contenttemplate>
</asp:UpdatePanel>
</div>
</asp:Content>

when i load the page i am getting the below error:

System.Web.HttpException : {"The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>)."}

Message : "The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>)."

stacktrace : " at System.Web.UI.ControlCollection.Add(Control child)\r\n at AjaxControlToolkit.ScriptObjectBuilder.RegisterCssReferences(Control control)\r\n at AjaxControlToolkit.ScriptControlBase.OnPreRender(EventArgs e)\r\n at System.Web.UI.Control.PreRenderRecursiveInternal()\r\n at System.Web.UI.Control.PreRenderRecursiveInternal()\r\n at System.Web.UI.Control.PreRenderRecursiveInternal()\r\n at System.Web.UI.Control.PreRenderRecursiveInternal()\r\n at System.Web.UI.Control.PreRenderRecursiveInternal()\r\n at System.Web.UI.Control.PreRenderRecursiveInternal()\r\n at System.Web.UI.Control.PreRenderRecursiveInternal()\r\n at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)"

when i debug i am getting error at this object:

ScriptObjectBuilder.cs

public static void RegisterCssReferences(Control control)
{
foreach (string styleSheet in ScriptObjectBuilder.GetCssReferences(control))
{
// Add the link to the page header instead of inside the body which is not xhtml compliant
HtmlLink link = new HtmlLink();
link.Href = styleSheet;
link.Attributes.Add("type", "text/css");
link.Attributes.Add("rel", "stylesheet");
control.Page.Header.Controls.Add(link); --Here I am getting the error


}
}

Please any can help to solve this issue

regards

kumaran

Hi Kumaran,

The sample you provided itself is correct.

As the error message indicates, please don't use code block in your page, use assignment in code behind instead.


TabContainer Server Side Event within Master Pages

I want to fire a server side event on the tab change event and I am sure it is not working beacuse of the use of a master page. Any thoughts how to get this working proerly?

1public void TabContainerPublications_ActiveTabChanged(object sender, EventArgs e)2{3string strTest;4if (TabContainerPublications.ActiveTabIndex == 0)5 strTest ="Made It!";6}

In the web form is the following:

1<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">2 <asp:ScriptManager ID="PublicationsScriptManager" runat="server">3 </asp:ScriptManager>4 <div id="publicationsheaderimage">5 </div>6 <div id="fullCol">7 <h2>8 Publications</h2>9 <ajaxToolkit:TabContainer ID="TabContainerPublications" runat="server" OnActiveTabChanged="TabContainerPublications_ActiveTabChanged">10 <ajaxToolkit:TabPanel ID="TabPanelAllPublications" HeaderText="All Publications" runat="server">11 <ContentTemplate>12 <asp:GridView runat="server" ID="GridViewAllPublications" AutoGenerateColumns="False"13 ShowHeader="False" CellSpacing="5" GridLines="None">14 <Columns>15 <asp:TemplateField>16 <ItemTemplate>17 <asp:HyperLink ID="HyperLink1" NavigateUrl='<%# Bind("articleUrl")%>' runat="server">18 <asp:Label ID="Label1" runat="server" Text='<%# Bind("articleName")%>'></asp:Label></asp:HyperLink>19 <asp:Label ID="Label2" runat="server" Text='<%# Bind("Abstract")%>'></asp:Label>20 </ItemTemplate>21 </asp:TemplateField>22 </Columns>23 </asp:GridView>24 </ContentTemplate>25 </ajaxToolkit:TabPanel>

As it turns out this was not my real issue. Since I wanted to execute a server side event I had to wrap the Tabs in an Update Panel.