Gotcha: Lost HTML Intellisense within ASP.NET AJAX Controls
page 3 of 4
by Scott Guthrie
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 21850/ 47

How to Fix This

The fix for the intellisense issue will be in VS 2005 SP1.

In the meantime there are two workarounds that you can use to fix it immediately:

1) Keep the .master file open within the Visual Studio IDE when working on the .aspx content page.  It turns out the intellisense engine only runs into issues if the .master file is closed.  As long as it is open within the same IDE, it resolves the assemblies just fine and will give you full intellisense:

Figure 2

The screen-shot above is with the exact same sample as the previous screen-shot.  The only difference is that I also have the Site.Master file open in the editor in the background.  When that file is open, I get full intellisense for the ASP.NET AJAX control elements and no intellisense errors.

Alternatively you could instead use the below technique if you don't want to keep the .master file open:

2) Go into your web.config file and change the tag-prefix naming for the ASP.NET AJAX controls to something other than <asp:>.  For example, instead of:

Listing 1

<controls>
<add tagPrefix="asp" namespace="Microsoft.Web.UI" assembly="Microsoft.Web.Extensions" />
 <add tagPrefix="asp" namespace="Microsoft.Web.UI.Controls" assembly="Microsoft.Web.Extensions" />
 </controls> 

change them to something like this:

Listing 2

<controls>
 <add tagPrefix="ajax" namespace="Microsoft.Web.UI" assembly="Microsoft.Web.Extensions" />
 <add tagPrefix="ajax" namespace="Microsoft.Web.UI.Controls" assembly="Microsoft.Web.Extensions" />
 </controls> 

You'd then want to update your tag prefixes in your .aspx page to use this new tag prefix.

Either of these approaches will solve the problem and deliver full intellisense.  The issue should then be resolved completely with Visual Studio 2005 SP1.

Hope this helps (and sorry for the inconvenience),

Scott


View Entire Article

User Comments

No comments posted yet.






Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-02-22 3:19:55 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search