Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 277
  • Last Modified:

Designing Web Controls

When i design win form projects I make windows controls visually using the designer and then compile them as dll's.  I can then add these dll's to my toolbox and drag them onto any other form i make in any other project.
My question is i am now moving to web design and would I like to make web controls.  But when I add a custom web control type I see no designer surface to drag and drop things like datagrids or treeviews onto.  Do I have to totally manually type my web control?  How do I have a group of people working in parallel on a web project if I can not visually design web controls?
Is web forms the only thing you can drag stuff onto?
I buy other web controls from companys that make them.  How do they make them?  Typing manually?
How do I go about this?

Josh



0
joshuadavidlee
Asked:
joshuadavidlee
  • 3
1 Solution
 
Jesse HouwingScrum Trainer | Microsoft MVP | ALM Ranger | ConsultantCommented:
If you add a usercontrol to the project instead of a normal webcontrol you will get a designer. from there it's almost the same as making a normal page.

If you create a control library (which is what 3rd parties do) you'll have to write the conrtol yourself (as you say, type it manually) or create it as a usercontrol and then convert it (which isn't much work). 3rd parties also often inherit from existing controls making it easier to add functionality without having to add too much extra code.
0
 
Jesse HouwingScrum Trainer | Microsoft MVP | ALM Ranger | ConsultantCommented:
0
 
joshuadavidleeAuthor Commented:
"" or create it as a usercontrol and then convert it (which isn't much work)."" could you focus more on this quote please....
0
 
Jesse HouwingScrum Trainer | Microsoft MVP | ALM Ranger | ConsultantCommented:
If you look at the html code generated by the designer, you can quite easily re-create those by adding the right HTML controls and ASP.net controls to the Control.Controls collection in the Page.Init event. When you have done that, replace System.Web.UI.UserControl with System.Web.UI.WebControl and you're done. Ofcourse this get's more and more differcult as the size of the control grows.

If needed you can also just compile the UserControl as-is. You can then add the library as a reference to any web project and drag/drop the control from the toolbox once it's added to it.  It's just not at professional as doing it yourself I guess ;)
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now