Reuse page functionality on another page

Discussion in 'ASP .Net' started by Mel, Jun 1, 2011.

  1. Mel

    Mel Guest

    Can anyone tell me how I would duplicate a page's functionality on
    another page? Do I really need to copy all of the controls from the
    original pages' markup (aspx) and all of the vb code behind and copy
    it to my new page? The downside to that is I need to maintain two
    sets of code. Is there a better way?

    Example: Say I have 3 drop down boxes (material, thickness, color) in
    3 different pages of my site. I want to reuse those controls and the
    code behind across multiple pages of my site. I am not sure if I
    should copy the controls and reuse the code behind or what is the
    preferred method.

    (using asp.net 2.0, visual basic, master pages)
     
    Mel, Jun 1, 2011
    #1
    1. Advertising

  2. Mel

    Mel Guest

    On Jun 1, 9:30 am, Mel <> wrote:
    > Can anyone tell me how I would duplicate a page's functionality on
    > another page?  Do I really need to copy all of the controls from the
    > original pages' markup (aspx) and all of the vb code behind and copy
    > it to my new page?  The downside to that is I need to maintain two
    > sets of code.  Is there a better way?
    >
    > Example: Say I have 3 drop down boxes (material, thickness, color) in
    > 3 different pages of my site.  I want to reuse those controls and the
    > code behind across multiple pages of my site.  I am not sure if I
    > should copy the controls and reuse the code behind or what is the
    > preferred method.
    >
    > (using asp.net 2.0, visual basic, master pages)


    I am thinking about using user controls. Please reply to this post if
    you have any other suggestions.

    Link - how to create a user control:
    http://asp.net-tutorials.com/user-controls/creating/
     
    Mel, Jun 1, 2011
    #2
    1. Advertising

  3. On Wed, 1 Jun 2011 14:38:16 -0700 (PDT), Mel <>
    wrote:

    >On Jun 1, 9:30 am, Mel <> wrote:
    >> Can anyone tell me how I would duplicate a page's functionality on
    >> another page?  Do I really need to copy all of the controls from the
    >> original pages' markup (aspx) and all of the vb code behind and copy
    >> it to my new page?  The downside to that is I need to maintain two
    >> sets of code.  Is there a better way?
    >>
    >> Example: Say I have 3 drop down boxes (material, thickness, color) in
    >> 3 different pages of my site.  I want to reuse those controls and the
    >> code behind across multiple pages of my site.  I am not sure if I
    >> should copy the controls and reuse the code behind or what is the
    >> preferred method.
    >>
    >> (using asp.net 2.0, visual basic, master pages)

    >
    >I am thinking about using user controls. Please reply to this post if
    >you have any other suggestions.
    >
    >Link - how to create a user control:
    >http://asp.net-tutorials.com/user-controls/creating/


    You've answered your own question.

    regards
    A.G.
     
    Registered User, Jun 2, 2011
    #3
    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. tshad
    Replies:
    5
    Views:
    534
    Steve C. Orr [MVP, MCSD]
    May 17, 2005
  2. Hylander

    To reuse or not to reuse....

    Hylander, Feb 26, 2004, in forum: Java
    Replies:
    0
    Views:
    421
    Hylander
    Feb 26, 2004
  3. code reuse and design reuse

    , Feb 7, 2006, in forum: C Programming
    Replies:
    16
    Views:
    1,024
    Malcolm
    Feb 12, 2006
  4. jacob navia

    To reuse or not to reuse

    jacob navia, Nov 5, 2006, in forum: C Programming
    Replies:
    19
    Views:
    529
    Dave Thompson
    Dec 18, 2006
  5. jonefer

    Saving the selected AJAX tab for reuse on another page

    jonefer, May 18, 2008, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    819
    jonefer
    May 18, 2008
Loading...

Share This Page