ASP.NET 2.0 and AJAX
-
What's the best way to use ASP.NET 2.0 and AJAX? I know there is ASP.NET AJAX but I have uninstalled it after trying it, I like hand coding mine better. My current environment is ASP.NET 2.0 with code in separate files all code is VB.NET, I'm using a master page to build a frame and I have a group of web controls created. I have my AJAX calling an aspx file, what I'm doing so far is working, but Visual Studio seems unhappy that my AJAX aspx file have no html, head, body or forms tags. Also, I'd like to make most of my controls AJAX enabled (and VS doesn't expect to see the html, head, etc. tags) but I can't directly access them (because they're .ascx files). So the answers I'm looking for are, should I just continue on using .aspx files (and ignore errors), is there a better/more correct way to generate content to feed to JavaScript, is there a file extension that I can use as a web control or for AJAX as needed? Thanks for any information you can provide.
-
What's the best way to use ASP.NET 2.0 and AJAX? I know there is ASP.NET AJAX but I have uninstalled it after trying it, I like hand coding mine better. My current environment is ASP.NET 2.0 with code in separate files all code is VB.NET, I'm using a master page to build a frame and I have a group of web controls created. I have my AJAX calling an aspx file, what I'm doing so far is working, but Visual Studio seems unhappy that my AJAX aspx file have no html, head, body or forms tags. Also, I'd like to make most of my controls AJAX enabled (and VS doesn't expect to see the html, head, etc. tags) but I can't directly access them (because they're .ascx files). So the answers I'm looking for are, should I just continue on using .aspx files (and ignore errors), is there a better/more correct way to generate content to feed to JavaScript, is there a file extension that I can use as a web control or for AJAX as needed? Thanks for any information you can provide.
RX Maverick wrote:
I know there is ASP.NET AJAX
You mean ATLAS ? Yeah, that exists, and it's pretty simple to use, but expensive as well.
RX Maverick wrote:
I have my AJAX calling an aspx file, what I'm doing so far is working, but Visual Studio seems unhappy that my AJAX aspx file have no html, head, body or forms tags
Just turn that validation off. Or, if it worries you, define a file extension like aspxa, set it up in IIS, and it will all be fine.
RX Maverick wrote:
Also, I'd like to make most of my controls AJAX enabled (and VS doesn't expect to see the html, head, etc. tags) but I can't directly access them (because they're .ascx files).
What's the problem here ? I don't understand ?
RX Maverick wrote:
should I just continue on using .aspx files (and ignore errors),
For the AJAX postback ? Yes, almost certainly.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog