Respondido about user controls, web parts and visual web parts

  • Tuesday, March 27, 2012 3:49 PM
     
     

    I'm new to VS and ASP.NET programming world.

    I wonder what are user controls, web parts, and visual web parts.

    for example, <asp:button> is what?

    what's the difference among them.

    Thank you.

All Replies

  • Tuesday, March 27, 2012 4:40 PM
     
     

    User Controls

    WebParts

    Visual Web Parts

    ASP:Button is a Control.  All UserControls, WebParts, and Visual Webparts are Controls.  It's not really relevant to you what type of Control Button is underneath.
  • Tuesday, March 27, 2012 4:42 PM
     
     Answered

    <asp:button> -  is a server control, which is a managed code assembly (DLL) that generates HTML for display on a web page.

    Web parts - are essential specialized server controls.  They also have a dll that generates HTML but also have some other pieces that make it possible to add or remove them from a web page at runtime.

    User controls are .ascx files that contain a snippet of HTML code (possibly including server controls like <asp:button>s).  They can also have a dll that contains code to manipulate the HTML that will be generated for display on a web page.  Many people find them easier to work with than server controls or web parts because they have a drag and drop visual editor to position the controls that make up the web part.

    Visual Web parts are a new project type in Visual Studio 2010 that provides a traditional web part as a wrapper for a user control.  It provides the advantage of a visual editor to develop the interface, but the finished product is a web part that can be added or removed from the web page at runtime in SharePoint.


    Paul Stork SharePoint Server
    MVP Chief SharePoint Architect: Sharesquared
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

    • Proposed As Answer by Aviw_ Tuesday, March 27, 2012 5:57 PM
    • Marked As Answer by Ronaldo.K Wednesday, March 28, 2012 12:09 AM
    •  
  • Wednesday, March 28, 2012 12:08 AM
     
     

    Thank you, Paul Stork.

    I'm not familiar with the mechanism of managed code.

    How user controls translated html etc.

    do you have any articles?

    Again thank you.