Web user control (.ascx ) VS page (.aspx)

Last post 05-19-2009 3:30 PM by mpakala. 3 replies.

Sort Posts:

  • Web user control (.ascx ) VS page (.aspx)

    05-19-2009, 11:40 AM
    • Member
      point Member
    • mpakala
    • Member since 04-11-2007, 1:09 PM
    • Posts 24

    We are converting a 1.1 application to 2.0. The application used web user controls extensively for header, footer and all the other content common across the application.

    There is a single page which has a place holder analogous to content place holder in master pages  and logic is written to toggle between   the controls based on the required functionality.

    Since 2.0 has master pages is it necessary to convert all the .ascx to .aspx ? In other words is there an issue using dynamic user controls  since we can change that design using the new master pages?

    Please advice.   

    Thanks

    Kiran

     

  • Re: Web user control (.ascx ) VS page (.aspx)

    05-19-2009, 1:34 PM

    The difference between User Control and Master Pages has discussed in these links -

    http://forums.asp.net/p/1127159/1777521.aspx#1777521

    http://www.allinterview.com/showanswers/36311.html

     

     

     

    Narmatha Balasundaram
    http://reflexangle.blogspot.com
  • Re: Web user control (.ascx ) VS page (.aspx)

    05-19-2009, 3:17 PM
    • Member
      227 point Member
    • chrisri
    • Member since 06-11-2002, 1:58 PM
    • Posts 37
    • AspNetTeam

    It really depends on your goals for the migration. The architecture you have will continue to work in ASP.NET 2.0 without having to change. ASP.NET still supports ascx controls. The master/content page model was created to make implementing the scenario you have a bit easier, but it doesn't replace ascx controls.

    So if you just want to get the application running on 2.0 without major revisions, you can leave things alone.

    If you are migrating with the goal of taking advantage of 2.0 features, then you can consider making the changes.

    -Chris
    This posting is provided "AS IS" with no warranties, and confers no rights.
  • Re: Web user control (.ascx ) VS page (.aspx)

    05-19-2009, 3:30 PM
    • Member
      point Member
    • mpakala
    • Member since 04-11-2007, 1:09 PM
    • Posts 24

    Thanks for the suggestions.

     I do realize the justification of using user controls. But in th older application (1.1) pages were converted to web controls ascx so that we can mimic a master page which was not available at that point. So not all the web user controls are being re-used.

    It seems to be a  wrong design decision to use user controls when there is no intention to re-use them.  Also dynamic user controls and the interaction with the page life-cycle is kind of tricky from some of the articles I have read before.

    So my question is really, if there is a design or overhead issue by  using .user controls to mimic a master page ?

    Thanks

    Kiran

     

Page 1 of 1 (4 items)