Monday, March 26, 2012

VS 2005 and intellisense

Hi there.

I seems that when it comes to intellisense, VS 2005does not seem to cope with the AJAX tags when used from a page thatinherits from a master page. For instance, take this basic page:

<%@dotnet.itags.org. Page Language="VB" MasterPageFile="~/Master.master"AutoEventWireup="false" CodeFile="Test2.aspx.vb" Inherits="Test2"title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true">
</asp:ScriptManager>
</asp:Content

The openining "ScriptManager" is underlined in red for me as an unknownelement. I'm using VS 2005 Team Edition with the latest Beta downloadof the AJAX library. Can anyone help?

Cheers,

Mike

Just to let you know that you are not alone. I have the same problem.

Same here. I didn't realize it was the master page that was causing this problem for me though. Thanks for pointing it out.


Find the following section in the web.config file:
<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></pages>

change it to

<pages><controls><add tagPrefix="msajax" namespace="Microsoft.Web.UI" assembly="Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/><add tagPrefix="msajax" namespace="Microsoft.Web.UI.Controls" assembly="Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/></controls></pages>

You can choose your own tag prefix, just dont' use 'asp' as a prefix. Next you must change the prefix for things like update panel to your chosen tag prefix.


wow... thanks for this!


Hi, it is a stupid problem in the all versions of VS Studion 2005. We had some discussions with guys from Microsoft, but without any results... If you use some master in the your page, and Intellisense doesn't work - just open required master page in the VS Studio, switch back to the your page and - all will be Ok...

No comments:

Post a Comment