Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Interesting User control VS web form question

Interesting User control VS web form question

Scheduled Pinned Locked Moved ASP.NET
visual-studiosysadminquestiondiscussion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    DotNet_Newbie
    wrote on last edited by
    #1

    Hello all, I have a quick question. I’m working on a web application that takes the user in step-by-step data entry (a wizard like). The menus, top and left, are created as a user control. The question now is: 1- For the actual screens where the user enters the data, is it better to create each screen as a user control then include that control in a web form, or create each screen as a web form with the individual controls (text boxes, buttons, ..etc) as server controls in the web form it self. 2- What are the benefits of each approach, given that each screen will be viewed only once (not reusable) Thanks you all in advance, your opinions are highly appreciated

    M 1 Reply Last reply
    0
    • D DotNet_Newbie

      Hello all, I have a quick question. I’m working on a web application that takes the user in step-by-step data entry (a wizard like). The menus, top and left, are created as a user control. The question now is: 1- For the actual screens where the user enters the data, is it better to create each screen as a user control then include that control in a web form, or create each screen as a web form with the individual controls (text boxes, buttons, ..etc) as server controls in the web form it self. 2- What are the benefits of each approach, given that each screen will be viewed only once (not reusable) Thanks you all in advance, your opinions are highly appreciated

      M Offline
      M Offline
      Mike Ellison
      wrote on last edited by
      #2

      Personally, I like the User Control approach in this context. If your wizard had five steps, then you could use five user controls on your form, setting the Visible property of the four not in use on any given step to false. I've also done this sort of thing using your second approach - but in this case I use asp:Panel controls to represent each step - its a lot simpler to tell set the Visible property for a panel to false than to hide each of the individual controls within it.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups