Re: Small Doubt

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Victor Garcia Aprea [MVP] (vga_at_NOobiesSPAM.com)
Date: 05/05/04

  • Next message: Shawn Meyer: "Fontinfo expand/collapse"
    Date: Wed, 5 May 2004 13:29:06 -0300
    
    

    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%22/104-0023456-1775957

    >>> How to add javascript to the Elements in the custom webcontrol ?
    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
    "Ashish M Bhonkiya" <bhonkiya@hotmail.com.nospam> wrote in message
    news:OhYKCKqMEHA.3420@TK2MSFTNGP11.phx.gbl...
    > 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
    >
    >
    

  • Next message: Shawn Meyer: "Fontinfo expand/collapse"

    Relevant Pages

    • Z-order on my custom control at design-time is wrong
      ... I've created a very simple custom "UserControl" that has a Panel docked to ... I've decorated my custom control with the: ... So, I go ahead and drop my custom usercontrol onto a Form, and then drop two ...
      (microsoft.public.dotnet.framework.windowsforms.controls)
    • RE: Custom slider / trackbar?
      ... what you really want is a custom ... If the stock slider needle would work for you, ... but a custom control might work best for you. ... "Daniel" wrote: ...
      (microsoft.public.pocketpc.developer)
    • Re: Customized Control in the Datalist doesnt render
      ... For the "MyControl" you mentioned, is it a custom webserver control or web ... webcontrolwill display an Image if working correctly? ... the complete code snippet (or simplified one of your custom control) so ...
      (microsoft.public.dotnet.framework.aspnet)
    • Re: Viewstate Issue?
      ... > I've build a custom control that's essentially a header for my web site. ... Within the render ... > 'refreshes' in the design view, ...
      (microsoft.public.dotnet.framework.aspnet.buildingcontrols)
    • Re: "upload multiple files" hyperlink
      ... If I build the custom control, would I need it deployed on *every* document ... library home page in WSS? ... This way there is no need for you to install Office 2003 in the ...
      (microsoft.public.sharepoint.windowsservices)