Showing posts with label visual. Show all posts
Showing posts with label visual. Show all posts

Monday, March 26, 2012

ASP.NET Ajax and VisualStudio2005

Hi there,

I've recently been experimenting with ASP.NET Ajax.
I'm able to create an Ajax Enabled website however Visual Studio doesn't seem to recognize the Asp.NET Ajax components...

When I'm viewing the web page in HTML format it doesn't even recognize the <asp:ScriptManager>.
What's really getting to me is that it doesn't recognize the<asp:UpdatePanel> nor the <contenttemplate>...andeverything within these tags, even though they are regular components(like text boxes and panels), shows up as errors.

Finding real problems in the HTML is difficult because there are so many error-swigglies underlining everything.


The site is works very well...and despite the fact that all theseerrors are listed, Visual Studio still compiles and runs the site.


Is there a way to make Visual Studio recognize the ASP.NET Ajax components?

Thanks

-Frinny

Have you added the Ajax/ControlToolkit components to the VS toolbar?

Yes, I have added it to the toolbar.

The site uses a bunch of different extenders and makes use of the update panels.
It works nicely but Visual Studio is showing the errors even though there are no errors.


That's odd.

When I enable Ajax, or ControlTookit, on existing asp.net pages the toolbar changes and the directives in the web.config seem to always do the trick.


So you don't see red-squggly error indicators when viewing the aspx as html?

Am I missing something? Did I not set this up correctly?


Have you registered the assembly in your aspx page?

<%

@.RegisterAssembly="AjaxControlToolkit"Namespace="AjaxControlToolkit"TagPrefix="ajaxToolkit" %>


Yes I have <%@.RegisterAssembly="AjaxControlToolkit"Namespace="AjaxControlToolkit"TagPrefix="ajaxToolkit" %> at the top of my pages.

This problem has been solved.

I was running Visual Studio 2005 without Service Pack 1.
Once I installed SP1 everything worked as it should...no more errors are showing up.

Thanks for all your help and advice!


-Frinny


Thanks for reporting back...You'll no doubt help a lot of others.Wink

ASP.net Ajax Accordion issues


I am new to asp.net and rebuilding some websites using Visual Studio Web Developer edition. I created a right column that includes the ajax accordion panels following the tutorials on asp.net website. They are working flawlessly when previewing in the browser using VS's asp.net development server but when I try viewing the page via IIS using my local development server or our production server the accordion panels do not work. You click on the link to activate the panel and it just sits there and does nothing. Located in the left hand windows of IE says Done, but with errors. It gives me a line number but does not correspond to the line numbers in my code. Also not sure if this has anything to do with it, but the accordion panels are loaded up in a content section, I am using a master page.

Thanks for any assistance or suggestions,

Gym

just giving it a try. Is all dll's required for accordion to work present in your dev server or prod server. can you post what error does IE show you?. is it working with any other browser like firefox?

Thanks,


The dll's should be the AjaxControlKit and the System.Web.Extensions correct located in my bin folder? They are located in the same directory as the site files. Also I tried moving the bin folder to the root of the IIS server, i.e. Inetpub/WWW. Also it does not work in other browsers like FF.

Error from IE:

Line: 292
Char: 1
Error: 'Sys' is undefined
Code: 0
URL: http://localhost/work/new/

If you need any further information, please feel free to ask and I can post anything else that would pertain to the issue.

Best Regards,

Gym


looks like you are missing ajax extensions 1.0 installed in prod or dev server. pls install them. it is not sufficient if you have them in bin folder.

Thanks,


Yes, it is installed on both servers. I have also un-installed and reinstalled it. I downloaded the sample accordion script from the site and it produces the same results. Been searching the net for hours and really at a lost. It has to be something on the server side as I am able to run all of the accordion examples from other sites. :(


Hi,

Thank you for your post!

Please ckeck out the following link:

http://weblogs.asp.net/chrisri/archive/2007/02/02/demystifying-sys-is-undefined.aspx

In that article,Chris Riccio give youseveral reasons why the error appears:

1. The browser fails to load the compressed script

This is usually the case if you get the error on IE6, but not on other browsers.

The Script Resource Handler – ScriptResource.axd compresses the scripts before returning them to the browser. In pre-RTM releases, the handler did it all the time for all browsers, and it wasn't configurable. There is an issue in one of the components of IE6 that prevents it from loading compressed scripts correctly. See KB articlehere. In RTM builds, we've made two fixes for this. One, we don't compress if IE6 is the browser client. Two, we've now made compression configurable. Here's how you can toggle the web.config.

How do you fix it? First, make sure you are using the AJAX Extensions 1.0 RTM release. That alone should be enough. You can also try turning off compression by editing your web.config to have the following:

<system.web.extensions>
<scripting>
<scriptResourceHandler enableCompression="false" enableCaching="true" />
</scripting>
</system.web.extensions>

2. The required configuration for ScriptResourceHandler doesn't exist for the web.config for your application

Make sure your web.config contains the entries from the default web.config file provided with the extensions install. (default location: C:\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025)

3. The virtual directory you are using for your web, isn't correctly marked as an application (thus the configuration isn't getting loaded) - This would happen for IIS webs.

Make sure that you are using a Web Application, and not just a Virtual Directory

4. ScriptResource.axd requests return 404

This usually points to a mis-configuration of ASP.NET as a whole. On a default installation of ASP.NET, any web request to a resource ending in .axd is passed from IIS to ASP.NET via an isapi mapping. Additionally the mapping is configured to not check if the file exists. If that mapping does not exist, or the check if file exists isn't disabled, then IIS will attempt to find the physical file ScriptResource.axd, won't find it, and return 404.

You can check to see if this is the problem by coipy/pasting the full url to ScriptResource.axd from here, and seeing what it returns

<script src="http://pics.10026.com/?src=/MyWebApp/ScriptResource.axd?[snip - long query string]" type="text/javascript"></script>

How do you fix this? If ASP.NET isn't properly installed at all, you can run the "aspnet_regiis.exe" command line tool to fix it up. It's located in C:\WINDOWS\Microsoft.Net\Framework\v2.0.50727. You can run "aspnet_regiis -i -enable", which does the full registration of ASP.NET with IIS and makes sure the ISAPI is enabled in IIS6. You can also run "aspnet_regiis -s w3svc/1/root/MyWebApp" to only fix up the registration for your web application.

If you have further questions,let me know.

Best Regards,

ASP.NET ajax 3.5 woth visual studio 2005 and .NET 2.0

Is it possible? If yes, how.

Thanks.

Vivek

I don't think so

I'm pretty sure you have to use VS 2008 for the 3.0+ frameworks


You have to VS 2008 for that

Saturday, March 24, 2012

asp.net ajax

Hello, We have Visual Studio 2003, if we are now interesting in the advantage of asp.net ajax to improve user experience in our web applications, what do we have to do? I guess change VS 2003 to VS 2005, Am I rigth, what else?

If you want to use ASP.NET AJAX you must indeed change to vs2005. There are a several other frameworks that you can use with vs2003. For a detailed list check out:

http://www.ajaxdiff.com/Default.aspx?filter=dotnet

I Like the Anthem toolkit because the complete AJAX Functionality is build i server controls.


You certainly have to upgrade to VS2005 or Visual Web Developer to take the full advantage of Asp.net Ajax. But in case if you still want to stuck with VS 2003 checkout this posthttp://geekswithblogs.net/rashid/archive/2007/07/21/Asp.net-Ajax-and-VS2003.aspx

ASP.NET 2003 can use AJAX?

Split off fromhttp://forums.asp.net/t/1118842.aspx by moderator XIII:

pls kindly send me steps for adding the Ajax tool kit to visual studio 2003..

kindly help me asap..

I have a problem i.e i have two textboxes and a chechbox.

if i check the checkbox then the value of textbox1 should be transferred to textbox2 so.. i need this is to be written using client side as well as the data should be stored in the database..

so can v do this using AJAX.. how is it possible

vijai

As the MVP said at http://forums.asp.net/t/1118842.aspx:

No. Visual Studio 2003 is specifically made to work with .NET 1.1. If you want to use ASP.NET AJAX you need to use Visual Studio 2005 or the free Visual Web Developer Express tool to use the server side components. If however you only need the client scripts, download the Microsoft AJAX Library and include them in your ASP.NET 1.1 pages like you would with any other external .js file.

So what you could do is create your webservices with the free VWD tool, integrate ASP.NET AJAX into them, deploy them and use the client scripts from the Microsoft AJAX Library in your ASP.NET 1.1 pages to call those webservices. You won't have access to the UpdatePanel or related server controls but you can use the client side behavior of ASP.NET AJAX in your pages today which will make it much easer later on to upgrade your application to ASP.NET 2.0.


True that you cannot use the ASP.NET AJAX Extensions from ASP.NET 1.x, but not entirely. TheMicrosoft AJAX Library (which is the JavaScript library that ASP.NET AJAX Extensions uses) can be used with any server-side platform, because it is just another client-side JavaScript AJAX library.

I'm sure they were meaing to use the full AJAX Extension within ASP.NET 1.x with all the UpdatePanel goodness, so sorry you have to upgrade to .NET 2.0. But at least it's free to upgrade, just go download the Visual Web Developer Express and get Ajaxifying!

Wednesday, March 21, 2012

ASP AJAX Control toolkit tags showing up differently

I just installed ASP AJAX Control toolkit into my Visual Studio 2005. When I access the control tool and drag and drop it into my web page, it shows up with a <cc1...> tag instead of a <ajaxToolkit>... tag. The control does not show up in my web page.

Any ideas how to fix it.

Thanks,

Praveen

Its just a option that can be done. It allows for a declaration of the Ajax control. You can change it if you want by going to the top of the page where the assebly is first called which gives you the ability to make cc1 anything you wish. I am just wondering why would you want to change? What is the need to have <ajaxtoolkit> instead of cc1.

It won't make much of a difference and you shall still know that these are ajax extensions.


I thought that the tag being something other than <ajaxtoolkit> was the reason why my web page ignored all the stuff I put in there for making that particular control work. Perhaps I am wrong and the reason why my ajax controls did not work is something else?

Praveen


Thanks Cheetahtech for the solution.

Praveen


so do your ajax controls work?