Problems with codebehind and inherits

G

Guest

Hi all, first time poster here. For some reason, the default codebehind =
"blahblah.aspx.vb" statement that ASP.NET inserts into a new .aspx file has
never worked for me, and I don't know why. I can only get my page to
recognize the .vb file if I change "codebehind=Blahblah.aspx.vb" to
"src=Blahblah.aspx.vb".

Also, by default ASP.NET has my pages inherit from Namespace.Class,
Namespace being my project name, and Class being whichever Class corresponds
to that file in the .vb section. This doesn't work either, and gives me and
error, saying that that class can't be found. However, if I change it to just
reference the class name itself, without the Namespace., it works fine.

After I've done all of this, my pages do load, but next time I load up
visual studio and try to bring up my pages, it won't load the GUI part, so I
can't see what my page should look like. I'm forced to go into the code part
of the .aspx file, cut and paste the entire <%@ Page line out of the code,
reload it, and then put that code back in. Then I get the GUI and the
functionality. But I have to do this every time I load a different page.

It seems like I have problems in general with referencing class definitions
within my own applications and I don't know why. I loaded the application of
a co-worker and he didn't have a single one of these problems, so I'm not
sure what I'm doing wrong. I was deleting the global.asax file and not using
it, but I didn't think that made a difference. I'm not using any compiled
components (dlls) in my bin directory, or at least not any dlls compiled from
code I've actually written (I've got dlls for things like Crystal Reports in
there).

Anyways, if anyone has heard of things like this happening or perhaps knows
a common solution, I'd really appreciate hearing it.
 

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,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top