no IntelliSense & "Not a known element" error everywhere

Last post 08-01-2007 12:10 PM by axxon. 32 replies.

Sort Posts:

  • no IntelliSense & "Not a known element" error everywhere

    10-21-2006, 6:32 AM
    • Member
      139 point Member
    • conquer0
    • Member since 09-30-2005, 11:43 PM
    • Germany
    • Posts 33

    I have just installed ajax beta 1 & ctp.
    All works fine BUT I have no IntelliSense inside of masterpages (inside of asp:Content blocks)
    And I have syntax errors on ajax controls and all default asp controls. But only if these are after a ajax control.

    I tried this with a new "AJAX-Enabled Web Site" & "AJAX CTP-Enabled Web Site", same problem!!

    There are no problems inside of a 'standard' aspx page!

    I have no atlas dlls inside of my projects or somewhere else.
     

    can somebody help me please?

  • Re: no IntelliSense & "Not a known element" error everywhere

    10-21-2006, 11:24 AM
    • Member
      139 point Member
    • conquer0
    • Member since 09-30-2005, 11:43 PM
    • Germany
    • Posts 33

    strange! I get no syntax error if I open the Masterpage and let it open!

    maybe a bug?

    Filed under:
  • Re: no IntelliSense & "Not a known element" error everywhere

    10-21-2006, 12:27 PM
    • All-Star
      17,453 point All-Star
    • albertpascual
    • Member since 05-23-2003, 2:11 PM
    • Riverside, CA
    • Posts 3,474
    Can you post the code here so we can take a look and try it in our VS2005?
    Cheers
    Al
    My Blog
    MapStats.NET
    Please click on 'Mark as Answer' if this post answered your question!
  • Re: no IntelliSense & "Not a known element" error everywhere

    10-21-2006, 1:14 PM
    • Member
      139 point Member
    • conquer0
    • Member since 09-30-2005, 11:43 PM
    • Germany
    • Posts 33

    of course

    I do this steps:

    1. Create a new ajax enabled web site from templates
    2. create a new master page & close this
    3. create a new web form and select the master page
    4. add a update panel  

     <%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" Title="Untitled Page" %>
    <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <
    asp:UpdatePanel runat="server" ID="upnl_totalCount">
    <ContentTemplate>
    <label id="lbl_mylable" runat="server" />
    </ContentTemplate>
    </
    asp:UpdatePanel>
    </
    asp:Content>

    and now, I have the following 2 errors and no intellisense

    Error 1 Element 'UpdatePanel' is not a known element. This can occur if there is a compilation error in the Web site. E:\Workspace\Test\AJAXBeta1\Default2.aspx 3 6 E:\...\AJAXBeta1\
    Error 2 Validation (XHTML 1.0 Transitional): Element 'contenttemplate' is not supported. E:\Workspace\Test\AJAXBeta1\Default2.aspx 4 6 E:\...\AJAXBeta1\

    If I open the masterpage now and go back to my default2.aspx site I have the intellisense back and no errors :)

  • Re: no IntelliSense & "Not a known element" error everywhere

    10-21-2006, 5:44 PM
    • Member
      346 point Member
    • chadly
    • Member since 06-26-2005, 9:39 PM
    • Posts 70

    I am having the same problem.  Very aggrevating...  No intellisense on any of the AJAX controls (UpdatePanel, Timer, etc...) or any of the AjaxControlToolkit controls.  All of the ajax controls generate a "not a known element" parsing error when looking at a page in source view.  Anything within the AJAX controls (inside of an update panel, etc.) also display the "not a known element" error.

     
    It happens on content pages when using a master page.

  • Re: no IntelliSense & "Not a known element" error everywhere

    10-21-2006, 7:47 PM
    • Member
      161 point Member
    • aschreiber2
    • Member since 10-17-2006, 3:33 AM
    • Posts 35

    Whew! I thought I was the only one having these problems. Everything worked fine when I used Atlas. Then I installed Beta1 and the CTP and it all went down the tubes. I followed all of the instructions and modified my Web.Config accordingly. In fact, just to be on the safe side I started a whole new project using the new web project templates that are now available and even those don't compile!

    What's even stranger is that even regular ASP.NET controls now are being flagged as errors. In my code below, the UpdatePanel and DetailsView controls all have squiggly red lines beneath their respective tags. Nothing will compile anymore.

    <asp:UpdatePanel ID="UpdatePanel2" runat="server">

    <ContentTemplate>

    <asp:DetailsView OnItemUpdated="dvContactDetails_ItemUpdated" ID="dvContactDetails" runat="server"

    AutoGenerateRows="False" DataSourceID="ObjContactDetailsDS" DefaultMode="Edit" Width="125px" AllowPaging="True" DataKeyNames="ContactID" GridLines="None"

    HeaderText="Contact Details" SkinID="detailsviewSkin" OnPageIndexChanging="dvContactDetails_PageIndexChanging">

    <Fields>

    <asp:BoundField DataField="FirstName" HeaderText="FirstName" SortExpression="FirstName" />

    <asp:BoundField DataField="LastName" HeaderText="LastName" SortExpression="LastName" />

    <asp:TemplateField HeaderText="Title" SortExpression="TitleID">

    <EditItemTemplate>

    <asp:DropDownList ID="DropDownList2" runat="server" DataSourceID="ObjGetTitlesDS"

    DataTextField="TitleName" DataValueField="TitleID" SelectedValue='<%# Bind("TitleID") %>'>

    </asp:DropDownList>&nbsp;<asp:CheckBox ID="CheckBox1" runat="server" Checked='<%# Bind("isPrimaryTitle") %>'

    ToolTip="Set this title as the contact's primary title?" />

    </EditItemTemplate>

    <InsertItemTemplate>

    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("TitleID") %>'></asp:TextBox>

    </InsertItemTemplate>

    <ItemTemplate>

    <asp:Label ID="Label1" runat="server" Text='<%# Eval("TitleName") %>'></asp:Label>

    </ItemTemplate>

    </asp:TemplateField>

    <asp:TemplateField HeaderText="Organization" SortExpression="OrganizationID">

    <EditItemTemplate>

    <asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="ObjGetOrganizationsDS"

    DataTextField="OrganizationName" DataValueField="OrganizationID" SelectedValue='<%# Bind("OrganizationID") %>'>

    </asp:DropDownList>

    </EditItemTemplate>

    <InsertItemTemplate>

    <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("OrganizationID") %>'></asp:TextBox>

    </InsertItemTemplate>

    <ItemTemplate>

    <asp:Label ID="Label2" runat="server" Text='<%# Eval("OrganizationName") %>'></asp:Label>

    </ItemTemplate>

    </asp:TemplateField>

    <asp:BoundField DataField="Email" HeaderText="Email" SortExpression="Email" />

    <asp:BoundField DataField="UserName" HeaderText="UserName" SortExpression="UserName" />

    <asp:BoundField DataField="Address1" HeaderText="Address1" SortExpression="Address1" />

    <asp:BoundField DataField="Address2" HeaderText="Address2" SortExpression="Address2" />

    <asp:BoundField DataField="City" HeaderText="City" SortExpression="City" />

    <asp:TemplateField HeaderText="State" SortExpression="StateID">

    <EditItemTemplate>

    <asp:DropDownList ID="DropDownList3" runat="server" DataSourceID="ObjGetStatesDS"

    DataTextField="StateName" DataValueField="StateID" SelectedValue='<%# Bind("StateID") %>'>

    </asp:DropDownList>

    </EditItemTemplate>

    <InsertItemTemplate>

    <asp:DropDownList ID="DropDownList4" runat="server" DataSourceID="ObjGetStatesDS"

    DataTextField="StateName" DataValueField="StateID" SelectedValue='<%# Bind("StateID") %>'>

    </asp:DropDownList>

    </InsertItemTemplate>

    <ItemTemplate>

    <asp:Label ID="Label3" runat="server" Text='<%# Eval("StateName") %>'></asp:Label>

    </ItemTemplate>

    </asp:TemplateField>

    <asp:BoundField DataField="Zip" HeaderText="Zip" SortExpression="Zip" />

    <asp:TemplateField HeaderText="Country" SortExpression="CountryID">

    <EditItemTemplate>

    <asp:DropDownList ID="DropDownList5" runat="server" DataSourceID="ObjGetCountriesDS"

    DataTextField="CountryName" DataValueField="CountryID" SelectedValue='<%# Bind("CountryID") %>'>

    </asp:DropDownList>

    </EditItemTemplate>

    <InsertItemTemplate>

    <asp:TextBox ID="TextBox4" runat="server" Text='<%# Bind("CountryID") %>'></asp:TextBox>

    </InsertItemTemplate>

    <ItemTemplate>

    <asp:Label ID="Label4" runat="server" Text='<%# Bind("CountryID") %>'></asp:Label>

    </ItemTemplate>

    </asp:TemplateField>

    <asp:BoundField DataField="Phone" HeaderText="Phone" SortExpression="Phone" />

    <asp:BoundField DataField="Fax" HeaderText="Fax" SortExpression="Fax" />

    <asp:BoundField DataField="Mobile" HeaderText="Mobile" SortExpression="Mobile" />

    <asp:BoundField DataField="Pager" HeaderText="Pager" SortExpression="Pager" />

    <asp:CommandField ButtonType="Button" ShowEditButton="True" ShowDeleteButton="True"

    ShowInsertButton="True" />

    </Fields>

    <FooterStyle Height="18px" />

    </asp:DetailsView>

    </ContentTemplate>

    </asp:UpdatePanel>

     

  • Re: no IntelliSense & "Not a known element" error everywhere

    10-21-2006, 8:01 PM
    • Member
      161 point Member
    • aschreiber2
    • Member since 10-17-2006, 3:33 AM
    • Posts 35

    Update ...

    When I start a new project using the Ajax ASP.NET template my site DOES compile -BUT I still get the squiggly lines and no IntelliSense.

  • Re: no IntelliSense & "Not a known element" error everywhere

    10-21-2006, 11:36 PM
    • Contributor
      2,019 point Contributor
    • Jason Hill
    • Member since 04-23-2006, 3:39 AM
    • Sydney, Australia
    • Posts 479

    It looks like a few people are having this problem (including me!) and I posted to this thread earlier today: http://forums.asp.net/thread/1436198.aspx

    The problem only seems to occur for me when using a Master Page...is that the same for you?  I also tried creating a fresh project using the installed VS template but the problem is the same.  Seems like it could be a problem with the beta release.

    I hope this gets fixed soon because I have migrated a site from Atlas to beta 1 and I don't fancy undoing/redoing all of that!

    Cheers, 

    Jason

  • Re: no IntelliSense & "Not a known element" error everywhere

    10-22-2006, 5:22 AM
    • Member
      139 point Member
    • conquer0
    • Member since 09-30-2005, 11:43 PM
    • Germany
    • Posts 33
    Jason Hill:

    I hope this gets fixed soon because I have migrated a site from Atlas to beta 1 and I don't fancy undoing/redoing all of that!

    Just open your masterpage after opening your aspx page and you can debug! I know it's not a nice solution.. but it is a solution.

    Or you can close all files first and then debug.

  • Re: no IntelliSense & "Not a known element" error everywhere

    10-22-2006, 6:38 AM
    • Contributor
      2,019 point Contributor
    • Jason Hill
    • Member since 04-23-2006, 3:39 AM
    • Sydney, Australia
    • Posts 479
    Yep...closing all pages in the IDE gets rid of the build errors, but intellisense is stuffed in source view...bugger!
  • Re: no IntelliSense & "Not a known element" error everywhere

    10-22-2006, 11:28 AM
    • Member
      73 point Member
    • ericpopivker
    • Member since 04-21-2006, 8:06 PM
    • New York, NY
    • Posts 21

    A temporary fix (till MS fixes it) is to change the 'asp' prefix in web.config file back to 'atlas' (actually anything other 'asp' would work) and then change prefix to 'atlas' on UpdatePanel and ScriptManager controls.  Then intellisense works again.

    Eric
    DeveloperX
  • Re: no IntelliSense & "Not a known element" error everywhere

    10-22-2006, 6:05 PM
    • Member
      10 point Member
    • pedro.machado
    • Member since 03-16-2006, 2:33 PM
    • Posts 2

    Hello everybody,

     good tip Eric. Yesterday I was testing the beta 1 of ajax and had that problem. Your tip helped me,

     Thanks,

     Pedro

     

     

  • Re: no IntelliSense & "Not a known element" error everywhere

    10-22-2006, 6:29 PM
    • Member
      25 point Member
    • weerasin
    • Member since 06-01-2006, 12:52 AM
    • Posts 5

    Hi Everybody,

    I had the same error. I opened my site master page and left it open in VS2005 and then opened my page with ScriptManger and UpdatePanel. The squigllies are gone and not I am getting Intellisense again.

    I looks like it a bug related to master pages. Please confirm if this works for other people with the same problem.

     Thanks,

    Mike

  • Re: no IntelliSense & "Not a known element" error everywhere

    10-22-2006, 6:31 PM
    • Member
      25 point Member
    • weerasin
    • Member since 06-01-2006, 12:52 AM
    • Posts 5
    Oops. Small edit. Now I am getting Intellisense again. (Disregard the word "not" in above post.)
  • Re: no IntelliSense & "Not a known element" error everywhere

    10-22-2006, 6:50 PM
    • Member
      161 point Member
    • aschreiber2
    • Member since 10-17-2006, 3:33 AM
    • Posts 35

    Just to update my posting again, yes I am also using Master Pages. I think that pretty much everyone is here. I with we could make an amendment to the thread title to include "... while using master pages".

    I am also confirming that when I open up the master page in the IDE and switch back to my content pages, the squiggly lines disappear and IntelliSense is now working.

    On a separate note, does anyone here know how to remove all references to a project/website so it never appears in Visual Sudio again?

    Here is what I have done so far to date.

    For websites running on local IIS, I delete the site from IIS and the root folder and all of it's subfolders and files get deleted with it. I also make sure to delete the project folder containing the solution files from the C:\My Documents\Visual Studio 2005\Projects folder AND I also deleted the entries to the projects from the C:\Documents and Settings\Username\Local Settings\Application Data\Microsoft\WebsiteCache folder and removed the site entry from the Websites.xml file located in the WebsiteCache folder.

    The problem I am running into, is that each time I do that and try and create a new project with the same name as the one I thought I just deleted it uses the format NewProjectName(1). Which can only mean that somewhere else on my computer there must still be a reference to the old project name that I have not removed and as a result Visual Studio cannot give it the same name as the the other project so it appends the (1) to the name (which I don't want).

     Any tips would be appreciated.

Page 1 of 3 (33 items) 1 2 3 Next >