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

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?
 
M

Mohamad Elarabi [MCPD]

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?
 
D

DotNetNewbie

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
 
M

Mohamad Elarabi [MCPD]

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,
 
D

DotNetNewbie

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,024
Latest member
ARDU_PROgrammER

Latest Threads

Top