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

No comments:

Post a Comment