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 YouHow did you specify the value for it?I believe it needs to be
pageBaseType="assemblyName, typeName" format. Is it that way?
Girish Bharadwaj
http://msmvps.com/gbvb
"Perley" <Perley@.newsgroup.nospam> wrote in message
news:9AB1F820-3D33-4FA0-A262-E824BC960DDF@.microsoft.com...
> 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
Actually I have pageBaseType="typeName, assemblyName" Which is the only
thing that would allow the config file to be processed without error.
"Girish Bharadwaj" wrote:
> How did you specify the value for it?I believe it needs to be
> pageBaseType="assemblyName, typeName" format. Is it that way?
> --
> Girish Bharadwaj
> http://msmvps.com/gbvb
> "Perley" <Perley@.newsgroup.nospam> wrote in message
> news:9AB1F820-3D33-4FA0-A262-E824BC960DDF@.microsoft.com...
> get
>
>
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.
Girish Bharadwaj
http://msmvps.com/gbvb
"Perley" <Perley@.newsgroup.nospam> wrote in message
news:1D39F295-45BA-4F0F-B56E-34B4517DCEB6@.microsoft.com...
> Actually I have pageBaseType="typeName, assemblyName" Which is the only
> thing that would allow the config file to be processed without error.
> "Girish Bharadwaj" wrote:
>
states--
to
have
Thanks. I wouldn't of thought of going outside of VS.NET (bad habit).
Story of my life ... out of luck
Thanks again.
"Girish Bharadwaj" wrote:
> 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 whi
ch
> is to create that aspx.cs files which are the base class for the actual AS
PX
> 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 t
o
> 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.
> --
> Girish Bharadwaj
> http://msmvps.com/gbvb
> "Perley" <Perley@.newsgroup.nospam> wrote in message
> news:1D39F295-45BA-4F0F-B56E-34B4517DCEB6@.microsoft.com...
> states--
> to
> have
>
>
Thursday, March 29, 2012
Missing Something on pageBaseType?
Labels:
asp,
aspx,
class,
code-behind,
configuration,
documentation,
element,
file,
inherit,
ltpagegt,
missing,
net,
pagebasetype,
pages,
specifies,
states-pagebasetype
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment