Wednesday, March 28, 2012

Asp.net Ajax Toolkit

Hi, i'musing Ajax 'DynamicPopulateExtender' to show the search results on my page. This is working fine when the search has results. errors 'Web service call failed : 500' when no results found. Can someone help me out?

Hi,

According to your description, this is quite probably caused by your code in the web service. It would be easier to solve it if you debug through the web method since we don't have any idea how your code goes.


Thanks. This is occuring bcz of unhandled exception in the webservice code.

ASP.NET Ajax Timer

Greetings,

i want to implement ajax timer so it will update an updatepanel every five seconds based on a certain codition so i try the following:

<div>
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true">
</asp:ScriptManager>

</div>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
</ContentTemplate>
</asp:UpdatePanel>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick" />
</Triggers>
<asp:Timer ID="Timer1" runat="server" Interval="5000" OnTick="UpdateTime">
</asp:Timer>

in the code behind i write the folowing:

protected void Page_Load(object sender, EventArgs e)
{
Label1.Text = DateTime.Now.ToLongTimeString();

}
protected void UpdateTime(object sender, EventArgs e)
{
if (new Random().Next(0, 4) == 1)
{
UpdatePanel1.Update();
}

}

so what i notice that every five seconds the tick event will happen and the updatepanel1 will be updated regardless of the condition that i implement it in the UpdateTime method ,what is logic since the tick event happens.

so how can i solve this problem??

your help is highly appreciated

best regards

I tested your codes in Visual Studio .Net 2005 with Ajax RC 1.0.Try to change some of your codes as the following and it should work fine.
<div>
<asp:UpdatePanel ID="upnlTimer" runat="server" ChildrenAsTriggers="false" UpdateMode="Conditional">
<ContentTemplate>
<asp:Label ID="lblTimer" runat="server" Text="Date Time"></asp:Label>
<asp:Timer ID="Timer1" runat="server" Interval="5000" OnTick="Timer1_Tick">
</asp:Timer>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick" />
</Triggers>
</asp:UpdatePanel>
</div>
Wish the above can help you.

Thank you for the support

so what i add only the

<asp:ScriptManager ID="ScriptManager1" runat="server" />
<div>
<asp:UpdatePanel ID="UpdatePanel1" runat="server"ChildrenAsTriggers="false" UpdateMode="Conditional">
<ContentTemplate>
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
<asp:Timer ID="Timer1" runat="server" Interval="1000" OnTick="UpdateTime"></asp:Timer>
</ContentTemplate>

</asp:UpdatePanel>
</div>

so when i place the timer control within the contenttemplate of the updatepanel so i dont need to put the timer control within the triggers of the updatepanel

so what i conclude that it will not work if i place the timer control outside the update panel.

ASP.net AJAX throws errors in some browsers

These browsers are:

Mozilla (latest version)
Seamonkey (latest version)
Netscape (latest version)

See this error message:

AJAX error in diverse browsers

Has anyone encountered the same problems in the mentioned browsers? I couldn't check Mac browsers, any known issues in Mac browsers would be interesting too.
Any other browsers that don't like the asp.net AJAX?

This is normallly because you modify the response by using Response.write.Make sure you use a Literal control instead of using response.write.

Mac browsers will have the same error.

It's also possible that the error is caused by Tracing where the pageoutput is set to true. You must set that to false.
<traceenabled="true"requestLimit="128"pageOutput="false"traceMode="SortByTime"localOnly="false"/>


Hi Richard,

thanks for your reply. So I may not use <%= WhateverString %> neither, right? I can't use Response.Write in my code behind files and neither in the "HTML" source code, is that what you are saying?

Steve


Hi Steve,

Yes that is what I meand. I hope it helped you.


To be clear, <%= is just an alias for Response.Write; so there's no differnece at all once it compiels. If it helps, you *can* use Response.Write, just not inside an UpdatePanel, nor as part of any code that will be subject to responding to an update panel's asynch postback.

Asp.net ajax support SSL?

Hey, I released a ajax-based project on live server recently, everythings is fine. (Asp.net ajax v1.0)

But when I turn on the SSL tunnels on app's virtual directory, Ajax doesn't work any more.

for example, a GridView paging functionality within a UpdatePanel, after a long-time loading, it throws timeout exception at client side. (same func works fine under non-SSL).

Can someone give me a tips about how to make Ajax work under SSL? All reply is appreciate!

helo.

are you mixing http with https on the same site or is everything running in https? btw, can you put the stack trace here?


code is very very simple, just GridView paging func under UpdatePanel.

only popup a alert window. here is the screenshot.

Error screentshot


hello again.

hum, can you use fiddler to see what is being send to the server?

ASP.NET AJAX Showcase image rollover ?

I was wondering if anyone knew how the image roll-over was accomplished on the ASP.NET AJAX Showcase page?

http://ajax.asp.net/showcase/default.aspx?tabid=47

Thanks

http://forums.asp.net/1671436/ShowThread.aspx

Prior to making your own post, I recommend searching the forum for existing posts which may answer your question. Smile

ASP.NET AJAX scripts weight

Hi, I'm working with a extremely high bandwidth sensible servers (more than a million pages views per day) and I want to know about the convenience of working with ASP.NET AJAX.


I've seen that everypage with ASP.NET AJAX downloads a JS file (webresource) of more than 80Kb (compressed)... and 80Kb x 1.000.000 = 80 Gb/day...


On the other hand, I know that the user experience is improved, but... what about the server performance?

I only want to know your experiencies on this way: bandwith and server performance with high charge servers.

Well, it's actually 3 files, totalling 134,473 KB, though I checked it w/o GZIP turned on, so I'm not sure how much you gain with it; one of the three doesn't have the whitespace, etc removed already. For argument's sake and round numbers, let's call it 100KB / page.

So, to your point, that's x 1,000,000 so you're looking at 100 GB/day. IF every one of those page loads is a unique user.

Don't forget, if a user navigates within your site, or has been to your site before, their browser should cache those js files and therefore they'd only get hit with that download the first time they come to your site or if they've cleared their cache.

Further, not only is user experience improved, but take a basic webform as an example. If you have a 8 KB page with a form on it, and the user submits said form, then on a normal postback the whole page is served again (all 8KB). If you wrap that form in an updatepanel, then only the form itself is served in response (probably something around 10% of the total page's markup, etc, once you strip out headers, script tags, other sections of the page, and so on). If you forego the updatepanel and write custom js that hits webservices and so on instead, you can potentially reduce it even further (having the web service respond with just the "Everything's great!" message, for example).

I've honestly not done an impact analysis on many small requests, vs. few big ones, so that's an open item for you to investigate, but from a bandwidth perspective, I think you're overall in better shape, unless you have a lot of visitors that are 'first time' visitors from the .js file download perspective.

ASP.NET AJAX ScriptManager

Hi,

I am a total newbee to whole AJAX as well as Javascripting in general. I just installed the ASP.NET AJAX Extensions and Toolkit and I was watching couple of videos on this site. The first video mentioned something about only having 1 instance of the ScriptManager..?

This is how we develop at the moment. We have a general page on which we just drop ASCX (User controls). Each control has thus it's own Load event and all along with it's own design with few controls in it.

So where do I need to drop this ScriptManager control? On every ASCX file?

Cheers,

Nirav Patel

Nirav,

If you have a MasterPage in your website, and you'll be using AJAX on every page then the MasterPage is theonly place where you would drop the ScriptManager control.

Otherwise, you would drop the ScriptManager control to your "general".aspx page.

Let me know if you need more info.


Thanks for a quick reply.

We don't have a master page type of setup nor we have a general page.

What we have is a template where we define section of the page like "header", "content" (this might have "left" for menu, "middle" for contect, "right" for ads), "footer". Then ASCX are inserted into those sections as required.

So can I just modify the template and add the ScriptManager at the top?

Cheers :)


niravpatel:

This is how we develop at the moment. We have ageneral page on which we just drop ASCX (User controls).

The term 'general page' I used because you used it in your original post.

The fact is that there can only be one instance of ScriptManager control per page. This is why you must place the ScriptManager control in a parent .aspx page. If the user controls need to reference a script or a service, then you can use ScriptManagerProxy control in your .ascx controls.


Hiniravpatel,

You should add it after the <form> tag.

<html>
<headrunat="server">
<title></title>
</head>
<body>
<formid="form1"runat="server">
<asp:ScriptManagerID="ScriptManager1"runat="server"></asp:ScriptManager>
</form>
</body>
</html>

Otherwise you will get the following error:

Server Error in '/' Application.
------------------------

Control 'ScriptManager1' of type 'ScriptManager' must be placed inside a form tag with runat=server.

Cheers,
Al

Asp.Net Ajax Script Library Books

Hi. I think it's going to be quite hard to find books that wil cover only the client-side part of the Asp.Net Ajax Library, but I'm looking for, at least, some books that will have a great emphasis in the client-side part. Can anyone suggest some books that will target the client-side part of the Asp.Net Ajax Library?

ASP.NET Ajax in Action covers the client-side library pretty well. Have a look at the sample Chapter 2 here:http://www.manning.com/gallo/


Hi. Just finished reading the Chapter 2 of ASP.NET AJAX in Action.
This book appears to be a serious one! It's very well written.

But in case someone else have read another good book that target the
cleint-side library, please post here.


Have a look at

Programming ASP.NET AJAX http://www.oreilly.com/catalog/9780596514242/

ASP.NET AJAX Sample applications - SimpleList

Hi,

I also just started learning ASP.NET AJAX for real and I wanted to check out theSamples that one can download. I thought using the SimpleList would be the easiest but I soon found out that when you want to run the DragOverlayExtender began complaining. Seemed the web.config isn't complete. I added these extra lines in order to get it to work:

 <profile> <properties> <add name="dragOverlayPosition"/> </properties> </profile>

and

 <profileService enabled="true" readAccessProperties="dragOverlayPosition" writeAccessProperties="dragOverlayPosition" />

I hope this helps other people out that are just starting to play around with the samples

If you like to read more about it...

Grz, Kris.

Thanks for sharing Kris...Please continue to do so.

Salute,

Mark Wisecarver

asp.net ajax refresh the UpdatePanel every 30 sec?

I am currently using Timer control inside my update panel to update automatically every 30 sec. However i wanted to use json to do the same thing.

Any suggestions?

Thanks

Hi,

JSON (JavaScript Object Notation) is a lightweight data-interchange format, or it can be viewed as a protocal defining how object is serialized when transporting.

It can't be used to perform actions at a certain interval like Timer.

Please refer to this for more information:http://msdn2.microsoft.com/en-us/library/bb299886.aspx

Hope this helps.

ASP.NET AJAX RC on PROD server is not working

Hi

I have a sample ASP.NET AJAX application built using ASP.NET AJAX RC. it AJAXes and it does behave as expected on VS 2005. When i deployed it on my local server. It does not AJAX and get the following javascript error

Error:'Sys' is undefined

am running XP Pro, SP2 & IIS 5.1. earlier i had not installed any beta releases or ATLAS. i dont see what is going on.

thanks in advance for the help

Anil

7 pages of posts just like this, lots of solutions and things to try in there

http://forums.asp.net/thread/1498667.aspx

ASP.NET Ajax Progress Bar Revisited

I'm trying to create a Progress Bar that keeps track of a long running server-side process. I'm attempting to do this by having a primary ajax request start the server-side process, then having another polling function occassionally call back to the server via ajax to return the status if the server-side process started with the first ajax call. The problem is that the second ajax call doesn't return until the first one is completed.

Consider the following client-side code:

PageMethods.Execute(ExecuteCallback);

intervalId = window.setInterval(ExecuteStatus, 1000);
var done = false;

function ExecuteStatus()
{
PageMethods.ExecuteStatus(ExecuteStatusCallback);
}

function ExecuteStatusCallback( status )
{
<update progress bar>
if( !done )
window.setInterval( ExecuteStatus, 1000 );
}

function ExecuteCallback()
{
done = true;
}

PageMethods.Execute() is a server side process that can take a considerable amount of time. As it executes, it is setting a Session variable which indicates the status and completion percent of the process.

PageMethods.GetStatus() is a simple server side function which reads the aformentioned Session variable, and returns the status to the client.

The problem is that PageMethods.GetStatus() doesn't return until PageMethods.Execute() has completed and called back to the client.

Any ideas how to make this work?

Thanks much,

- Stew

I think you mean setTimeout instead of setInterval. Here's a working example. I hope this helps!

<%@. Page Language="C#" %><%@. Import Namespace="System.Web.Services" %><%@. Import Namespace="System.Threading" %><script runat="server"> [WebMethod] public static void Execute() { Thread.Sleep(5000); } [WebMethod] public static string ExecuteStatus() { return "."; }</script><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" ><head runat="server"> <title>Untitled Page</title></head><body> <form id="form1" runat="server"> <asp:ScriptManager ID="sm" runat="server" /> <input type="button" value="Execute" onclick="DoExecute(); return false;" /> <span id="status">Ready.</span> </form></body><script type="text/javascript"> var done = false; function ExecuteStatus() { PageMethods.ExecuteStatus(function (result) { if (done) { $get('status').innerHTML = "Done!"; } else { $get('status').innerHTML += result; window.setTimeout(ExecuteStatus, 1000); } }); } function DoExecute() { done = false; PageMethods.Execute(function () { done = true; }); $get('status').innerHTML = 'Executing'; window.setTimeout(ExecuteStatus, 1000); }</script></html>

Steve, thanks for the response. Yes I did use setTimeout; I made a mistake when I typed the message above. I'm not sure why your test would work and not mine, but I'll take a look when I get home on Monday.

Thanks again

- Stew


Steve,

Try setting a session variable in your test before executing the test. This is what appears to be causing the problem.

- Stew

ASP.NET Ajax Probelm

has anyone else tried viewing a page that has an updatepanel in different browsers like Opera. It doesn't work I get the following exception

Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed.

might be something that the team wants to look into. I dont' have a probelm with firefox or netscape

hello.

if i'm not wrong, opera isn't fully supported yet (though i'm really hoping that it is when the release version gets out)

ASP.NET AJAX PageMethods

I would like to call a server side method from javascript, and have read that this is where PageMethods comes into the picture.

I would like to call my method when a Virtual Earth map onLoad event has fired.

I have problems with PageMethods as the method called serverside has to be shared and therefore i cannot reference my controls.

Is there other options ?

You can't access page controls in a page method, because a page method request doesn't transmit ViewState or run through the page life-cycle to create the controls.

If you really need to reference the controls, you canuse an UpdatePanel and __doPostBack to trigger a partial postback (which does allow you to reference the controls).


You can also pass clientside state through parameters if needed.

ASP.NET AJAX on non-Windows platform

There is a strong implication that ASP AJAX can be used on a non-Windows platform, such as Linux. I downloaded the .zip file and un-zipped it. The resulting JavaScript is tightly compressed and thus unreadable. Where can I find the API (loosely speaking); or, in other words, how can I use it?

Hi,

the Microsoft AJAX Library, just a zip file with several .js files in it, contain the client sideframework of ASP.NET AJAX. All the .js files also come with their debug counterpart which have .debug.js in their name.

Maybe some interesting article for you is to usePHP together with the Microsoft AJAX Library.

Grz, Kris.


Thank you. The info in that article was the missing link. I've yet to try it, but I'm sure it will work.

Now that I've had time to check it out, that paper is a little too simplistic. I downloaded and ran the PHP samples, and once I figured out how to tell my web host that it was PHP 5, not 4, they ran just fine.

Unfortunately, I don't know how to move beyond the simple "Hello World" page to somthing more useful.Some explanation of what's going on in HelloService.php and PersonService.php would be very helpful. Or how about converting the ToDoList demo to PHP MS AJAX? That would offer some meat to chew on.

Thanks in advance for the help!

ASP.Net AJAX on hosted server

Forgive my ignorance here, I've goggled extensively and looked through the forums here and have not found an answer to my question. I'm hoping to play around with ASP.Net AJAX on a hosted server here on campus, however, I don't have permissions on the box to install the AJAX extensions. I believe that I am out of luck here, but I just wanted to check if I had any options other than running the off my local machine. Thanks!

You should be able to put the AJAX .dll file in your bin folder just like with the ATLAS setup. I have set AJAX up on a hosted server in this manner without problems, or installing anything in the server's GAC. The .dll files are installed into your local GAC by default, but are also placed on your local machine. Mine were in Program Files\Microsoft Asp.Net\AJAX Extensions or something close to that (I'm not at home so I can't check). Just make sure you have your web.config setup properly it should work. If you do have the AJAX stuff installed into your local GAC you will get an error when testing locally because all the classes will be duplicated. I resolved this by only placing the .dll file in the bin folder on my server and letting the my local GAC serve up the classes when testing locally. The only other problem I ran into was because one of the server's I tried had restrictions on accessing parts of the .Net framework, specifically I couldn't use Reflection which is used by AJAX Extensions. Hope this helps.
Seriously, people.. There are probably 50 posts here that re-iterate the same about this problem.. OMG...

Thanks for the replies, sorry for not seeing this elsewhere... I've got it working now, the problem that i was having, so far as i can tell, was that the web.config that i had in the root of the application was not configured for AJAX... the web.config that i had in the same folder as the AJAX enabled page was the one that i had added the appropriate lines to, once i changed the web.config in the root of the app, all was well.

Sorry for wasting anyones time...

ASP.NET Ajax on GoDaddy?

Does anybody know if GoDaddy has installed the ASP.NET Ajax v1.0 yet?

When Ajax was released, on the second day I emailed GoDaddy and asked, they said they have not install it yet and do not know when. I hope GoDaddy will install it soon else I have to move all five accounts off their server and go somewhere else.

*disappointed ~ would love to see the new ajax running

Aeries

From my understanding, you do not need AJAX installed on the server you will be using. Just add the Ajax dll's inside of the bin folder. I also uploaded a new AJAX project I just completed on our production server and it worked. Im 100% sure that doesnt have AJAX installed on it.

Hope this helps.


For that to work (copying to /bin), your application needs to be running under full trust. I really doubt GoDaddy allows that.

GoDaddy definitely don't allow apps to run under fulll trust - it's set to medium trust. As far as when they will install the AJAX components? The response I received from them was: "Unfortunately at this time we are unable to say when we are going to update our servers to support ATLAS. I apologize for any inconenience this may cause." I received this response on the 26th of Jan, so it's recent. (Can you believe they are still calling it ATLAS?!).

I'm starting to become seriously concerned about the adoption of ASP.NET AJAX by hosting providers. I have now tried to convince 3 different hosting providers to install it but all responses have been negativeSad

There are some providers who do support AJAX though - DiscountASP [http://www.discountasp.net/ ] and webhost4life [http://www.webhost4life.com/ ] but I really don't want to have to choose a provider just because of this one AJAX library.

Jits


First of all,

I did try putting all the DLLs in the bin. Some functionalities work, but others do not, because of the medium trust that is set for the account(s). GoDaddy does not and will not set your account runs as full trust, because it will violate their policy; unless you buy a dedicated server from that. *That is very disappointed.*

I have searched for hosting providers who already installed AJAX, however, their price isn't as good as GoDaddy. I think I will give them a little more time.

I think if all of us keep emailing them about the AJAX (not ATLAS anymore), hopefully they will understand how important it is to install Ajax on their server for their customers who are using it.

I will shoot them another email February 1st again. I will update with you all.

Aeries


Hi,

I just would like to help!

I guess if you're looking for a nice service provider, even better than webhost4life, you should go towww.micfo.com!

They have asp .net 2 and all their plans support unlimited add on domains and I guess they have full trust security level, so you can easily use ajax on their servers...

Regards,

HRS


Okay, I dropped GoDaddy another email this morning. Here's what i wrote:

Dear GoDaddy,
I have written to you regarding this ASP.NET Ajax v1.0 last month. I did get a reply from your department; however, the problem is not resolved yet.

ASP.NET Ajax v1.0 has been fully released by Microsoft last Month 01/23/2007. It is a major role for web developers and it's something new that drives us forward.

Many people sign up with GoDaddy, because of the price and great customer supports. The most important thing is GoDaddy is very technology wise. You have all the new technologies that developers need to run their applications, like .NET 2.0 Framework, SQL, etc….

I know that you will eventually install the ASP.NET Ajax v1.0 on your Windows Hosting Servers sometimes in the future; but why not now? There are many developers who are anxious to run their new applications on your servers, including me.

Many hosting providers already support ASP.NET Ajax v1.0. We hope that you do the same for everybody who is impatiently waiting. We don't want to pack and move and you don't want us to move either.

Please let us know when ASP.NET Ajax v1.0 will be installed at www.asp.net, on your eNews page, a good place is within this thread: http://forums.asp.net/thread/1556314.aspx. You also can search for "GoDaddy" at that website to see others who have problems with GoDaddy. There are already recommendations of other providers who support ASP.NET Ajax.

Thank you again.

They replied:

Dear Xxxxxxxx

Thank you for contacting Online Support. We are not able to provide a specific date for when this will become available. It will be listed on our website when it is available. If you have any other questions or concerns, you may contact us at any time.

Please let us know if we may be of further assistance.

Sincerely,

Beth P.
Online Support Technician

It looks like they don't know when it will be. But looks at this site if you're eagering to get your Ajax website running. www.webhost4life.com. I went down their "Advance Plan" for Windows Hosting plan, and it looks like they have everything that a developer needs. .NET Mobil, SQL 2005 for FREE, .NET 3.0 ... everything. The only thing is, the price isn't as good as GoDaddy.

I might consider them if my project is done and GoDaddy hasn't install the Ajax yet.

Aeries


Reply on Wed, 7 Feb 2007

"Hello.

ASP.NET AJAX is not installed in our Windows shared hosting environment. We are currently evaluating how best to support these new libraries. By default, they require Full Trust to execute, which introduces potential security risks that must be mitigated before we can deploy AJAX support.

Thank you for contacting customer support.

Sincerely,

Mike
Customer Support"


FYI, that's untrue. ASP.NET AJAX requires only Medium Trust, which is probably what they're already running people's sites under.

I'll ping the folks here at Microsoft and make sure someone from Microsoft is talking to GoDaddy about the technical details. (I'm sure they are, and it just hasn't filtered the whole way to their support team yet.)


If it's medium trust, does that mean that the DLLs can be run from the BIN folder?

by the way, if anyone is wondering ifwww.1and1.com has ajax installed, the answer is yes. I emailed them two weeks ago and they just replied today.


Trywww.dhosting.co.uk

They've got excellent deals, have AJAX, .Net 3.0 and the support is excellent. I was reffered to them from this forum, and have been very pleased. Thanks Chris!


It's Medium Trustif the binaries are installed in the GAC.

If they're in the /bin folder, then Full Trust is required.

FYI, Microsoft folks are working with GoDaddy.


Steve,

You're the best! Cheer.

Can't wait for them to get it installed.


I have the solution for you!

Place the following dlls from C:\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025 into your applications bin.

AJAXExtensionsToolbox.dll
System.Web.Extensions.dll
System.Web.Extensions.Design.dll

They came with the new install of AJAX.

Also we have to make sure that in our web.config under assemblies the PublicKeyToken portion is all Caps!

Good
PublicKeyToken=31BF3856AD364E35
Bad
PublicKeyToken=31bf3856ad364e35

You do this and it will work on godaddy.com sites!


SERIOUS? I gotta try it out.

ASP.NET AJAX Obfuscator?

Is there any such thing? or ASP.NET Javascript Obfuscator!!!

Please help me out here!

hmmm....no such thing?

ASP.NET AJAX not working in IIS 6.0

I have a scenario where my AJAX application is not working in IIS but is working correctly in ASP.NET Development server. I dont understand the difference between these two except for the context in which the application runs. Am I missing any setting. I tried checking web.config and reconfirmed it to be correct when I found this application working on ASP.NET Development server.

help me in this-----

Hi,

first: AJAX working on IIS 6, i have a production application in this environment without any problems.

Have you got installed the ASP.NET AJAX framwork or have you only copy the DLL into the bin directory?

What kind of error messages comes up? Can you explain the errors you have?

Have you setup the application inside the IIS correct, configured the right ASP.NET Version?

Regards
Marc André

ASP.NET AJAX not working for me??

Hi,

I am having a problem that is driving me crazy. I currently have my ASP.NET 2.0 website hosted with a hosting company and they claim to have AJAX extensions installed on their servers.

I created an asp.net page, put a simple label and button in an UpdatePanel, set the updatepanel to "Conditional", and yet is still causes a full page refresh when the button is clicked. I tried uploading the same exact page with same web.config to another web server I have and it worked properly there. What could be wrong with the hosted site and how can I fix it?

To further test the hosted site, I added some Controls from the Ajax Control Toolkit, such as Collapsible Panel, and that seemed to be working correctly even though the updatepanel is not. I even uploaded the DLL's to the bin folder.

What else can be causing this problem? I even have a different subdomain with the same hosting provider that seems to be running this page correctly. What settings can you think of that I should mention to the hosting company to fix them. I already alerted them of the problem and they believe they are doing everything correctly and that the problem lies on my side (which makes no sense to me since I know the code is fine since it runs perfectly on other servers).

Please help. Thank you.

First question I would ask is what version of ASP.NET Ajax do they have installed. Methods have moved to different assemblies over time. v1.0.61025 is the latest.

However, you also do not need to rely on them. You can include the DLL necessary and simply reference that from your project. You don't need to rely on GAC installed assemblies. Check your installation on your system for the System.Web.Extensions.dll and reference it. I think you also should remove the web.config lines that refer to the GAC entry. <add assembly= ......, but I haven't tried that to see if is necessary. If they don't have it installed properly, it may cause an error.


Ok, here's the deal. The hostnig company has the latest AJAX installed on their servers. In fact, I have about 5 websites hosted with this company (all on the same server). AJAX is working on 4 websites - just not working on on one site (for exapmple domain5.com). However, if I was to create a virtual directory pointing to that website it works (for example:www.domain4.com/domain5).

Similarly, I have AJAX working on domain4, but if I have a virtual directory on domain5 pointing to it (such aswww.domain5.com/domain4) then it does not work.

What can be causing this problem? I am thinking there must be a setting blocking AJAX on that domain/website. I noticed that this website has Frontpage Extensions installed. I don't know if that has anything to do with AJAX but I uninstalled it anyways and still doesn't work. Is there anything else - any settings or anything - that I should check that may be causing this problem.

Thanks.


We are having the same issue. Ajax won't work in virtual directories inside of other virtual directories. Have yet to figure out the solution. If anyone has any ideas post them please.

Thanks.


Neither one of you mentioned that you had any errors. However the most common cause of it not working is that the Virtual directory has not been made an Application in IIS. Use IIS to "Create" the application.


Yes, the sub application is set at an application. There are no errors, ajax just doesn't work. It just does full postbacks.

If you take the sub-applcation and remove it from being a "child" app...then it works perfectly. It just doesn't like being nested in another application.


Can application mapping be the cause of this problem. I currently have IIS application maps that cause .html and .xml pages to be run by the .NET framework. Is it possible that this can prevent AJAX from running in any way?


Since I had never tried nested virtual directories, I did a test on localhost using a physical directory created as an application. Inside this I put a virtual directory mapped to its own physical directory (created as an application by default). As another layer, inside this virtual directory, I put a virtual directory mapped to a third physical directory (also created as an application by default). All three function with a variety of Ajax tests including an UpdatePanel. I therefore doubt that common nested virtual directories are the root cause of the problem, unless there is a specific difference in Windows 2003 Server (which I doubt). I'll fire up my server and repeat it if that is suspect.

One thing I had to make sure of with the 2 virtual directories is that the mapped physical directories have to have permission added for the ASPNET user (XP), (or Network Service on server 2003). Otherwise I got a server 500 error after a request for authentication. Since you don't have errors, that is not the problem, but it is another aspect to keep in mind when mapping virtual directories.

However in reviewing the dialog above, there is a bit of confusing information in that two different types of virtual directories are being talked about. A virtual directory that maps to a physical directory on the same server (or even a UNC on another server which involves harder to set up permissions) are the common type. However a virtual directory which maps to a different URL is a re-direction and uses a different sequence of HTTP requests to get to the new directory. Maybe you could clarify how these are mapped if you know (hosting company may hide the implementation)

It is not necessary to have nested virtual directories of the former type for even a complex site. In two large corporations that I have worked at, we didn't have any nesting as there is no need to. You can create as many directory layers as you want before creating the last one as a virtual directory and your web site can have as many virtual directories as you want at the root or lower without any nesting necessary. The level at which an application is created in independent even though it is created by default on a new virtual directory. In a hosted environment it seems to me that the main method for separate domains is different web sites each with it's own applications and physical or virtual directories. So the shared hosting environments must use tricks to point to web sites. The key is getting to the bottom of how this works.

Other than that, if only the UpdatePanel is not working, that seems specific to a DLL loading (or not) and the suggestion that the directory Application is not configured properly is relevant. This should be correctable by deleting the virtual directory and recreating it (being careful to insure permissions for the physical directory are set)

If you want to go further, post the code you used and put it on the suspect web site along with a fresh copy of the template web.config. Send the URL (privately if you want) because I can analyze it with various tools and see what is actually happening when you hit the site.


I think I finally pinpointed this problem. It appears that my site at virtual directory domain1.com/ajaxvirtualdirectory is using the web.config file from the domain1 root directory (although I can't understand why). And when I access it from domain2.com/virtualdirectory it is using the domain2 web.config. Does that make sense?

I know this worked because I temporarily deleted the web.config from domain1 and replaced it with the web.config from domain2. Problem is, I still need the info from the original web.config so what fields do I need to include in the web.config to make AJAX work - or is there anything I can have in there (such as sessionstate=false or anything else). I tried combining the 2 but that didnt work.

Here;s what my web.config looks like

<configuration><!-- application specific settings --><appSettings><add key="ConnectionString" value="server=MYSERVERNAME;database=MYDB;uid=MYUSER;pwd=MYPW;"/><add key="FileDirectory" value="C:\MYFILEDIREC"/></appSettings><!-- forms based authentication --><system.web><compilation debug="true"><compilers><compiler language="vb" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" extension=".VB" compilerOptions="/define:Debug=True /define:Trace=True /imports:Microsoft.VisualBasic,System"/></compilers></compilation><!-- enable Forms authentication --><authentication mode="Forms"><forms name="MYFORMAUTH" loginUrl="login.aspx" protection="All" path="/"/></authentication><!-- enable custom errors for the application. Change mode to off to see what error is. RemoteOnly to hide errors --><customErrors mode="Off" defaultRedirect="Errors.aspx" /><!-- disable session state for application --><sessionState mode=""/><globalization fileEncoding="utf-8" requestEncoding="utf-8" responseEncoding="utf-8"/><xhtmlConformance mode="Legacy"/><pages><namespaces><add namespace="Microsoft.VisualBasic"/></namespaces></pages></system.web><!-- set secure paths --><location path="PAGE1.aspx"><system.web><authorization><deny users="?"/></authorization></system.web></location><location path="PAGE2.aspx"><system.web><authorization><deny users="?"/></authorization></system.web></location><location path="PAGE3.aspx"><system.web><authorization><deny users="?"/></authorization></system.web></location></configuration>

ASP.Net AJAX ModalPopupExtender: How to Trigger Function from the Page CodeBehind

I have a function named"btnSave_Click()" located in the codebehind of a page. The function is associated with the
click event of my button named"btnSave". It saves the values of the controls in the page to the database.

When i have added a ModalPopupExtender and associated the value"btnSave"to theOkControlID property
of the ModalPopupExtender, the popup control was displayed as i have configured it but my routines inside
thebtnSave_Click()were not anymore executed.

How can i resolve this? How can i execute a function in the codebehind of my page after clicking a button
associated with the ModalPopupExtender? I am familiar with theOnOkScriptproperty of the popup extender
but as I understand, it can only execute a script within the same page and not my codes in the codebehind.

Thank you very much.

Hi,

When a button is set as the OKControl for a ModalPopupExtender, the Extender will intercept its PostBack behavior, and just close itself when the Button is clicked.

As a result, the server side function isn't able to run.

So, please don't specify btnSave as OKControl.

Hope this helps.

ASP.Net AJAX messing up my code and not known element???

I am trying to add AJAX Version 1.0 to an existing site and I believe I have added everything needed to the web.config file. Installed the AJAX Extensions in the GAC and added the AJAX Toolkit to the VS 2005 Toolbox.

When I drag AJAX items into my aspx pages I get red Squiggly Lines on the ScriptManager and UpdatePanel.

I just added a RequiredFieldValidator and it tells me that it is also not a known element.

Also I have noticed some strange new attributes in my html e..g.__designer:wfdid="w2"

What is going on, could somebody help me out, thanks, newbie

I forgot to mention that I am using Master and Content pages. When I add the AJAX Extensions such as ScriptManager to the Master page I have no red squiggly lines. I guess I have to add <form> tags to my content pages to make this all work.

Not true, I tried it and the red squiggle lines are gone but the page does not show up correctly. Basically the content page portion does not get displayed . So adding the <form> tag to the content page is not the solution.

What am I doint wrong?? Newbie


Fixed - here is a helpful article.

http://ajax.asp.net/docs/tutorials/UsingUpdatePanelMasterPages.aspx

asp.net Ajax MaskedEditExtender

I am trying to use a MaskedEditExtender in a Gridview, with a Date/Time Template Field.

When i enable the Extender, then when i choose to edit the row, nothing appears. As soon as i Disable the extender than the edit boxes appear.

Any ideas?

<cc1:MaskedEditExtenderID="MaskedEditExtender3"runat="server"MaskType="DateTime"AcceptAMPM="true"

AutoComplete="true"ClearTextOnInvalid="true"mask="99/99/9999 99:99:99"

Enabled="False"TargetControlID="TextBox1">

Hi Kevers,

To see the effect, MaskedEditExtender's Enabled is set to "true". Here is a sample which you can reference to.

<form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1"> <Columns> <asp:CommandField ShowEditButton="True" /> <asp:BoundField DataField="EmployeeID" HeaderText="EmployeeID" InsertVisible="False" ReadOnly="True" SortExpression="EmployeeID" /> <asp:BoundField DataField="LastName" HeaderText="LastName" SortExpression="LastName" /> <asp:BoundField DataField="FirstName" HeaderText="FirstName" SortExpression="FirstName" /> <asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" /> <asp:TemplateField> <ItemTemplate> 2007-10-04 10:20:30 </ItemTemplate> <EditItemTemplate><asp:TextBox ID="TextBox1" runat="server" Text="10/04/2007 10:20:30"></asp:TextBox> <ajaxToolkit:MaskedEditExtender ID="MaskedEditExtender1" runat="server" Mask="99/99/9999 99:99:99" MaskType="DateTime" TargetControlID="TextBox1" AcceptAMPM="true"AutoComplete="true" ClearTextOnInvalid="true" Enabled="true"> </ajaxToolkit:MaskedEditExtender> </EditItemTemplate> </asp:TemplateField> </Columns> </asp:GridView><asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:NORTHWNDConnectionString%>" SelectCommand="SELECT [EmployeeID], [LastName], [FirstName], [Title] FROM [Employees]" DeleteCommand="DELETE FROM [Employees] WHERE [EmployeeID] = @.EmployeeID" InsertCommand="INSERT INTO [Employees] ([LastName], [FirstName], [Title]) VALUES (@.LastName, @.FirstName, @.Title)" UpdateCommand="UPDATE [Employees] SET [LastName] = @.LastName, [FirstName] = @.FirstName, [Title] = @.Title WHERE [EmployeeID] = @.EmployeeID"> <DeleteParameters> <asp:Parameter Name="EmployeeID" Type="Int32" /> </DeleteParameters> <UpdateParameters> <asp:Parameter Name="LastName" Type="String" /> <asp:Parameter Name="FirstName" Type="String" /> <asp:Parameter Name="Title" Type="String" /> <asp:Parameter Name="EmployeeID" Type="Int32" /> </UpdateParameters> <InsertParameters> <asp:Parameter Name="LastName" Type="String" /> <asp:Parameter Name="FirstName" Type="String" /> <asp:Parameter Name="Title" Type="String" /> </InsertParameters> </asp:SqlDataSource> </form>

I hope this help.

Best regards,

Jonathan

ASP.NET AJAX Javascript Localization using Database

Hi,

I've been looking at ASP.NET AJAX Javascript localization example by using embedded resource file in assembly and

setting the EnableScriptLocalization property in ScriptManager. It worked nicely, however, I would like to store the resources

in the database. ASP.NET 2.0 allows you to write your own Resource provider. See this articlehttp://msdn2.microsoft.com/en-us/library/aa905797.aspx

However, I haven't found any similar information on how to do that in ASP.NET AJAX.

Does anyone aware about this functionality in ASP.NET AJAX?

Hi,

The RecourceHandler in the ScriptManager is a static member of fixed type, you can't replace it with your own one.

So, there is no such elegant way to achieve it like the one in the article you mentioned.

ASP.NET Ajax Internals

Does anybody know of a good "internals" walk through of ASP.NET's Ajax implementation?

I'm thinking about using it on a project I'm about to start, but I like understanding exactly how everything works before committing to using it.

I've tried disecting the javascript generated by the ScriptManager, but honestly it's a bit hard to follow. For instance, how does a GridView's __DoPostBack call get intercepted by the Ajax framework and redirect to making an XmlHttp request? Furthermore, does placing the GridView in the UpdatePanel cause ASP.NET to generate additional methods on the page class to get the HTML output of just that control?


I'd love to see a basic walk through some place that answers questions like these.

If one doesn't exist, I guess I'll volunteer to research it and write one myself... but if somebody could save me the trouble, that would be great. :)hello.

you should look at the installation folder. there you'll find the client files used by atlas (the debug versions are formatted correctly and shouldn't be too hard to folloow)
Great tip, thanks.

ASP.NET AJAX Incomplete Documentation

While the docs are pretty nice, nicely formatted and have some decent examples, theyre very incomplete.

Just as an example; try to find Sys.Browser anywhere on the docs site. I sure cant.

When is the documentation going to be updated and complete?

That is screwing me as well. Instead of giving us the documentation your soon here microsoft annoucing another version of ajax! also un-documented.


Thank you for this feedback, and I am sorry Sys.Browser is missing from the documentation. I will find out when documentation for Sys.Browser will be published.


Thanks again for the feedback. This class will be documented and I'll post a link to this thread when it is ready.


Gosh, if documentation of a javascript function were 'screwing' me, I'd probably go do something crazy like, I don't know, open the ajax.debug.js file and look at the available methods and their signatures.

But that's just me.

ASP.NET AJAX in Orcas January CTP

What's the state of ASP.NET AJAX in the Orcas January CTP? It seems to be completely hosed.

I not to know what status is in orcas but feel that ms AJAX solutions are way behind others frameworks.

For me when creating the sites I to useComfortASP.NET and when creating ajax application I useVisual WebGui

The Visual WebGui is less known but i say many good words as I love it too much. I lets develop web applicaion like WinForm application.

Ramanjit

ASP.NET AJAX in normal ASP.NET 2.0 project

Hai friends,

a small doubt. I have a project done in ASP.NET 2.0.

Now v have to do a modification into it. v are planing to add ASP.NET AJAX into this project.

What the config changes and libraries need to added to normal ASP.NET 2.0 project to make it ASP.NET AJAX enabled.

Sreejith

Well, you'll need the System.Web.Extensions library. As for the config file changes, I'd recommend creating a "ASP.NET Ajax-Enabled Web Application" in VS (that you should have available in the new project dialog after you install ASP.NET Ajax), compare that web.config to the one that is in your application, and move over things that you are missing.

Asp.net ajax in Custom Control

I'm beginner in asp.net ajax.

Now I have to writecustom control and apply machanismpartial updating(which can be applied for User Control)

Could I can applyasp.net ajax forCustom Controlor not , and how to do this ?

Thanks a lot !

Thank you very much !

In fack UpdatePanel can be added to Custom Control !

But I have one problem more !

For creating Custom Control Im using the command in Console

csc /t:library /out:MGR.dll /r:System.dll /r:System.Web.dllMGR.cs

MGR is the name of Custom Control class

after compiling I got the error "the type or namespace name 'UpdataPanel' could not be found (are you missing directive or an assembly referrence?)"

I modified the command to

csc /t:library /out:MGR.dll /r:System.dll /r:System.Web.dll /r:Microsoft.Web.Atlas.dll MGR.cs

but got the same error !

I don't know why ? do you know why this error occured ?

HTD


I dont know exactly what your control will be doing, but all you should need to do is design the whole control in an asp.net ajax update panel.


My goal is "Partial Updating" in Control(which include TextBox and GridView). How you can add Update Panel in Custom Control ??

(In User Control, it's easy to do )


Open your Control.ascx file.

Drag and drop a update panel on to your page.

Select everything but the update panel.

Drag and drop your selection into the update panel.

That's everything you need to do to set up the control.

Anytime you use your control in your application, make sure you have the "Script Manager" Ajax extension on that page.


My deverloping Control is Custom Control, it's not User Control !

HTD


You should b eable to add it like any other control... ?

UpdatePanel panel = new UpdatePanel();

etc.


you can add a custom control class to a updatepanel like this

myControl ctrl =new MyControl();UpdatePanel1.ContentTemplateContainer.Controls.Add(ctrl);

ASP.NET AJAX Hovermenu question

I dynamiccally add hovermenu's to every image in a panel. When i hover the items with the hovermenu, the hovermenu appears. In IE 7, it's works perfectly. However, in IE 6 the hovermenu shows a white square next to the hovermenu exactly the same size as the original one. Does anyone knows how to disable this other white square.

arjen1984

Hi,

Here is a rough sample, it's working fine on IE 6.

<%@. 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) { int i = 0; for (; i < 5; i++) { Image img = new Image(); img.ImageUrl = "images/MS.JPG"; img.ID = "img" + i.ToString(); Panel1.Controls.Add(img); AjaxControlToolkit.HoverMenuExtender hme = new AjaxControlToolkit.HoverMenuExtender(); Panel1.Controls.Add(hme); hme.PopupPosition = AjaxControlToolkit.HoverMenuPopupPosition.Right; hme.ID = "hme" + i.ToString(); hme.TargetControlID = img.ID; hme.PopupControlID = "Panel2"; } }</script><html xmlns="http://www.w3.org/1999/xhtml" ><head runat="server"> <title>Untitled Page</title> <script type="text/javascript"> </script></head><body> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager>   <asp:Panel ID="Panel1" runat="server" Height="50px" Width="125px"> <asp:Panel ID="Panel2" runat="server" Height="50px" Width="125px"> <asp:LinkButton ID="LinkButton1" runat="server">LinkButton</asp:LinkButton><br /> <asp:LinkButton ID="LinkButton2" runat="server">LinkButton</asp:LinkButton> </asp:Panel> </asp:Panel> </form></body></html>

You are absolutely right about that, it shows perfectly. This is when you have 1 page. Now I have a master/details page. In this is goes all wrong.

Can someone give me a hint?

Asp.Net Ajax Hosting

I am looking to begin using Asp.Net Ajax on my hosted website. I read on this site that I would have to drop the Ajax dll in the bin folder, and change the trust level to full.

I was wondering If there is a KB article on the ins and out of using Asp.Net Ajax in a hosted enviornment.

Thanks

Hi,

first check if your hosting company already supports ASP.NET AJAX. They just need to install it, by getting the .msi fromhttp://ajax.asp.net/downloads/default.aspx?tabid=47. It's fully supported by Microsoft (the Extensions pack, not the futures!).

Grz, Kris.

ASP.NET AJAX for Web Application Project (WAP)

Has anyone successfully use the new AJAX controls in a WAP?

I'm getting this error when I try to use the web.config from an ASP.NET AJAX Web Site in a Web Application Project.

Error 8 The type 'Microsoft.Web.UI.ExtenderControl' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

Try to download Ajax Beta 2 and Futures Nov CTP from this website - http://ajax.asp.net/docs/Default.aspx
Try to download Ajax Beta 2 and Futures Nov CTP from this website - http://ajax.asp.net/docs/Default.aspx
Try to download Ajax Control Toolkit from this website - http://www.codeplex.com/AtlasControlToolkit/Release/ProjectReleases.aspx
Try to read Ajax materials document from here -
After you install Ajax Beta 2 and Futures Nov CTP in your PC,try to create a new Ajax Enabled website and a Ajax CTP Enabled website and check if it works.
Besides,try to check your web.config according to the following web.config
<?xml version="1.0"?>
<configuration>
<configSections>
<sectionGroup name="microsoft.web" type="Microsoft.Web.Configuration.MicrosoftWebSectionGroup, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<section name="converters" type="Microsoft.Web.Configuration.ConvertersSection"/>
<sectionGroup name="scripting" type="Microsoft.Web.Configuration.ScriptingSectionGroup, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<sectionGroup name="webServices" type="Microsoft.Web.Configuration.ScriptingWebServicesSectionGroup, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<section name="jsonSerialization" type="Microsoft.Web.Configuration.ScriptingJsonSerializationSection, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false"/>
<section name="profileService" type="Microsoft.Web.Configuration.ScriptingProfileServiceSection, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false"/>
<section name="authenticationService" type="Microsoft.Web.Configuration.ScriptingAuthenticationServiceSection, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false"/>
</sectionGroup>
</sectionGroup>
</sectionGroup>
</configSections>
<system.web>
<pages>
<controls>
<add tagPrefix="asp" namespace="Microsoft.Web.UI" assembly="Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add tagPrefix="asp" namespace="Microsoft.Web.UI.Controls" assembly="Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</controls>
<tagMapping>
<add tagType="System.Web.UI.WebControls.CompareValidator" mappedTagType="Microsoft.Web.UI.Compatibility.CompareValidator, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add tagType="System.Web.UI.WebControls.CustomValidator" mappedTagType="Microsoft.Web.UI.Compatibility.CustomValidator, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add tagType="System.Web.UI.WebControls.RangeValidator" mappedTagType="Microsoft.Web.UI.Compatibility.RangeValidator, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add tagType="System.Web.UI.WebControls.RegularExpressionValidator" mappedTagType="Microsoft.Web.UI.Compatibility.RegularExpressionValidator, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add tagType="System.Web.UI.WebControls.RequiredFieldValidator" mappedTagType="Microsoft.Web.UI.Compatibility.RequiredFieldValidator, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add tagType="System.Web.UI.WebControls.ValidationSummary" mappedTagType="Microsoft.Web.UI.Compatibility.ValidationSummary, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</tagMapping>
</pages>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<compilation debug="true">
<assemblies>
<add assembly="Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/></assemblies>
</compilation>
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="Microsoft.Web.Script.Services.ScriptHandlerFactory, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add verb="GET" path="ScriptResource.axd" type="Microsoft.Web.Handlers.ScriptResourceHandler" validate="false"/>
</httpHandlers>
<httpModules>
<add name="WebResourceCompression" type="Microsoft.Web.Handlers.WebResourceCompressionModule, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="ScriptModule" type="Microsoft.Web.UI.ScriptModule, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</httpModules>
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules>
<add name="ScriptModule" preCondition="integratedMode" type="Microsoft.Web.UI.ScriptModule, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</modules>
<handlers>
<remove name="WebServiceHandlerFactory-ISAPI-2.0"/>
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="Microsoft.Web.Script.Services.ScriptHandlerFactory, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="ScriptResource" verb="GET" path="ScriptResource.axd" type="Microsoft.Web.Handlers.ScriptResourceHandler"/>
</handlers>
</system.webServer>
</configuration>
Wish the above can help you.

Hi JC,

Had the same error and found that it was because I had not replaced the AjaxControlToolkit.dll in my application with the new one in the SampleWebsite/bin folder when I updated my AJAX version from beta to AJAX 1.0 RC. Recommend you try this.

Kind regards,

Mick

ASP.NET AJAX Extensions vs. Professional AJAX

Hi,

I'm curious as to why Web Services and SOAP were chosen as the transport mechanisms for the ASP.NET AJAX Extensions instead of Attributes and JSON.

In Professional AJAX, you add a few lines to your web.config, apply the AjaxPro.AjaxMethod attribute to the class method you want to call from javascript, and register the class in the code behind page usingAjaxPro.Utility.RegisterTypeForAjax(). Do the ASP.NET AJAX Extensions have something similar to this?

Also,if I build equivalent codein two ASP.NET apps, one using Professional AJAX and one using the ASP.NET AJAX Extensions, the ASP.NET app using Professional AJAX, which uses JSON, sends far fewer KB back and forth.

Professional AJAX:http://www.codeplex.com/AjaxPro

thanks,

Tom

tcboring@.work:

Hi,

I'm curious as to why Web Services and SOAP were chosen as the transport mechanisms for the ASP.NET AJAX Extensions instead of Attributes and JSON.

Why do you say this? By default, Web Services used by the ASP.NET Ajax frameworkdo use JSON for data transfer.

http://msdn.microsoft.com/msdnmag/issues/07/01/ExtremeASPNET/default.aspx
http://msdn.microsoft.com/msdnmag/issues/07/02/CuttingEdge/default.aspx


tcboring@.work:

In Professional AJAX, you add a few lines to your web.config, apply the AjaxPro.AjaxMethod attribute to the class method you want to call from javascript, and register the class in the code behind page usingAjaxPro.Utility.RegisterTypeForAjax(). Do the ASP.NET AJAX Extensions have something similar to this?

The way Professional AJAX works is very similar to ASP.NET AJAX page methods.


Mike,

Thanks for the links--I just finished reading the material they point at. I honestly had no idea that JSON was used, because when I look at the HTTP traffic (using Fiddler) generated while using the ASP.NET AJAX Extensions (AAE) it all looks like good old XML to me--besides the HTML rendered by my aspx pages. I've just downloaded the latest version of AAE, and I'll take a look again--the last time I played with AAE was back in March when I decided to use the Professional AJAX library instead.

thanks,

Tom


gt1329a:

tcboring@.work:

In Professional AJAX, you add a few lines to your web.config, apply the AjaxPro.AjaxMethod attribute to the class method you want to call from javascript, and register the class in the code behind page usingAjaxPro.Utility.RegisterTypeForAjax(). Do the ASP.NET AJAX Extensions have something similar to this?

The way Professional AJAX works is very similar to ASP.NET AJAX page methods.

Got any links to back that up?


Just my opinion, having watched both of their request/response behaviors in FireBug.

Here's an example of a page method in action: http://encosia.com/index.php/2007/07/11/why-aspnet-ajax-updatepanels-are-dangerous/

Certainly no SOAP there.


gt1329a:

Just my opinion, having watched both of their request/response behaviors in FireBug.

Here's an example of a page method in action: http://encosia.com/index.php/2007/07/11/why-aspnet-ajax-updatepanels-are-dangerous/

Certainly no SOAP there.

Okay, that's what I was missing--I didn't come across Page Methods. Like you noted in your article, the amount of extra information that's added to the data you really want is silly. It's exactly why I chose Professional AJAX.NET over Microsoft's framework.

Still though, the style of solution that Professional AJAX.NET gives just feels more...streamlined.


The counterpoint to something like AJAX Pro is what would you do if you needed to create an AJAX-ified GridView using it? With ASP.NET AJAX, you have the flexibility to use light weight techniques when appropriate, but still fall back to partial postbacks when they are necessary.

gt1329a:

The counterpoint to something like AJAX Pro is what would you do if you needed to create an AJAX-ified GridView using it? With ASP.NET AJAX, you have the flexibility to use light weight techniques when appropriate, but still fall back to partial postbacks when they are necessary.

Yeah, that's the main weakness of AJAX.NET Pro right now: you can only work with HTML controls. Now that i know about page methods, I'm going to give the AAE another chance.


I tried both solutions and somehow I can't run AJAX Pro (namespace not defined error) and Extensions don't allow me to execute non static method.


If you can't get it done in a static method, you can always turn to a full web service call.

ASP.NET AJAX Enabled website Problem Stack Overflow

Hi all,

I use ASP.NET AJAX Enabled website. It gives error in IE "Stack Overflow at Line : 0" while i am doing paging in datagrid or any action like button click etc.

Anyone please solve my issue.

Thanks & Regards,

Patel Nasrullah


Make sure you do not have smart navigation turnned on.


Check out this post:http://forums.asp.net/p/956056/1397151.aspx

Specifically the post bywinter: "Had this problem also, did a little search and it turns out that it may be a bug in IE6 as well... (search Microsoft KB for more on this)
However, I resolved this when I changed to SmartNavigation="true" in my config-file instead of MaintainScrollPositionOnPostback.
Also a little tip: make sure that this is not still declared in any your pages' Page-property if SmartNavigation is used in the config-file."

-Damien

Asp.Net Ajax Enabled Web Site running very slow

I have developed my web application on ASP.NET 2.0 AJAX Extensions 1.0 . But it is running very slow.Please help me how to improve perfomance of asp.net ajax extension web site.

The most common cause for this would be that you're making too many requests to the server... i.e. you're doing lots of AJAX requests in the background and they're updating too much at once.

The performance difference between an ordinary page, for example a search box that then displays search results, should be negligable between AJAX and post-back versions - so you can't always blame the AJAX for any speed issue.

An example of AJAX slowing things down would be if you have a page with 100 Labels and each time you made an AJAX request, it had to update them all (even though only one had changed) - it would be the equivalent of building the whole page again as opposed to making an AJAX request to change just one bit of the page.

Hope this helps.

ASP.Net AJAX Enabled Web Application template missing

I have installed ASP.NET2.0 AJAX Extensions 1.0 but I cannot find a template for the above when I try to create a new project and I believe there is one available from another post? If I try a new website, I get the AJAX enabled web site template, but what I really need is the web application template.

Anyone have any ideas as to why it is not appearing? Or what settings do I need to migrate from a ajax enabled website to a web application project to enable ajax?

Thanks in advance

Hi,

Thank you for your post!

As far as I know, there is none web application project template and AJAX web application project template in Visual Studio 2005/2008.

And we can take a website as a web application project.

If you really need a solution for a web site, you can add an empty solution, then add website to it,and other related project(e.g. class library project).

If you have further questions, let me know.

Best Regards,

Asp.net Ajax Enabled web app creating more ScriptResource.axd on a Simple page

Hello,

I am using Asp.net Ajax extension 1.0.In my application ,I am using a index.aspx page,which have no script manager control.When i am runing this application the the index page is loading very slow.When I save the page from browser I am finding six ScriptResource.axd files are loading on client side.Which have up to 400 kb.So I want to reduce these files on index page.But I do not know how I do it.Please help me.

Regards,

Pawan

Hi Pawan,

Basically, those scripts won't be requested if there is no AJAX related controls on the form.
If you are using MasterPage and there is ScriptManager on it, they will be downloaded too.

Hope this helps.

Hello Raymond Wen,

Thanks for reply.

I am using asp.net ajax enable website1.0.I have noticed that ScriptResource.axd is uploaded each time when I am navigate the site.On each page ScriptResource.axd is again loading.I want to cache ScriptResource.axd on Client Side.If you have any idea about it then please help me. Thanks & Regards, Pawan


Please try the following:

1. Set debug to false in web.config

2. Set ScriptMode property of the ScriptManager to release


These should be cached on the client as long as you have <Compilation Debug="false" /> in your web.config.

ASP.NET AJAX enabled page loses its AJAX behavior when an IFrame is placed inside of an Up

Hello everyone,

I have a strange issue on one of my web pages in our ASP.NET AJAX-enabled Website. We have an ASP.NET 2.0 Website and we wanted to ajaxify it just by making good use of the UpdatePanel control on all the pages of website to remove the postbacks and make the pages more responsive to the user. One of the pages has a couple of IFrames on it and when we tried to place all the content on the page inside of an UpdatePanel, we have noticed that the browser itself crashes upon the selectedIndexChange event of a DropDownList on the same page. The IFrames are hidden by default and are made visible only upon the click event of a button.

When I wanted to find out the reason behind all this by replicating or simulating the same aforementioned behavior on a sample page, I have noiticed this *** behavior that if an IFrame is placed inside of an UpdatePanel along with other html elements, the page loses its AJAX behavior and makes a postback for the click event of a button placed inside of the same UpadetPanel as the IFrame.

Here's the source code for that...

<form id="frmAJAX7" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="TRUE">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<table>
<tr>
<td>
<asp:Label ID="lblName" runat="server">Enter Your Name: </asp:Label>
</td>
<td>
<asp:TextBox ID="txtName" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td colspan="2">
<asp:Button ID="btnClick" runat="server" OnClick="btnClick_Click" Text="Click me!" />
</td>
</tr>
<tr>
<td colspan="2">
<asp:Label ID="lbl" runat="server"></asp:Label>
</td>
</tr>
</table>
<iframe id="iframe1" frameborder="1" src="http://pics.10026.com/?src=http://www.msdn.microsoft.com"></iframe>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form
If the IFrame named iframe1 is placed outside of the UpdatePanel, the page works fine and exhibits the normal AJAX behavior. Is there any kind any of conflict between the ASP.NET AJAX extensions and the IFrame element?

Please let me know if any one out there has any idea about this since I am not a seasoned developer yet in ASP.NET AJAX. And any help regarding this would be appreciated as this is quite an urgent requirement.

Thanks in advance...

Well...it seems to be working fine for me.
I belive you are getting confused coz the page inside the IFrame which happens to behttp://www.msdn.microsoft.com in the example above is reloading itself on button click. The purpose of Ajax is (or to be more specific, you can say UpdatePanel in your case) instead of causing entire page to postback it would just refresh the part of the page which is inside update panel. Notice the Label and and text box in which you enter your name they dont get reloaded when they are inside the update panelon button click. Try putting everything out of updatepanel and then check the behaviour of TextBox and Label. I am sure you would notice the difference.

I also tried keeping a drop down list control inside and outside the update panel, still working fine for me.

Well, instead of keping the Src of IFramehttp://www.msdn.microsoft.com try to keep the Src of IFrame some other webpage in your project(preferebly with one or two textbox and buttons) and if you still dont notice the difference then also try to keep the controls of source page under updatepanel:)

Hope this helps:)

Cheers
Ritesh


Thanks for the reply, Ritesh.

I have mentioned the src attribute to a different page, part of the same project. I replaced the value of the src attribute to http://msdn.microsoft.com just for the posting purposes. The source page has UpdatePanel with a few other controls wrapped inside of it. I still get the same issue.

Here's the source code for the source page of the IFrame...

<form id="frmAJAX2" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Label ID="Label1" runat="server" Text="Panel Created"></asp:Label>
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Click me!" />
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form
I don't really want the UpdatPanel to refresh or reload the source page of the IFrame and even if it does, the request should be a asynchronous postback, which is not the one happening in my case. I see a clear postback in the example that I have mentioned.

Hope I was clear enough...


Hey....i thought you were seeing main page getting refreshed. Now...If I understand you correctly then you dont want the SOURCE page inside the IFrame to get refreshed... Well as I said in my last post Ajax would not postback the entire page but the controls inside the update panel would get refreshed to fetch the data from the server.

If you dont want to see any refreshing in the source page then you need to create page which would work something like this onehttp://www.jamesdam.com/ajax_login/login.html. Hit F5 and try to refresh this page and see the difference. Also keep this page under the source of IFrame. You can refer to the sample code provided at the botton of that page.

Cheers
Ritesh

ASP.Net Ajax elements not being recognized

I've just installed ASP.Net Ajax beta 2 and added its references to web.config, but my project still gives me some errors (my project was originally created using ASP.Net Ajax beta 1 template).

Here they are:

Warning 1 The 'requirePermission' attribute is not declared. c:\Inetpub\wwwroot\n2_lc1\Web.config 7 206 c:\...\n2_lc1\
Warning 2 The 'requirePermission' attribute is not declared. c:\Inetpub\wwwroot\n2_lc1\Web.config 8 200 c:\...\n2_lc1\
Warning 3 The 'requirePermission' attribute is not declared. c:\Inetpub\wwwroot\n2_lc1\Web.config 9 214 c:\...\n2_lc1\
Error 28 Element 'ScriptManager' is not a known element. This can occur if there is a compilation error in the Web site. c:\Inetpub\wwwroot\n2_lc1\processo\acompanhamento_corrida.aspx 32 7 c:\...\n2_lc1\

What can I do?

When I create a new project it works. With existing projects it doesn't work.

Try to take a look at this reading when upgrading to Ajax Beta 2 -
????http://66.102.7.104/search?q=cache:6kV1ivEIoIYJ:ajax.asp.net/files/Migration%2520Guide.doc+Upgrade+Ajax+Migration&hl=en&ct=clnk&cd=1
????http://ajax.asp.net/files/AspNet_AJAX_CTP_to_Beta_Whitepaper.aspx
Wish the above can give you some helps.

Jasson, thanks for your reply, but the problem isn't migrating an Atlas to Ajax code. The problem I have is about the prefix ASP for Ajax controls that Visual Studio Intellisense is not recognizing.

Visual Studio marks the Ajax elements as unknown. Their elements only work if I change Ajax prefix to another one (different from ASP).


Sorry for not giving you an immediate reply.For your questions, try to follow up the following suggestions.

Do you have the following code line when you want to access Ajax control toolkit? This is necessary to refer to Ajax control toolkit in your website project. If not,try to add it

ASP.NET Ajax doesnt work after 7/10/2007 windows updates

I have customers that have reported this morning that our web application that uses asp.net ajax is not longer working correctly after they installed the windows updates last night (7/10/2007). The problems that we are seeing is a page that has a gridview inside of an update panel displays some of the markup of the page. When they click the button that should trigger the update panel, the page does a full postback instead of a partial. The Update Progress doesn't show like it should either. After the postback, it may or may not show the page correctly, but none of the buttons work anymore. We found that this is only a problem with IIS 6.

If anyone knows what update may cause this so we can uninstall that update to get our customers site back up and running please let me know. I searched the forum, but couldn't find any similar problems. Are there others that are seeing similar problems with the windows updates?

Hi buckeyes,

Has your problem been resolved yet? If yes, Sharing your work will be greatly appreciated.


We haven't found a solution yet other than rolling back the updates.


Hi buckeyes,

buckeyes:

We haven't found a solution yet other than rolling back the updates.

Would you please tell us which update causes the issue and your system environments? We will check it and thanks for your feedback.


Sorry that I haven't gotten back to you on this. We had a member of the IIS team looking into this as well and so we were waiting for their reply. Anyway they were able to point us in the right direction. The problem was caused by some of our JavaScript after the install of KB928365. We were referring to controls like:

document.getElementById('ct100_MyTextBox')

We changed that to

document.getElementById('<%=MyTextBox.ClientID%>')

That has fixed our problems.

ASP.NET AJAX Documentation offline don;t work correctly.

Hi.

I downloaded asp.net ajax documentation and do instructions in read me for installation and configuration. but my explorer (IE) don't load pages of it and an error accured during loading.it is like this:

_______________________________________________________________________________________________

Configuration Error

Description:An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message:It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.

Source Error:

Line 96:
Line 97: <!-- Auth, membership, profile, providers sections all custom and must be kept for now. -->
Line 98: <authentication mode="Forms"/>
Line 99:
Line 100: <!-- The membership element is for some of our custom samples that use membership. -->


Source File:D:\Learning\AJAX\AspNet_AJAX_Documentation\web.config Line:98

________________________________________________________________________________________________________

I installed visual studio 2005 and asp ajax extension and asp.net 2 and iis and other that required.

Please help me.

Thanks.

Looks like there is something wrong with the configuration file, did you try this steps:

http://alpascual.com/blog/al/archive/2006/10/24/Manually-upgrading-from-Atlas-to-ASP.NET-2.0-Ajax.aspx

ASP.NET AJAX deployment problems.....

Hi guys,


I've just added ASP.NET AJAX to my web site and when I run it under VS 2005 everything works fine. However, when I try and run it on my dev machine using IIS (I'm using XP and IIS 5) the AJAX stuff doesn't work.


So, I tried deploying it to my production web server (Windows Server 2003 and IIS 6 with AJAX extensions installed and verified by checking GAC) it still doesn't work!


Can anyone tell me what I'm missing? What's different between the VS web server and IIS??


TIA

Jon

Hi Jon,

Check your Web.config file with newly created ajax enable website

Swati


Hi Jon,

Check your Web.config file with Web.config of newly created ajax enable website

Swati


Hi Swati,

I've done this and everything that needs to be in the web.config is there. As I said it works under VS2005 just not when deployed.

Jon


hi jon,

i am having the same problem. were you able to find the solution. if yes then can u please guide me on that

jitendra


No luck yet. If you figure it out please post the solution.

Thanks

Jon


Hi Jon,

The most significant difference between them is they are running with different windows account.
VS web server is running with the account you logged in windows which is usually an administrator. When working with IIS, it's running with Asp.net(IIS 5) or Network Service(IIS 6).
So your issue is very likely to be caused by privilege, please review the log of the IIS to get relevant information.

Make sure system.web.extension and system.web.extension.design.dll is installed on the server.


On your production server can you run any asp.net application ( without Ajax)?

If not, then you may have to enable ASP.NET on windows server 2003

Try to reinstall the required dll's system.web.extension.dll and system.web.extension.design.dll


I'm having the exact same problem. Everything works great locally, but when i move it to my dev webserver the update panel has stoped working. Everything makes the full postback. I have been pulling my hair out trying to get this to work. I have confimed that AJAX is installed in the GAC both locally and on the developement server. The webconfig is the same for both projects. I cannot for the life of me figure out why its not working. I am accessing my project on the development server through a UNC path. I have fixed the entries in the Code Access Security of the 2.0 configuration tool to stop getting the hostingpermission errors.

Any other suggestions that I should try?

Jason Snipes


Sepinsnosaj:

I'm having the exact same problem. Everything works great locally, but when i move it to my dev webserver the update panel has stoped working. Everything makes the full postback. I have been pulling my hair out trying to get this to work. I have confimed that AJAX is installed in the GAC both locally and on the developement server. The webconfig is the same for both projects. I cannot for the life of me figure out why its not working. I am accessing my project on the development server through a UNC path. I have fixed the entries in the Code Access Security of the 2.0 configuration tool to stop getting the hostingpermission errors.

Any other suggestions that I should try?

Jason Snipes

Once again the "Post Question on Listserv = Find Solution shortly after" mystery works again. My project is a subweb. In the main web in the web.config i still had the <xhtmlConformance mode="Legacy" />set. By removing that statement my ajax stuff started to work in my webweb.

You can read about the <xhtmlConformance mode="Legacy" /> issue here:http://weblogs.asp.net/scottgu/archive/2006/12/10/gotcha-don-t-use-xhtmlconformance-mode-legacy-with-asp-net-ajax.aspx

Jason Snipes


Thanks Jason, I tried this and it worked for me on both the development machine running IIS5.1 and on the production server (IIS6)

My ajax enabled site is housed as a virtual directory under the main web site and to get it to work I had to remove the<xhtmlConformance mode="Legacy" />

line from the root web.config file!

Jon

ASP.NET AJAX Deployment error

i,

I`ve done an ASP.NET AJAXwebsite and it works perfectly on my development machine. Ok! But whenI try to deploy my application on a webfarm scenario my website doesn`twork properly.
It comes out with the following error message sometimes:

"
Sys.WebForms.PageRequestManagerParserErrorException:The message received from the server could not be parsed. Common causesfor this error are when the response is modified by calls toResponse.Write(), response filters, HttpModules, or server trace isenabled.

Details: Error parsing near '

<!DOCTYPE html P'.
"

Thisproblem occurs randomly. Apparently, it`s due to the load balanceconfiguration on our web servers. I think when the request goes toanother machine my website crashes.

Any hint would be very appreciated. :]

You may want to check this out

http://www.rosshawkins.net/rfh/articles/webresource.axd.html

Let me know if this helps.

asp.net Ajax datagrid?

Hi,

I am looking for a tutorial sort of thing that can guide me to build ajax enabled datagrid with functionalities like editing,deleting, sorting, paging etc in ajax mode. Right now I am able to load the datagrid ajax way but not able to find way to get other things in ajax manner. any help will be appreciated.

Regards,

Sunil

Hi Sunil,

Maybe this link can be helpfull:

http://weblogs.asp.net/rajbk/archive/2007/01/17/master-details-using-ajax-introducing-the-updatepanelpopupextender.aspx

regards,


Hi Dennis,

Thanks for your link but it is not what i want. I want that I should be doing all sort of things (editing, sorting,deleting) in grid with the help of ajax. If user does any sorting, then page should not get posted back and use ajax. same for other functionalities.I have searched google for it but didnot find any good help.

Regards,

Sunil


Maybe you just need an <asp:GridView> control inside an <asp:UpdatePanel>? (Then all the sorting/paging/editing/etc. will go through the server, but asynchronously and without reloading the page. That's the magic of the UpdatePanel!)

ASP.NET Ajax CTP version and .NET 3.0?

Does anybody know if the CTP version of the ASP.NET Ajax works with .NET 3.0?

It should work Since basic framework(CLR version) used by both ASP.NET AJAX and .NET3.0 is .NET 2.0.

ASP.NET AJAX Controls with SharePoint

I need to implement AJAX controls within SharePoint web parts? Is that possible? I can't seem to find any help on the Internet. Any information on what steps to follow would be greatly appreciated.

Regards,

Lilia Safronova

Check out this blog post:

ASP.NET Ajax in SharePoint


According to Daniel Larson's Blog, looks like a lot of javascripting will be required, right? What are the steps to create a very simple Ajax-enabled Hello World web part?

As soon as I inherit from SharePoint.Ajax.WebParts.AjaxWebPart, I get an error in the web part that it couldn't be found. Do you know why that is?

How do I get my hands on Ajax controls when in VS05?

I'm no very clear on what is needed to create Ajax-enabled controls for SharePoint. Would I have a web part (implemented in VS05) with a grid control for example and this .cs class would call a web service implemented with javascript (Ajax capability)?

Your help is very much appreciated.

Lilia

Monday, March 26, 2012

ASP.NET Ajax Control Toolkit in different browsers

This toolkit seems to be incredible, better than a lot of packaeg offered (charged) by 3rd providers. I am only concerned all these controls will behave accordingly in any browser chosen, from IE 6, 7 to Firefox. Has anyone done tests, or used them in production?

I have tested most of the controls, and use them in my production environment, with many browsers (FF 1.5(OSX, Windows), FF2(OSX, Windows), IE 6, IE 7, Opera 9(OSX, Windows), Safari (OSX)). They all worked fine. Microsoft has gone through alot of trouble to see that they do. :)


This is nice to hear, if you dont mind, a nice list table with the results of your findings with respect to the various browsers.

I am working on creating webparts ( custom composite controls , DLLS , what ever you call them) to use AJAX.NET extensions and the "unsupported" Ajax.NET ControlToolkit and I must say the behaviour is NOT as rosy as it may be when using the controls in the WYSIWYG drop-n-drop way of the VS designer.

behaviour varies from IE6 to IE7, even on mozilla


You talked about "drag & drop′", considering u r working with webparts. Actually I know there is one of the toolkit components that is able to be dragged, the others AFAIK are not able to such a task. So as for this problem you mentioned, you were referring particularly to this case with webparts ?


Hi,

When developing webparts as custom composite or server controls, drag-n-drop is not an option as the WYSIWYG editors such as VS2k3 or WS2K5.

And yes, I am referring specifically to WebParts using ASP.NET 2.0 WebParts class and also using AJAX.NET extensions and AJAXControlToolkit extenders etc.

To be clear i am talking about the behaviour of coded webparts ( not user controls such as ASCX stuck into a webpart zone) such as overriding CreateChildControls and RenderContents or Render where the layout and lifecycle of the objects are different when laying out objects on an ASP.NET webpage or webpartpage.

Anyways, its an uphill battle. Right now I want the AlwaysVisibleControl Extender ( if thats the "correct" name) to work properly in a custom ajaxified webpart (DLL). This is where the browse side problem appears.

This is why I createdhttp://forums.asp.net/t/1128326.aspx a while back with no feedback from anyone. Oh well, i will figure it out eventually.

ASP.NET AJAX Control Toolkit & UpdatePanel

All seems to me that ASP.NET AJAX Control Toolkit has a builtin feature that is able to deal by itself with all Ajax issues. That said, then wouldnt we need to use UpdatePanel anymore, since all these controls know how to deal with Ajax?

it is true that the control toolkit controls can update properly on their own. Like how you can use a calendar extender without needing it to be in a update panel with a textbox, they can both just be on the form. I still tend to user panels though simply because it helps me group sets of controls and visually makes it easy to see what kind of results i should expect when i know what controls are bound to what area on the screen. Using update panels has never cause me any extra problems so i stick with it


My fear is to make things redundant, and worse, degrade performance, since there would be 2 types of ajax treatment. One, dealt by UpdatePanel, and the other dealt by the control itself...

if you have you page up and running no problem without the use of update panels, then there is no need for them. It really comes down to how you have stuff set up I guess. I have pages with a lot of dynamically created controls like tables that are all updated individually (for when users edit them). And some of the editing features might include a calendar extender, so I would include that extender inside of the update panel that my table is in to group the controls because the interact with each other. But like i said, if your pages are set up in way that they work without update panels, then no worries :)

ASP.NET Ajax Control Toolkit - Firewall blocking TabContainer

Hey there,

First thing's first - if this is posted in the wrong forum, I apologize. Next...

I've got an ASP.NET AJAX application developed with VS 2008 Beta 2, using the 3.5 version of the Ajax Control Toolkit - when deploying it to our web server, something interesting happens. If I access the site through a machine on the same network as the web server, it renders fine. However, if I access it from another network, or through the internet, the TabContainer is not rendering.

I checked out the reason why, and it appears that our firewall is blocking the client's ability to download the WebResource.axd file associates with the Ajax Control Toolkit - what else is interesting is that I'm also using FreeTexBox on this page (which downloads a seperate WebResource.axd file, and can access it without any problem).

If anyone has any suggestions, or has run into this problem in the past, please let me know. Thank you!

Anthony

32 views and no responses?

Wow...either I didn't explain it well enough, or nobody's run in to this.

Can anyone let me know which is the case?

Thanks.


Well, if you want comments, here is mine.. I always read anything related to the tabs since I use them a lot...

But sorry, never run into this, works fine on my laptop and the corporate machines (that have high security)... And firefox, ie 6-7...

- Have you tried with another machine, that is not on same network as webserver + where you can test different firewalls/settings?

- Also, are you sure the tabs are to blame? Is everything on your web app from the same domain?

It could be so many different things...Tongue Tied


Yeah I had a similar issue. We use an Aventail product (now SonicWall I believe) to allow users to login securely to our network over the net. It was configured in a way that was stopping that WebResource.axd file from being downloaded.

It seems that the issue is with your firewall. If it is blocking the file then there is little you can do. We configure our firewall\Aventail product to be a little less stringent so that the file is now downloaded and the asp.net ajax apps work fairly well. There are still other issues.

So I think you need to talk to your Network Admin people...?


Hi Anthony,

Why not use a debugging tool such as Web Development Helper,Fiddler and Firebug(used on Firefox) etc? They will help you on detecting all the downloaded items.

Best regards,

Jonathan


Jonathan Shen – MSFT:

Hi Anthony,

Why not use a debugging tool such as Web Development Helper,Fiddler and Firebug(used on Firefox) etc? They will help you on detecting all the downloaded items.

Best regards,

Jonathan

Thanks for the suggestion - that's the point of my query, however. I do in fact know that the file is not being downloaded, I'm just trying to determine what changed between the AJAX Toolkit for VS2005 and the toolkit that's compatible with 3.5 (VS 2008) that's causing it to be filtered by our firewall. It seems odd to me that it would work with a prior release, yet not with the new version.


After some more debugging, I think I may have determined the reason why the ScriptResource.axd files are not being downloaded - it appears that they are using a Content-Type of application/javascript, where WebResource.axd (downloaded without any problems) uses Content-Type application/x-javascript.

Additionally, I checked older projects built on VS 2005 .NET 3.0, and the ScriptResource.axd files there use Content-Type text/javascript.

So the question then becomes: Why in the world was the Content-Type changed to something which isn't successfully downloading?

Thoughts?


Alright, for anyone who searches this post in the future, here's the solution that we just implemented and tested:

First of all, we checked the content type of the files that weren't coming through to the client when it was posted to the web using Fiddler2 (http://www.fiddlertool.com/fiddler/).

When we checked the remote site, Fiddler showed that the files were forbidden. I checked it through localhost to see that the Content-Type was application/javascript.

Then, we checked our firewall. We had both application/x-javascript, and text/javascript, but no application/javascript!

We updated the configuration file for the firewall to include application/javascript content-types, uploaded it, and tested the site again - Voila, the Ajax Control Toolkit now works with Visual Studio 2008 and the 3.5 framework.

Thanks everyone for their help with this, much appreciated.