Cannot reference page classes

  • Thread starter Thread starter Kevin Lawrence via .NET 247
  • Start date Start date
K

Kevin Lawrence via .NET 247

Hi

I'm using Beta 2, I haven't tried Beta 1 yet so I'm not sure if that's relevent.

Why can't I reference my WebForm classes?

For example I want to put a static method on a WebForm class so that I can pass an argument to it, however I can only reference certain classes in the ASP namespace.

Why is this? Sorry if I haven't explained too well.
 
This isn't encouraged as it's probabaly not the right way to go about doing
whatever you're trying to do. If you want shared code to be used by many
pages, then you should factor that out into a seperate class. You can create
classes in the App_Code directory and those will automatically be compiled
for you in ASP.NET (and referenced) so you can use that common code by any
page.

What exactly are you trying to do in the common code that you want to put
in a ASPX file?

-Brock
DevelopMentor
http://staff.develop.com/ballen
 

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

Back
Top