Missing Something on pageBaseType?

G

Guest

The documentation on the <page> element on the configuration file states--

pageBaseType Specifies a code-behind class that .aspx pages inherit by
default.

I have tried everything I can think of and have managed to get the
configuration file to be processed without error but have not managed to get
the Page Base Type set to my class. Am I missing something here?

I'm using VS 2003 and can use my class by editing it into a page but have
not been able to get it in using pageBaseType.

Thank You
 
G

Girish Bharadwaj

How did you specify the value for it?I believe it needs to be
pageBaseType="assemblyName, typeName" format. Is it that way?
 
G

Guest

Actually I have pageBaseType="typeName, assemblyName" Which is the only
thing that would allow the config file to be processed without error.
 
G

Girish Bharadwaj

You are right. I am wrong.

I tried it with a couple hand-coded (instead of VS.NET) aspx file +
assembly. And it works just fine.
So, I think the problem is that VS.NET does this trick with ASPX pages which
is to create that aspx.cs files which are the base class for the actual ASPX
file. And, of course, VS.NET depends on that relation for things to work.
Basically, the use of <Inherits> attribute on @Page states that you want to
use a particular class as the base class explicitly.

I guess, you are stuck. Because, there is an intermediary class derived
from Page class which is the base for the ASPX page. If you remove the
"Inherits" from that attribute, it will probably work. But then, VS.NET
will re-insert it again when you edit the file.
Good news is that VS.NET 2005 fixes it but the bad news is that, well, it
aint here.

Of course, somebody else might have a better idea.
 
G

Guest

Thanks. I wouldn't of thought of going outside of VS.NET (bad habit).

Story of my life ... out of luck

Thanks again.
 

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

No members online now.

Forum statistics

Threads
473,772
Messages
2,569,593
Members
45,111
Latest member
VetaMcRae
Top