Ponder points. "code behind" framework

Discussion in 'ASP .Net' started by Girish, Jan 23, 2004.

  1. Girish

    Girish Guest

    I understand that the code behind concept is a framework that separates code
    logic from visulization code.

    I belive this is true for pages that are mostly static. Ie. Forms elements
    on a page that are fixed in number.

    What if i had a requirement that involves a highly dynamic page, with a
    dynamic number of form elements based on various user selections. I cant
    see how I cant separate code that splits the "form generation logic" as a
    code behind and have another file that would just hold "visulisation code".

    Any thoughts on this?

    Thanks,
    Girish
     
    Girish, Jan 23, 2004
    #1
    1. Advertising

  2. Girish

    Marina Guest

    If your page is completely unpredictable, then the .aspx page would be
    pretty much empty, and the code behind would truly generate all the content.
    It can do this by dynamically creating elements (textboxes, labels, grids,
    etc) and adding them to the page at run time.

    Otherwise, your page might have placeholders for certain pieces, and your
    codebehind would filll in the blanks at run time depending on what it needed
    to do.

    So this model allows for any level of extensibility. The page can be
    completely static, or completely dynamic, and this model supports both.

    "Girish" <> wrote in message
    news:%...
    > I understand that the code behind concept is a framework that separates

    code
    > logic from visulization code.
    >
    > I belive this is true for pages that are mostly static. Ie. Forms elements
    > on a page that are fixed in number.
    >
    > What if i had a requirement that involves a highly dynamic page, with a
    > dynamic number of form elements based on various user selections. I cant
    > see how I cant separate code that splits the "form generation logic" as a
    > code behind and have another file that would just hold "visulisation

    code".
    >
    > Any thoughts on this?
    >
    > Thanks,
    > Girish
    >
    >
     
    Marina, Jan 23, 2004
    #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. Ben Miller [msft]

    Re: Code Behind vs. no code behind: error

    Ben Miller [msft], Jun 27, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    630
    Alphonse Giambrone
    Jun 28, 2003
  2. Daniel Manes

    Code-Behind Pain in the Behind!

    Daniel Manes, Jun 10, 2005, in forum: ASP .Net
    Replies:
    11
    Views:
    693
  3. =?Utf-8?B?TGlicw==?=
    Replies:
    0
    Views:
    320
    =?Utf-8?B?TGlicw==?=
    Jul 27, 2006
  4. John

    Non-code behind to code behind

    John, Feb 19, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    521
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Feb 19, 2007
  5. John Joyce

    an interesting one-liner to ponder

    John Joyce, Nov 17, 2007, in forum: Ruby
    Replies:
    1
    Views:
    103
    Robert Klemme
    Nov 17, 2007
Loading...

Share This Page