Code-separation in ASP.NET 2.0

Discussion in 'ASP .Net' started by Michael, Nov 11, 2005.

  1. Michael

    Michael Guest

    Hi,

    I'm using Visual Studio 2005 RTM.
    After reading some articles about ASP.NET beta1 & beta2,
    I'm confused...

    Q1: Is the default coding mode Inline code?

    Q2: How many .DLLs will be generated for one page?
    it saids that .aspx will be compiled into a DLL, and the
    separated .cs/.vb file will be another.

    Q3: What is the effect of "Inherit" attribute in @Page directive?
    Does it mean the .aspx page inherit from the separated class?
    I though the two files are compiled into one class through
    partial class mechanism, am I right?

    Thank you!
     
    Michael, Nov 11, 2005
    #1
    1. Advertising

  2. > Q1: Is the default coding mode Inline code?

    If you create a new web app the default web form has "Code Behind"

    > Q2: How many .DLLs will be generated for one page?
    > it saids that .aspx will be compiled into a DLL, and the
    > separated .cs/.vb file will be another.


    Either oner dll per page or app but definatly aspx and codebehind in one
    dll.

    > Q3: What is the effect of "Inherit" attribute in @Page directive?
    > Does it mean the .aspx page inherit from the separated class?
    > I though the two files are compiled into one class through
    > partial class mechanism, am I right?


    A page with copde behind will be compiled in TWO CLASSES.


    --
    Daniel Fisher(lennybacon)
    http://www.lennybacon.com


    "Michael" <> wrote in message
    news:...
    > Hi,
    >
    > I'm using Visual Studio 2005 RTM.
    > After reading some articles about ASP.NET beta1 & beta2,
    > I'm confused...
    >
    > Q1: Is the default coding mode Inline code?
    >
    > Q2: How many .DLLs will be generated for one page?
    > it saids that .aspx will be compiled into a DLL, and the
    > separated .cs/.vb file will be another.
    >
    > Q3: What is the effect of "Inherit" attribute in @Page directive?
    > Does it mean the .aspx page inherit from the separated class?
    > I though the two files are compiled into one class through
    > partial class mechanism, am I right?
    >
    > Thank you!
    >
     
    Daniel Fisher\(lennybacon\), Nov 11, 2005
    #2
    1. Advertising

  3. Michael

    Michael Guest

    >> Q1: Is the default coding mode Inline code?
    >
    > If you create a new web app the default web form has "Code Behind"


    Thank you! Daniel.
    There're Code-behind, Code-beside, and Code-separation mode,
    I wonder which is the "official" term?

    Michael
     
    Michael, Nov 12, 2005
    #3
  4. re:
    > Q1: Is the default coding mode Inline code?


    You can choose either.

    When you create a new file, choose whether it will be codebehind or inlne.
    The VS IDE will remember your choice, although you can change it anytime.

    re:
    > Q2: How many .DLLs will be generated for one page?


    That will depend on the code model and the publishing model you select.

    There's a new tool which allows 2.0 developers
    to publish the site dll's in various modes.

    Check it out at :
    http://msdn.microsoft.com/asp.net/reference/infrastructure/wdp/default.aspx




    Juan T. Llibre, ASP.NET MVP
    ASP.NET FAQ : http://asp.net.do/faq/
    ASPNETFAQ.COM : http://www.aspnetfaq.com/
    Foros de ASP.NET en EspaƱol : http://asp.net.do/foros/
    ======================================
    "Michael" <> wrote in message
    news:...
    > Hi,
    >
    > I'm using Visual Studio 2005 RTM.
    > After reading some articles about ASP.NET beta1 & beta2,
    > I'm confused...
    >
    > Q1: Is the default coding mode Inline code?
    >
    > Q2: How many .DLLs will be generated for one page?
    > it saids that .aspx will be compiled into a DLL, and the
    > separated .cs/.vb file will be another.
    >
    > Q3: What is the effect of "Inherit" attribute in @Page directive?
    > Does it mean the .aspx page inherit from the separated class?
    > I though the two files are compiled into one class through
    > partial class mechanism, am I right?
    >
    > Thank you!
    >
     
    Juan T. Llibre, Nov 12, 2005
    #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. Wayne Liu

    Question on view and code separation

    Wayne Liu, Jul 25, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    343
    Wayne Liu
    Jul 25, 2003
  2. tshad
    Replies:
    2
    Views:
    347
    tshad
    Dec 2, 2004
  3. Chris Ashley
    Replies:
    1
    Views:
    346
    Chris Ashley
    Aug 19, 2005
  4. Rob Cowie

    Separation of Code in CGI App

    Rob Cowie, Jul 22, 2005, in forum: Python
    Replies:
    6
    Views:
    474
    Bruno Desthuilliers
    Jul 23, 2005
  5. prschmid

    Data and Code separation

    prschmid, Jul 25, 2004, in forum: ASP General
    Replies:
    5
    Views:
    155
    Jeff Cochran
    Jul 25, 2004
Loading...

Share This Page