Small Doubt

  • Thread starter Ashish M Bhonkiya
  • Start date
A

Ashish M Bhonkiya

What is the difference b/w a usercontrol and a Custom Web Control ?
When to use the usercontrol and when to use a custom web control ?

How to add javascript to the Elements in the custom webcontrol ?

Any pointers for the above questions are highly appreciated.

Thanks for your time.

Regards
Ashish M Bhonkiya
 
V

Victor Garcia Aprea [MVP]

Hi Ashish,

Simplifiying a lot, you use an UserControl when its output will be mainly
static and you use a custom control when its output will be mainly dynamic.
There are main differences between the two, like output caching for UC, etc,
but you could find that on lots of tutorials online and on the SDK docs.

If you're interested in learning about custom controls you should definitely
consider buying this book:
http://www.amazon.com/exec/obidos/ASIN/0735615829/laplatayacom"/104-0023456-1775957

Not sure what you mean by this. You have an Attributes collection that you
could use to attach to events in client-side, i.e.:

Attributes.Add ("onclick", "alert('hello world')");

--
Victor Garcia Aprea
Microsoft MVP | ASP.NET
Looking for insights on ASP.NET? Read my blog:
http://obies.com/vga/blog.aspx
To contact me remove 'NOSPAM'. Please post all questions to the newsgroup
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,776
Messages
2,569,602
Members
45,185
Latest member
GluceaReviews

Latest Threads

Top