.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Error with dyanamically Created AjaxControlToolkit TabPanel

Posted By:      Posted Date: October 14, 2010    Points: 0   Category :ASP.Net

I am getting an error in my application in  AJAXControlToolkit.ScriptControlBase.System.Web.UI.IPostBackDataHandler.LoadPostData. 

I am adding and removing tab panels based on user input data.  Sometimes the app creates 5 to 10 pannels and sometimes only 1 or 2 depending on the user input parameter.  The error occurs when the user input parameter dictates that 10 panels be created.  When the user then changes the input parameter to a selection that only requires 1 panel the error occurs and the error message refers to a parameter name :index with the specified argument out of range  It appears that is is still looking for the 10 panels created in the previous user selection.  The error message is in the Disassembly of the AJAXControlToolkit.  I thought maybe was linked to enableviewstate but I set this to false for the tabpanel and tabcontainer yet still get the error.



View Complete Post

More Related Resource Links

AjaxControlToolkit requires ASP.NET Ajax 4.0 scripts. - Error being thrown while building asp.net si


Everytime I build my site in VS2010 Beta I recieve a few ajax errors before the site loads here they are in order as they pop out on the build; 


throw new Error("AjaxControlToolkit requires ASP.NET Ajax 4.0 scripts. Ensure the correct version of the scripts are referenced. If you are using an ASP.NET ScriptManager, switch to the AjaxScriptManager in System.Web.Ajax.dll, or use the ToolkitScriptManager in AjaxControlToolkit.dll.");


And then Next this line is throwing an error, I have a watermark ajax field on the page that I created a long while ago;

Sys.registerComponent(Sys.Extended.UI.TextBoxWatermarkBehavior, { name: "watermark", parameters: [{name:"WatermarkText",type:"String"}, {name:"WatermarkCssClass",type:"String"}] });

 And then lastly;

 if (Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()).get_IsWatermarked())


Even with these exceptions the page loads fin

Using tabs from the AjaxControlToolkit causes error: ...control contains code blocks (i.e. <% ... %>


I'm getting the error:

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

When attempting to add the tabs from the AjaxControlToolkit.  A little background..Theres an existing aspx page in a microsite which used the accordion control and the tabbed control ...I need to modify this page to use a different masterpage. 

The original site was .Net Framework 2.0 and the page in question used AjaxControlToolkit 1.0. which I manually installed originally.  Some of the site has been further developed using the .Net Framework 3.5.  (Come with AjaxControlToolkit) Now I have come to update this aspx page and I get the error above.

I have narrowed the down to the TabContainer (I think)  Does anyone have any experience with this sort of problem?  Also what version of the AjaxControlToolkit should be with the .Net Framework 3.5? I have 1.0.20229.20821. 

I also tried to browse to the AjaxControlToolkit.dll to add the tools to the tool box as they're missing... thinking this may be an indicator as to why it wasn't working. I get the error: 'There was an error loading types from assembly C:\inetpub\wwwroot\project\Bin\AjaxControlToolkit.dll Could not load file or assembly 'System.Web.Extensions. Version=

Issues with dynamically created TabContainer (Hide/Show TabPanel)


I have a web page that contains an UpdatePanel. In that panel, there is a TabContainer control that has 5 TabPanels, only the first one "Tab 1" will be displayed during initial page load. There is an Add button in "Tab 1", whenever it gets clicked, I will add (show) the next TabPanel (Tab 2, Tab 3, etc., all the way to Tab 5). "Tab 2" thru "Tab 5" contains a Close button that will close (hide) the current tab when clicked.

I'm doing all of these from code behind (dynamically create controls in Page_Init event and re-generate them during postback, track each TabPanel's content in a session variable, etc.), and everything seems to work just fine IF after adding several TabPanels, I remove  them in order (i.e. remove Tab 5 first, then Tab 4, Tab 3, etc.). It will NOT work whenever I try to remove a tab in the middle, then I will get all kinds of strange results.

I've attached the sample codes here for reviewing and testing. Any help is greatly appreciated.


==================== demo.aspx page ====================

<%@ Page

AjaxControlToolkit.dll is not a Microsoft .NET module error

I am trying to install AjaxControlToolkit in VS2008. Everytime I try to get it in the Toolbox I get this error: AjaxControlToolkit.dll is not a Microsoft .NET module The only thing I can find on the net is to make sure the dll is in my Bin folder. When I first create the web project the dll is never in the bin folder I have to add it. But that still does not get rid of the error. Please help Thank YOu

VS2010 Web App does not build Release - Could not load AjaxControlToolkit error

I have a VS2010 Web Application that uses the AjaxControlToolkit. I am able to build the Debug configuration. When I build the release configuration I get the following error message: Error 89 Could not load file or assembly 'file:///S:\My Code\Libraries\ACT\May 2010\AjaxControlToolkit.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) S:\My Code\EZFishing\EZFishing\EZFishing\SGEN EZFishing The location of the file is correct, and I just downloaded and unzipped there the Ajax CT. I have always built this app correctly before upgrading to VS2010 and ACT May 2010. Any idea of what is going on? Thank you in advance for your help. Mauro  

Alignment for Dyanamically created control.



I am creating some label and textbox dynamically in a Panel. I am not able to do alingment. I need to allign all textboxes. Below is code.

 private void LoadControls(string strGridId, DateTime dtGridDate)
            pnlSectorGrid.Visible = true;
            DataSet ds = GetSectorialGridData(strGridId, dtGridDate);
            for (int Index = 0; Index < ds.Tables[0].Rows.Count - 1; Index++)

                Label lblSectorName = new Label();
                lblSectorName.Text = ds.Tables[0].Rows[Index]["tsu_SubSectorName"].ToString();
                lblSectorName.Font.Size = 10;
                Label space = new Label();
                space.Text = "            "; 
                TextBox txtAlloc = new TextBox();
                txtAlloc.Text = ds.Tables[0].Rows[Index]["Alloc"].ToString();
                txtAlloc.Font.Size = 10;
                txtAlloc.Width = 90;              
                pnlSectorGrid.Controls.Add(new WebControl(HtmlTextWriterTag.Br));
                if (ds.Tables[0].Rows[Index]["tsu_SubSectorID"].ToS

Parser Error Message: Could not load file or assembly 'AjaxControlToolkit.dll' or one of its depen



Server Error in '/AJX' Application.

Parser Error

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Could not load file or assembly 'AjaxControlToolkit.dll' or one of its dependencies. The system cannot find the file specified.

Source Error:

[No relevant source lines]

Source File: none    Line: 0

Assembly Load Trace: The following information can be helpful to determine why the assembly 'AjaxControlToolkit.dll' could not be loaded.

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableL

Error while adding reference to latest version of AjaxControlToolkit


HI All,

I am a bit new to ASP.Net Ajax and as such new to Ajax itself. I have a site which uses ASP.Net Ajax.  It used the version AjaxControlToolkit version 3.0.30512.0. I have now changed it to version 3.5.40412.2 by deleting the old reference and adding a reference to the latest one . I build the soultion and everything appears fine witjhout any errors. But the site fails to load showing a yellow page with the message AjaxControlToolkit Version="3.5.40412.2" missing reference to 'AjaxControlToolkit.ExtenderBase.Base Scripts.js.BaseScripts.js'. What does this mean ?

Error ""The site /ssp/admin could not be created" during SSP Creation



I've a problem when creating a new SSP. My farm is composed by a Sql Server Cluster, 2 Front end, and 2 application. 

Now the SSP is located (Search Database) on the first application server, and i'm Trying to Create a second SSP with DB pointing on another server.

When I create the ssp, i receive a generic error (via Web interface and Stsadm.exe). In the LOGS I found as follow. 

It seems something due to the SSP Admin Site and it's template.

Can yuu help me?


09/27/2010 18:00:11.85 OWSTIMER.EXE (0x0AF8)                   0x0B0C Windows SharePoint Services   General                       72ix Medium   Not enough information to determine a list for module "(null)". Assuming no list for this module.  

09/27/2010 18:00:11.86 OWSTIMER.EXE (0x0AF8)                   <

Microsoft JScript runtime error: AjaxControlToolkit requires ASP.NET Ajax 4.0 scripts



  I am getting the following error while using ajax control tookit

Microsoft JScript runtime error: AjaxControlToolkit requires ASP.NET Ajax 4.0 scripts. Ensure the correct version of the scripts are referenced. If you are using an ASP.NET ScriptManager, switch to the ToolkitScriptManager in AjaxControlToolkit.dll.

I am using Visual Studio 2008 with .Net Framwork 3.5 SP 1, i downloaded the Ajax Control Toolkit from codeplex (AjaxControlToolkit.Binary.NET35)

Below given is the markup:

<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>

InfoPath error: One or more required custom controls in this form cannot be created


I have an InfoPath 2007 form published to a form library in MOSS 2007.  This form opens in InfoPath and is not browser-enabled.

The form suddenly stopped working for me and 1 other user.  I'm a farm admin and the user only has contributor rights on the form library (and site and subsite).  Everyone else with appropriate permissions can access existing forms that use the template and can create new forms using the template.

When either one of us tries to open the form, we get:

InfoPath cannot open the following file: http://site/subsite/formlibrary/filename.xml?OpenIn=PreferClient&NoRedirect=true&XmlLocation=/subsite/formlibrary/filename.xml.
One or more required custom controls in this form cannot be created.

No errors in the web front end event log or SharePoint log files.  No errors in my client PC's event log.

I've tried the following without success:

Opening the template and publishing it to a new list. 
Published the template to a new content type on this list and a new list. 
Dumped IE cache and reset IE settings.
Rebooted the computer.
Checked permissions on the list to make sure they were correct.

Last change made to the farm:

I performed the work around change to the web

Backup/Restore 404 File not found error ;Site site created besed on Custom Site Template




I am using SharePoint (Version: 12.0.6318.5000). The scenario is like that;

  • I have created a Site Collection and under that I have 2 sub sites and under each sub sites again I have a sub site (Site Collection [level 1]>>>SubSite+Lists [level 2]>>>SubSite+ Lists [level 3]>>>Lists, Doc. Library and Picture Library

VS 2010 and The type or namespace name 'AjaxControlToolkit' could not be found error?



I've installed VS2010 and I'm trying to compile my .NET 2.0 app. It went through a conversion process when I opened it, I made a backup, but I'm still targeting .NET 2.0 for now.  I have a project reference and the "ajaxcontroltoolkit.dll" in the \bin and it ran fine in VS 2008.  Do I need a different version of the toolkit I currently have (1.0.10301.0 which targets runtime v2.0.50727) to run .NET 2.0 in VS2010 now?

The error "The type or namespace name 'AjaxControlToolkit' could not be found (are you missing a using directive or an assembly reference?)"

The warning gives more info

"Warning 27 The primary reference "AjaxControlToolkit, Version=1.0.10301.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e, processorArchitecture=MSIL" could not be resolved because it has an indirect dependency on the framework assembly "System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" which could not be resolved in the currently targeted framework. ".NETFramework,Version=v2.0". To resolve this problem, either remove the reference "AjaxControlToolkit, Version=1.0.10301.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e, processorArchitecture=MSIL" or retarget your application to a f

Error :Session state has created a session id, but cannot save it because the response was already f


I read the solutioin for this error, at the following link :


but I am still not clear what exactly causes the error. I have two doubts :

1. Can anyone please elaborate a bit on this issue, with any example ????

2. Is there any drawback of this approach ???

Thanks in advance for any reply......

Object ref not set error on created instance.


First time I do it this way, so probably something simple I don't know about.  Think the following code explain the "issue" better than I could.

  public class MvcApplication : HttpApplication
    private ILoggerService _loggerService;
    protected void Application_Start()
      _loggerService = ObjectFactory.GetInstance<ILoggerService>();
      _loggerService.Info("Application Started");

    public void Application_End()
      _loggerService.Info("Application Ended.");

    protected void Application_Error(object sender, EventArgs e)
      // get object ref not set error if I dont do this??
      _loggerService = ObjectFactory.GetInstance<ILoggerService>();  

      _loggerService.Error("Error Occured");

Basically, if I leave out the _logService instantiation in Application_Error, I get an object reference not set error.

However it work fine in Application_End.

While I'm at it (know I should start a seperate thread).  Any good article to log application errors in Application_Error?  (I want to keep the logger out of "catch" blocks" in my classes.)   

the following does not work out so well for me (Server.LastError are

Report throwing error in on new WSS Site created from backup of existing WSS Site.



We are using wss 3.0 and SSRS 2008.

We have taken a backup of WSS site and Report server DB from server1 and restorted the same on server2.

But when we are trying to access the report on this new server(Server 2) then we are facing this error -

The item 'http://server2:12121/sites/aaram/reports/Report Library/Administrator/ReportName.rdl' cannot be found. (rsItemNotFound).

When we redeploy the report the issue gets resolved. But this does not seem like a good solution as its not feasible to redeploy all the reports again.

Can someone please suggest a solution for this issue?


IsapiModule Error 500 Issue


I am about exhausted trying to figure out this error:

HTTP Error 500.0 - Internal Server Error

Description: The page cannot be displayed because an internal server error has occurred.

Error Code: 0x8007007b

Notification: ExecuteRequestHandler

Module: IsapiModule

Requested URL: http://localhost:80/ReportServer

Physical Path: c:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\ReportServer

When I enable Failed Request Tracing Rules and view the log output I am supposing that the actual problem is in the 2nd call where there are 2 backslashes before the actual filename in the specified path:


CALL_ISAPI_EXTENSION DllName="C:\Windows\Microsoft.NET\Framework\v2.0.50727\\aspnet_isapi.dll"

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend