Last post Oct 12, 2010 02:20 PM by rtpHarry
Oct 12, 2010 01:46 PM|@black|LINK
I have 3 pages in each page there is a portion of page where it is common in all these three pages.
Thought of making the common stuff as a separate control either User control/Custom control.
Any suggestions on which one should i use custom/user control
Oct 12, 2010 02:19 PM|karan@dotnet|LINK
If its within the same app, I would go with User Control. They are easier to develop and use within the same application. Usually one creates custom controls if they want to use them across diff app.
Oct 12, 2010 02:20 PM|rtpHarry|LINK
Simplest way to get started with this is to create a User Control. The main reason is that you get a design surface (a page which you can drag and drop controls on to) and a code behind just like a normal page:
You can also add properties to your user control if you need to pass some variables in from the containing page.
Going with a custom control means you have to handle everything programatically in the code behind. If you want to redistribute this project to the public / multiple projects then this is the more heavyweight solution and the best way to go but it is more
work. You get better support for adding in helpers for lettings your users configure the control in the designer such as adding dropdown list of options for a particular property.