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. Advertising

  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. 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. JDS
    Replies:
    4
    Views:
    8,218
    ForestHonerkamp
    Nov 11, 2008
  2. Michael Washington
    Replies:
    0
    Views:
    445
    Michael Washington
    Oct 12, 2004
  3. RNDAS
    Replies:
    1
    Views:
    12,567
    Nate Hekman
    Apr 26, 2005
  4. Ed Hardy
    Replies:
    12
    Views:
    249
    Robert Dober
    Nov 22, 2008
  5. JDS
    Replies:
    3
    Views:
    172
    gnari
    May 24, 2004
Loading...

Share This Page