vs.net not showing intellisense on a .aspx page that usesmasterpages.

  • Thread starter Thread starter DotNetNewbie
  • Start date Start date
D

DotNetNewbie

Hi,

VS.NET is not showing me any intellisense on a page that references a
master page in the codebehind.

(the codebehind references a custom class that inherits from
web.ui.page, and that page sets the master page)

How can I fix this?
 
Could you post your <@Page> tag and a few tags from that page?

It should be only the <@Page> tag and any other @ type tag and then 0 or
more <asp:Content> tags. Is that the case?
 
Could you post your <@Page> tag and a few tags from that page?

It should be only the <@Page> tag and any other @ type tag and then 0 or
more <asp:Content> tags. Is that the case?

<%@ Page Language="C#" AutoEventWireup="true"
Codebehind="categoryAdd.aspx.cs"
Inherits="BLAH.Categories.categoryAdd" %>

<asp:content contentplaceholderid="AdminPlaceHolder" runat="server">

MY CONTENT HERE

</asp:content>

And my codebehind is inheriting from a class that inherits from
web.ui.page
 
Are you seeing curly underlines in your ASPX file?

I don't think there is an attribute called Codebehind! I think you need to
change that to CodeFile. I'm also not seeing a MasterPageFile attribute in
the <@Page> tag. Where are you setting the MasterPage for this page? Is it in
the web.config? Try setting the MasterPageFile attribute of your <@Page> tag
and see if that fixes it.

Your page tag should look something like this
<%@ Page Language="C#" MasterPageFile="~/main.master" AutoEventWireup="true"
CodeFile="categoryAdd.aspx.cs" Inherits="BLAH.Categories.categoryAdd" %>

Also make sure that the namespace in your cs file is set to BLAH.Categories.

Please share your findings. Thanks,
 
Are you seeing curly underlines in your ASPX file?

I don't think there is an attribute called Codebehind! I think you need to
change that to CodeFile. I'm also not seeing a MasterPageFile attribute in
the <@Page> tag. Where are you setting the MasterPage for this page? Is it in
the web.config? Try setting the MasterPageFile attribute of your <@Page> tag
and see if that fixes it.

Your page tag should look something like this
<%@ Page Language="C#" MasterPageFile="~/main.master" AutoEventWireup="true"
CodeFile="categoryAdd.aspx.cs" Inherits="BLAH.Categories.categoryAdd" %>

Also make sure that the namespace in your cs file is set to BLAH.Categories.

Please share your findings. Thanks,

I am using vs.net 2005, web project (using the service pack 1 update,
that makes projects like vs.net 2003).

The master page is referenced like this:

My codebehind inherits from MyCustomPage

And MyCustomPage inherits from System.Web.UI.Page

And in the MyCustomPage, it sets the MasterPage there.
 
Back
Top