Monday, March 26, 2012

newbie aspx.vb file question

I am brand new at building asp.net web sites. I am going through a site now that has some code behind links to aspx.vb files. I realize these files are compiled into dlls and used that way. But I am trying to find the aspx.vb files so I can review the actual code. Where are these files normally kept?

Thank you, in advance.

Jim

Hey Jim,

The *.vb files should be kept in the same directory as their corresponding *.aspx file. If the *.vb files don't exist in the same directory as the *.aspx files it is because a) the web site was pre-compiled and the code behind files are now packaged in a DLL as you mentioned or b) the code behind is inline in the *.aspx files (the code behind files do not have to be separated out into a separate file, they can be in the *.aspx file in a <script> block.)

Quick reference:

*.aspx files: Presentation Layer (HTML + ASP.NET controls)

*.vb or *.cs files : Codebehind files that go along with matchting *.aspx files (these are optional as code can be included in <script> blocks in the *.aspx pages.)

Hope that helps.

-Aaron

0 comments:

Post a Comment