no code in webform using vs.net, but in webform using notepad

Discussion in 'ASP .Net' started by timmso, Dec 12, 2003.

  1. timmso

    timmso Guest

    If I create a webform in notepad (save it with an .aspx extension), I can
    see the VB.Net code along with the ASP.Net code in one file.

    If I create an Asp.Net web application and add a web form using VS.Net, only
    the Asp.Net code is behind the web form.

    Where is the VB.Net code stored? And why is it stored differently than the
    first way I mentioned?

    Thanks.
     
    timmso, Dec 12, 2003
    #1
    1. Advertisements

  2. Hi Timmso,

    VS.Net utilizes the concept of "code behind", where the code/logic to run a
    webpage is stored in a class that inherits from the Page class. Your ASPX
    page then inherits from this codebehind class.

    The code for your file is stored in an aspx.vb file, in the same folder.
    Try Project>Show All Files. The .vb files are then compiled into a DLL, and
    do not need to be uploaded to the production machine.

    IMO, "codebehind" is an ok idea in concept, but is doesn't work well in
    practice in most scenarios -- a change to the .vb file requires rebuilding
    the application. I've found it best to build middle-tier objects in vs.net,
    and use dreamweaver or webmatrix to develop the application. Neither use
    codebehind.

    Alex Papadimoulis

    "timmso" <> wrote in message
    news:...
    > If I create a webform in notepad (save it with an .aspx extension), I can
    > see the VB.Net code along with the ASP.Net code in one file.
    >
    > If I create an Asp.Net web application and add a web form using VS.Net,

    only
    > the Asp.Net code is behind the web form.
    >
    > Where is the VB.Net code stored? And why is it stored differently than the
    > first way I mentioned?
    >
    > Thanks.
    >
    >
    >
    >
     
    Alex Papadimoulis, Dec 12, 2003
    #2
    1. Advertisements

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. JDS
    Replies:
    4
    Views:
    8,728
    ForestHonerkamp
    Nov 11, 2008
  2. VB Programmer
    Replies:
    1
    Views:
    621
    VB Programmer
    Jul 8, 2003
  3. Scott Meddows
    Replies:
    1
    Views:
    538
    John Saunders
    Jun 8, 2004
  4. Michael Washington
    Replies:
    0
    Views:
    668
    Michael Washington
    Oct 12, 2004
  5. RNDAS
    Replies:
    1
    Views:
    13,343
    Nate Hekman
    Apr 26, 2005
  6. =?Utf-8?B?bXN1aw==?=

    Using one webform to set a value on another webform

    =?Utf-8?B?bXN1aw==?=, Jul 12, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    628
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Jul 12, 2006
  7. Ed Hardy
    Replies:
    12
    Views:
    554
    Robert Dober
    Nov 22, 2008
  8. JDS
    Replies:
    3
    Views:
    385
    gnari
    May 24, 2004
Loading...