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

Post New Web Links

Exception loading page with Ajax enabled WebPart/UserControl ?

Posted By:      Posted Date: September 28, 2010    Points: 0   Category :SharePoint


The AjaxControl Toolkit has been configured onto our SharePoint 2007 Server, however when we bring up a page with a WebPart+UserControl, we get the following exception:


[4300] Exception Loading CPI RPI WebPart: System.Web.HttpCompileException: c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\a112516a\152cc84\App_Web_cpirpicalc.ascx.57bd6353.duu1hbuu.0.cs(138): error CS0433: The type 'AjaxControlToolkit.ToolkitScriptManager' exists in both 'c:\Windows\assembly\GAC_MSIL\AjaxControlToolkit\3.5.40412.0__28f01b0e84b6d53e\AjaxControlToolkit.dll' and 'c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\a112516a\152cc84\assembly\dl3\4bec602a\25bcac65_13efca01\AjaxControlToolkit.DLL' 


The userControl+Ajax Portion of the WebPart works correctly when brought up under ASP.NET but not SharePoint.  

Is there anyway to force this to go to the correct version?




View Complete Post

More Related Resource Links

How to get web service address in a ajax enabled page to use it in javascript


Hii everyone,

I have a requirement where I am using web service from  a server and adding that to a client

website .I have referenced the web service in my client web site  but not able to get the

address of web service. When I click on the path I get the disco file of web service and

the result is not displayed.My code is like this

</p><p>&lt;script&nbsp; language="javascript"&gt;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; function btnadd_Click() {

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var x = document.getElementById('txtA').value;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var y = document.getElementById('txtB').value;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var ans = WebService.Add(parseInt(x), parseInt(y), OnComplete, OnTimeOut, onerror);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return true;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }


Urgent Need help Ajax Page Loading Problem


Hello there...!

I am using .net framework 3.5 in my project.. and  I have used update panel in each page. And For Loading Progess bar I have used following code

    <script type="text/javascript">



        function BeginRequestHandler(sender, args) {
            var modalDialog = $find('<%= mpp.ClientID %>');
            if (modalDialog != null) {


        function EndRequestHandler(sender, args) {

            var modalDialog = $find('<%= mpp.ClientID %>');
            // get reference to modal popup using the AJAX api $find() function

            if (modalDialog != null) {



    <asp:LinkButton ID="LinkButton1" runat="server" Style="display: none;" Text="" />
    <asp:ModalPopupExtender ID="mpp" runat="server" TargetControlID="LinkButton1" PopupControlID="panLoading"
        CancelControlID="CancelButton" BackgroundCssClass="modalBackground" />

Using jQuery to directly call ASP.NET AJAX page methods

Here I am looking to explain how to call page methods using jQuery. Using jQuery to directly call ASP.NET AJAX page methods

Ajax Enabled Gridview using JavaScript in ASP.NET

Before explaining the article, I would like to thank all readers who read my article and voted for it. Your appreciation for my article gives me strength to write more good articles. Hope in future I will get your valuable comments and suggestions. Now I won't waste your time and come back to the topic. I have written this article on 'Ajax Enabled Gridview Using JavaScript in ASP.NET'. In this article, I will show you how to make a Gridview using a simple HTML table, JavaScript and XML HTTP for Ajax call without using any ASP.NET control.

Using Code

JQuery Treeview plugin is not working with Ajax page load in ie8


Hi there,

I developed a page where i m using jquery treeview plugin to generate tree. It worked fine on FF, IE8 with out ajax.

But when my page loads thro' ajax call in IE8, it is not collapsing or expanding tree.

Any idea?

Thanks in advance.

On page loading or executing all CSS flags are ignored and website is plain without formatting


 My problem is whenever i execute my app the first page that loads is the login page pointed to by my web.config file forms authentication, this page is meant to show CSS formatting for the info i am displaying but it is not. Any help with this problem would be great. A cut and paste of my problem is shown below as you can see there is no CSS.

jsfdnjldfngjfg here it is

Account Login
User Id:
Forgot Password?

I have inserted all the link as in:




Cutting Edge: Single-page Interface and AJAX Patterns


This month we begin a look at the Single Page Interface (SPI) model and some design patterns for designing AJAX applications.

Dino Esposito

MSDN Magazine May 2008

ASP.NET Proxy Page - Used for Cross Domain Requests from AJAX and JavaScript

The article ASP.NET Proxy Page - Used for Cross Domain Requests from AJAX and JavaScript was added by Aamir Hasan on Thursday, August 19, 2010.

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn't allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull content

Open different page using Ajax Modal PopUp Extender Control

The article Open different page using Ajax Modal PopUp Extender Control was added by Chintan Dave on Thursday, July 15, 2010.

You May use Modal Popup Extender to open some part of the page as Popup. But there we don't have any property to open other html or aspx page in Popup window.We can do it using IFrame control. What we have to do, just add IFrame control in Panel that

Dynamic Checkboxlist exception when adding to Panel when using Master Page


In essence, I am creating Dynamic Checkboxlist controls and adding them to a Panel.  It works well when I do not have a Master Page configure to this webpage. Once I have a masterpage congifured.. I get a "Object Reference not set to instance of object" error on the Panel_Control.Controls.Add(Checkboxlistnew) line:

protected void Page_PreInit(object sender, EventArgs e)
        XML OXML = new XML();
        alistChkBoxLabels = OXML.XMLTransform("C:\\Documents and Settings\..\\Config_new.xml", "config_options/check_box/applications/app/@name");
        int count = 1;
        alistCheckisFacility = new ArrayList();
        alIDTracker = new ArrayList();
        while (count <= alistChkBoxLabels.Count)

            Checkboxlistnew = new CheckBoxList();
            Checkboxlistnew.ID = count.ToString();
            Checkboxlistnew.Items.Add(new ListItem(alistChkBoxLabels[count - 1].ToString(), alistChkBoxLabels[count - 1].ToString()));

            String sAppName = alistChkBoxLabels[count - 1].ToString().Trim();

            alistCheckisFacility = OXML.XMLTransform("C:\\Documents and Settings\\Administrator\\My Documents\\Visual Studio 2005\\WebSites\\User_Trial\\Config_new

Page.FindControl Causing Null Reference Exception


Hi guys,

I developed a page in VWD 2008 and it works perfectly locally, but when I deployed it on the server every Page.FindControl() call is causing the NullReference Exception "Object reference not set to an instance of an object. " Can anyone help me out? Code is below


Mike Marshall

            For i As Integer = 1 To 10
                If (CType(Page.FindControl("last_" & i), TextBox).Text.Length > 0) Or (CType(Page.FindControl("first_" & i), TextBox).Text.Length > 0) Or (CType(Page.FindControl("dob_" & i), TextBox).Text.Length > 0) Then
                    Dim person_entry(7) As String
                    person_entry(0) = info_list.Count - 1
                    person_entry(1) = CType(Page.FindControl("last_" & i), TextBox).Text
                    person_entry(2) = CType(Page.FindControl("first_" & i), TextBox).Text
                    person_entry(3) = CType(Page.FindControl("dob_" & i), TextBox).Text
                    person_entry(4) = CType(Page.FindControl("appear_" & i), TextBox).Text
                    person_entry(5) = CType(Page.FindControl("mental_" & i), TextBox).Text
                    person_entry(6) = CType(Page.FindControl("behave_" & i), TextB

Separate sessions in browser tabs together with an ajax enabled web site


I want my tabs in my browser to have separate sessions. I  was told to use

<sessionState mode="InProc" cookieless="UseUri"></sessionState> in web.config

 but when I read about it here: http://msdn.microsoft.com/en-us/library/h6bb9cz9(v=VS.100).aspx

the text says "When you configure an AJAX-enabled ASP.NET Web site, use only the default value of UseCookies for the cookieless attribute. Settings that use cookies encoded in the URL are not supported by the ASP.NET AJAX client script libraries."

I'm using Ajax so are there any ideas what I can do about this problem.

$.ajax post from asp.net page and __viewstate causing call to fail



Now I know that I won't be sending viewstate and eventvalidation in my ajax calls and that I will only want to send the actual form fields for efficiency purposes but I will need to know the answer to this question, to inform the more junior members of the team and my manager, so if anyone has any answers they are most welcome.

I have a simple form as follows

<form id="form1" runat="server"> 
<p>Field1: <

With Anonymous access disabled, is there any way to use an AJAX-enabled WCF Service?

I have a website where anonymous access is disabled but I want to user an ajax-enabled WCF service. Configuring the service's binding security to use "TransportCredentialOnly" with clientCredentialType="Windows" seems like the obvious thing to do; indeed, many posts in various places suggest this approach. Unfortunately, however, it doesn't work. I always get the error "Security settings for this service require 'Anonymous' Authentication but it is not enabled for the IIS application that hosts this service." How can I configure the service to function correctly. I'm running IIS 7.5 with .Net framework 4.0. Thanks.

Usercontrol, in master page, calling a method on the main page?

I have user control called 'Header.asxc' that is registered in my master page. That user control has an image link. The clicking of this link needs to cause a dropdown on the main page to repopulate. I am comforable with delegatges, with populating the dropdown etc... My problem is I cant find the usercontrol from the page, in order to set the function event. I got this work previously when the user control was registered on the page in question but this case with the master page  has me confused. Here is a summary of the set up. 1. I put this in the Header.ascx usercontrol that is registered by the Master page. public Delegate locReloadCompanyDropdown;2. Further down in that page in the relevent _Click event, I put this. locReloadCompanyDropdown.DynamicInvoke();3. Back in the main page I declared these.. public delegate void reloadCompanies(); private event reloadCompanies doReloadCompanies;4. Finally I try to set the delegate doReloadCompanies += new reloadCompanies(PopulateCompanyDropdown); //Page.Header.locReloadCompanyDropdown = doReloadCompanies; //Header.locReloadCompanyDropdown = doReloadCompanies;You can see a couple of attempts I have made remarked out in the code above. Neither work. What am I missing here? Thanks all.  

How to Create Page layout only for webpart zone

HI Guys, I want to Create Page layout for Publishing site in SP2010 so do i need to create Page Layout Based on Page content Type ? i have created page layout based on Page content type but when i save page i got error Invalid SPListItem. The SPListItem provided is not compatible with a Publishing Page. Please assist me.   Thanks Ronak Thanks Ron

Add webpart programmatically to page in sharepoint

Hi How to add webpart programmaticaly in sharepoint ? CheersMomo
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