Trans from ASP to ASP.NET 2.0 via 1.0

A

Anthony Bollinger

I find myself in an interesting dilemma. I know both VB6 and ASP. Also, I
have to take a bunch of ASP pages into ASP.NET 2.0, so I bought three good
books for 2.0. Here is the real clincher--the present state of the project
is in ASP.NET 1.0. (I didn't write the original version, I have just gotten
involved.)

I understand ASP just fine, where all of the code is on the page. I also
understand from the ASP.NET 2.0 books that there are now .vb files with the
code behind the page. The mystery for me . . . is 1.0 the same? I am going
over the .aspx page with a fine-tooth comb and cannot find any reference to
a .vb file and there is no code on the page, and yet somehow the .aspx page
is (1) running a query on the database, and (2) displaying the results in a
table. I cannot figure out how the page can do this. Just so you know, I
am an experienced programmer in several other languages (C++, HTML, Delphi,
PHP, VB6, etc.), although I am just beginning to learn ASP.NET, so it is not
like I am missing any file references that are obvious.

I have text-searched the .aspx file for the following strings (case
insensitive): VB, SELECT, SQL, RecordSet, Database, and query. None of
those strings are in the file!

While I am starting to get a handle on 2.0 through the books, maybe I will
need to learn 1.0 also. I hope not. Can anyone explain what is going on?

Thanks,
Tony
 
F

Flinky Wisty Pomm

Is there an Inherits property on the page declaration?
<%@ Page Inherits="SomeClass" %>

If so, your code is probably elsewhere and compiled into a DLL in the
/bin directory.

You can use codebehind, or you can tell the page which class to use.
Which method you go with is up to you. I prefer to specify the class
and compile all my pages at once just in case someone modifies a page
class file and forgets to test the page. This happens with depressing
frequency, and at least this way I can catch compile time errors in
codebehind.
 
C

Cowboy \(Gregory A. Beamer\)

Both 1.x and 2.0 use a code page model. 2.0 has changed the model, but it
can still use 1.x assemblies. To make things truly 2.0, you will have a
small bit of migration into partial classes, but that is it.

As for the reference to a code file, look at the @Page tag at the top of the
page. it will point to the file. If you are using Visual Studio .NET, you
can either choose "show all files" in the solution explorer or click the
"show code" button when the aspx page is selected. You will then see the
code.

--
Gregory A. Beamer

*************************************************
Think Outside the Box!
*************************************************
 
A

Anthony Bollinger

Both of your tips were great help. I think I am getting there, but I'll be
back.

Thanks!
Tony
 

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,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top