Trans from ASP to ASP.NET 2.0 via 1.0

Discussion in 'ASP .Net' started by Anthony Bollinger, May 12, 2006.

  1. 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
     
    Anthony Bollinger, May 12, 2006
    #1
    1. Advertising

  2. 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.
     
    Flinky Wisty Pomm, May 13, 2006
    #2
    1. Advertising

  3. 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!
    *************************************************
    "Anthony Bollinger" <> wrote in message
    news:uCpEc%...
    >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
    >
     
    Cowboy \(Gregory A. Beamer\), May 13, 2006
    #3
  4. Both of your tips were great help. I think I am getting there, but I'll be
    back.

    Thanks!
    Tony
     
    Anthony Bollinger, May 14, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Gerry Hickman
    Replies:
    2
    Views:
    1,515
    Gerry Hickman
    Dec 14, 2005
  2. Jonathan N. Little
    Replies:
    13
    Views:
    5,668
    Jonathan N. Little
    Feb 6, 2005
  3. rob
    Replies:
    4
    Views:
    3,034
  4. clyyy2002
    Replies:
    1
    Views:
    105
    Chad Z. Hower aka Kudzu
    May 14, 2005
  5. Pen Ttt

    trans string into array

    Pen Ttt, Dec 31, 2010, in forum: Ruby
    Replies:
    4
    Views:
    111
    Brian Candler
    Jan 1, 2011
Loading...

Share This Page