Help on HTML server control vs HTML control

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • serge calderara

    Help on HTML server control vs HTML control

    Dear all,

    I am new in asp.net and prepare myself for exam
    I still have dificulties to understand the difference between server control
    and HTML control.
    Okey things whcih are clear are the fact that for server control component ,
    code is running on the server side.

    But if I take as example a Label. I place on a webform an HTM label control
    and a WebForm label control, I could see that properties are different for
    sure server control offer more tuning possibilities in property side. But
    then if I double click on an HTML label control it prompts me if I want to
    change it to runat server side...

    In that way could we say that that if we need to add code behind a control
    we msut use server control instead of HTML control ?

    thanks for your clarification
    regards
    serge
  • Curt_C [MVP]

    #2
    RE: Help on HTML server control vs HTML control

    adding a "runat=serv er" to an HTML control makes it accessible to the server
    code, but it doesn't make it a server control. Well, sort of... what it does
    is usually turn it into a generic server control, not a nice functional one
    like the others. You'll have SOME functionality but the big thing is that the
    set of server controls were specifically designed for access and control from
    code. Most of these, in the background at least, probably inherit from basic
    html controls but they've (the MS people) added layers of control and
    functionality.

    Not sure if that helps a ton...but I tried :}

    --
    Curt Christianson
    site: http://www.darkfalz.com
    blog: http://blog.darkfalz.com



    "serge calderara" wrote:
    [color=blue]
    > Dear all,
    >
    > I am new in asp.net and prepare myself for exam
    > I still have dificulties to understand the difference between server control
    > and HTML control.
    > Okey things whcih are clear are the fact that for server control component ,
    > code is running on the server side.
    >
    > But if I take as example a Label. I place on a webform an HTM label control
    > and a WebForm label control, I could see that properties are different for
    > sure server control offer more tuning possibilities in property side. But
    > then if I double click on an HTML label control it prompts me if I want to
    > change it to runat server side...
    >
    > In that way could we say that that if we need to add code behind a control
    > we msut use server control instead of HTML control ?
    >
    > thanks for your clarification
    > regards
    > serge[/color]

    Comment

    • Kevin Spencer

      #3
      Re: Help on HTML server control vs HTML control

      > I still have dificulties to understand the difference between server[color=blue]
      > control
      > and HTML control.[/color]

      This can be confusing to new ASP.Net developers. In fact, it is important to
      distinguish between several different types of ASP.Net Controls. Let me
      elaborate, if I may:

      To begin with, let's start with the parent NameSpace/Class for all ASP.Net
      Controls: System.Web.UI.C ontrol. All ASP.Net Controls inherit this class.

      Under this, there are about a dozen different classes and NameSpaces. I will
      only mention the most important ones here:

      System.Web.UI.H tmlControls.Htm lControl

      This is the base class from which all HtmlControls are derived. An
      HtmlControl is, at the very least, a simple, client-side HTML element, such
      as <span> (Label), <form> (HtmlForm), or <table> (HtmlTable). There is no
      server-side aspect to any HtmlControl, unless you add a runat="server"
      attribute to it. Adding this attribute gives you server-side control over
      the client-side HTML. You can create an HtmlControl from any client-side
      HTML element. There are several ready-made HtmlControls, and an
      HtmlGenericCont rol which you can use for any other HTML element.

      System.Web.UI.T emplateControl

      This is the base Class for any ASP.Net Control that uses an HTML Template.
      There are 2 ready-made classes in the CLR that inherit this class.
      System.Web.UI.P age, and System.Web.UI.U serControl. Generally, when people
      talk about "Web Controls," they are talking about HtmlControls, WebControls,
      or the UserControl class, and not the Page class, although the Page class
      is, in fact a "Web Control" (Note the space in the term, which distinguishes
      "Web Control" from the class WebControl).

      A UserControl is a Templated Control that is a container for pure HTML and
      other Web Controls. Of all the "Web Controls" that are used frequently in
      ASP.Net, the UserControl is the only one that has an HTML Template. It
      allows a block of HTML and server-side Controls to be treated as a single
      unit, or Control.

      System.Web.UI.W ebControls

      This is a NameSpace, not a class. It has 6 different top-level classes:

      System.Web.UI.W ebControls.Lite ral

      This class is used to encapsulate pure HTML in a container. It does nothing
      else. As ASP.Net is fully object-oriented, any HTML in a template that is
      not a server-side control is encapsulated in a Literal Control at run-time.
      It can also be used to pop any block of HTML into a Page or Control at
      run-time.

      System.Web.UI.W ebControls.Plac eHolder

      This class is used, quite literally, as a "place holder." It renders no
      HTML, but as a "Web Control," (System.Web.UI. Conrol) it has a Controls
      Collection to which any other Control can be added. As it exists in a
      certain location in a Page or other Control, any Control can be popped into
      it at run-time. A UserControl could be used for this, by not having anything
      in it. But what would the purpose of the Template be? This class is not
      Templated, so it is easier to work with for this purpose.

      System.Web.UI.W ebControls.Repe ater
      System.Web.UI.W ebControls.Repe aterItem

      These 2 WebControls comprise a Repeater Control. The Repeater is a container
      for RepeaterItems. In addition, it has properties that allow for the
      addition of a number of System.Web.UI.I Template classes for fomatting the
      data contained in it. A Repeater is a sort of hybrid. While it is not a
      Templated Control, it is hosted in a Templated Control, and the Templates in
      it are placed in the Template of the hosting Templated Control. It is used
      for binding aggregate data (arrays, Collections, etc) to a block of
      repeating HTML in any format desired.

      System.Web.UI.W ebControls.WebC ontrol

      This is the base class for most of the Controls that are often confused with
      HtmlControls. A WebControl is a Control that ALWAYS has a server-side
      component, and WebControls all share the same fields, properties and methods
      of System.Web.UI.W ebControl. In addition, each WebControl has fields,
      properties, and methods that correspond uniquely to the type of HTML element
      that the WebControl renders and interacts with at run-time.

      HtmlControls are, therefore, by nature, leaner (consume less resources) than
      WebControls, but have less functionality as well.

      System.Web.UI.W ebControls.Xml

      This class displays XML without any formatting or using XSLT. It is
      genreally used to display embedded XML in a web page.

      In summary, the term "Web Control" is a fairly common, and confusing term
      that is generally used to encompass HtmlControls, WebControls, and the
      UserControl ASP.Net System.Web.UI.C ontrol classes. It is important to
      distinguish between what type of "Web Control" is being discussed. The main
      differences between these 3 types of Controls are:

      HtmlControls are lightweight Controls that can represent pure HTML, or add
      server-side functionality to client-side HTML.

      WebControls are Controls that always have a server-side class associated
      with them, and provide a common server-side functionality for working with
      various HTML elements, and specific functionality for specific HTML
      elements.

      A UserControl is a Templated Control which has a Template file, a container
      for both pure HTML and server-side class references in it, and allows for
      server-side manipulation of the server-side Controls in it. It allows a
      block of HTML and server-side Controls to be treated as a single unit, or
      Control.

      --
      HTH,

      Kevin Spencer
      Microsoft MVP
      ..Net Developer
      Neither a follower nor a lender be.

      "serge calderara" <sergecalderara @discussions.mi crosoft.com> wrote in
      message news:AB29108A-F38B-4BAE-AFAC-4D171A448A2E@mi crosoft.com...[color=blue]
      > Dear all,
      >
      > I am new in asp.net and prepare myself for exam
      > I still have dificulties to understand the difference between server
      > control
      > and HTML control.
      > Okey things whcih are clear are the fact that for server control component
      > ,
      > code is running on the server side.
      >
      > But if I take as example a Label. I place on a webform an HTM label
      > control
      > and a WebForm label control, I could see that properties are different for
      > sure server control offer more tuning possibilities in property side. But
      > then if I double click on an HTML label control it prompts me if I want to
      > change it to runat server side...
      >
      > In that way could we say that that if we need to add code behind a control
      > we msut use server control instead of HTML control ?
      >
      > thanks for your clarification
      > regards
      > serge[/color]


      Comment

      • serge calderara

        #4
        Re: Help on HTML server control vs HTML control

        Wooooow
        Thats already too deep as a startup...now I am confuse in confusion...
        Is there any simple general terms for beginners which could help answer the
        question like :

        "Should I use Label webcontrols or Lable HTML controls ?"

        For example for me a Label is used to contains a simple text whatever it is
        web or HTML control.

        A check box will display a selection (checked or not checked) whatever it is
        Web or HTML control

        I think the confusion comes also from the fact that for a beginner HTML is a
        simpple formated page with specific sytax and Web controls is more like real
        VB code, but we tuse also the word HTML when talking about webcontrols, thats
        make confusion

        Do you have any other simple explanation ?

        thnaks
        "Kevin Spencer" wrote:
        [color=blue][color=green]
        > > I still have dificulties to understand the difference between server
        > > control
        > > and HTML control.[/color]
        >
        > This can be confusing to new ASP.Net developers. In fact, it is important to
        > distinguish between several different types of ASP.Net Controls. Let me
        > elaborate, if I may:
        >
        > To begin with, let's start with the parent NameSpace/Class for all ASP.Net
        > Controls: System.Web.UI.C ontrol. All ASP.Net Controls inherit this class.
        >
        > Under this, there are about a dozen different classes and NameSpaces. I will
        > only mention the most important ones here:
        >
        > System.Web.UI.H tmlControls.Htm lControl
        >
        > This is the base class from which all HtmlControls are derived. An
        > HtmlControl is, at the very least, a simple, client-side HTML element, such
        > as <span> (Label), <form> (HtmlForm), or <table> (HtmlTable). There is no
        > server-side aspect to any HtmlControl, unless you add a runat="server"
        > attribute to it. Adding this attribute gives you server-side control over
        > the client-side HTML. You can create an HtmlControl from any client-side
        > HTML element. There are several ready-made HtmlControls, and an
        > HtmlGenericCont rol which you can use for any other HTML element.
        >
        > System.Web.UI.T emplateControl
        >
        > This is the base Class for any ASP.Net Control that uses an HTML Template.
        > There are 2 ready-made classes in the CLR that inherit this class.
        > System.Web.UI.P age, and System.Web.UI.U serControl. Generally, when people
        > talk about "Web Controls," they are talking about HtmlControls, WebControls,
        > or the UserControl class, and not the Page class, although the Page class
        > is, in fact a "Web Control" (Note the space in the term, which distinguishes
        > "Web Control" from the class WebControl).
        >
        > A UserControl is a Templated Control that is a container for pure HTML and
        > other Web Controls. Of all the "Web Controls" that are used frequently in
        > ASP.Net, the UserControl is the only one that has an HTML Template. It
        > allows a block of HTML and server-side Controls to be treated as a single
        > unit, or Control.
        >
        > System.Web.UI.W ebControls
        >
        > This is a NameSpace, not a class. It has 6 different top-level classes:
        >
        > System.Web.UI.W ebControls.Lite ral
        >
        > This class is used to encapsulate pure HTML in a container. It does nothing
        > else. As ASP.Net is fully object-oriented, any HTML in a template that is
        > not a server-side control is encapsulated in a Literal Control at run-time.
        > It can also be used to pop any block of HTML into a Page or Control at
        > run-time.
        >
        > System.Web.UI.W ebControls.Plac eHolder
        >
        > This class is used, quite literally, as a "place holder." It renders no
        > HTML, but as a "Web Control," (System.Web.UI. Conrol) it has a Controls
        > Collection to which any other Control can be added. As it exists in a
        > certain location in a Page or other Control, any Control can be popped into
        > it at run-time. A UserControl could be used for this, by not having anything
        > in it. But what would the purpose of the Template be? This class is not
        > Templated, so it is easier to work with for this purpose.
        >
        > System.Web.UI.W ebControls.Repe ater
        > System.Web.UI.W ebControls.Repe aterItem
        >
        > These 2 WebControls comprise a Repeater Control. The Repeater is a container
        > for RepeaterItems. In addition, it has properties that allow for the
        > addition of a number of System.Web.UI.I Template classes for fomatting the
        > data contained in it. A Repeater is a sort of hybrid. While it is not a
        > Templated Control, it is hosted in a Templated Control, and the Templates in
        > it are placed in the Template of the hosting Templated Control. It is used
        > for binding aggregate data (arrays, Collections, etc) to a block of
        > repeating HTML in any format desired.
        >
        > System.Web.UI.W ebControls.WebC ontrol
        >
        > This is the base class for most of the Controls that are often confused with
        > HtmlControls. A WebControl is a Control that ALWAYS has a server-side
        > component, and WebControls all share the same fields, properties and methods
        > of System.Web.UI.W ebControl. In addition, each WebControl has fields,
        > properties, and methods that correspond uniquely to the type of HTML element
        > that the WebControl renders and interacts with at run-time.
        >
        > HtmlControls are, therefore, by nature, leaner (consume less resources) than
        > WebControls, but have less functionality as well.
        >
        > System.Web.UI.W ebControls.Xml
        >
        > This class displays XML without any formatting or using XSLT. It is
        > genreally used to display embedded XML in a web page.
        >
        > In summary, the term "Web Control" is a fairly common, and confusing term
        > that is generally used to encompass HtmlControls, WebControls, and the
        > UserControl ASP.Net System.Web.UI.C ontrol classes. It is important to
        > distinguish between what type of "Web Control" is being discussed. The main
        > differences between these 3 types of Controls are:
        >
        > HtmlControls are lightweight Controls that can represent pure HTML, or add
        > server-side functionality to client-side HTML.
        >
        > WebControls are Controls that always have a server-side class associated
        > with them, and provide a common server-side functionality for working with
        > various HTML elements, and specific functionality for specific HTML
        > elements.
        >
        > A UserControl is a Templated Control which has a Template file, a container
        > for both pure HTML and server-side class references in it, and allows for
        > server-side manipulation of the server-side Controls in it. It allows a
        > block of HTML and server-side Controls to be treated as a single unit, or
        > Control.
        >
        > --
        > HTH,
        >
        > Kevin Spencer
        > Microsoft MVP
        > ..Net Developer
        > Neither a follower nor a lender be.
        >
        > "serge calderara" <sergecalderara @discussions.mi crosoft.com> wrote in
        > message news:AB29108A-F38B-4BAE-AFAC-4D171A448A2E@mi crosoft.com...[color=green]
        > > Dear all,
        > >
        > > I am new in asp.net and prepare myself for exam
        > > I still have dificulties to understand the difference between server
        > > control
        > > and HTML control.
        > > Okey things whcih are clear are the fact that for server control component
        > > ,
        > > code is running on the server side.
        > >
        > > But if I take as example a Label. I place on a webform an HTM label
        > > control
        > > and a WebForm label control, I could see that properties are different for
        > > sure server control offer more tuning possibilities in property side. But
        > > then if I double click on an HTML label control it prompts me if I want to
        > > change it to runat server side...
        > >
        > > In that way could we say that that if we need to add code behind a control
        > > we msut use server control instead of HTML control ?
        > >
        > > thanks for your clarification
        > > regards
        > > serge[/color]
        >
        >
        >[/color]

        Comment

        • Bruce Barker

          #5
          Re: Help on HTML server control vs HTML control

          you can think of the html on a web page as three categories

          raw html output as a literal text (all html on the page with out a
          runat=server tag). all the html between server controls is stuffed into a
          generic web control


          Web.UI.HtmlCont rols
          these are server controls (runat=server) named after their html
          counterparts. they have simular method to the html. use these if you want to
          work at the html level, or do lots of client script.

          Web.UI.WebContr ols
          these are server controls with a common set of methods and may generate
          multiple html elements. use these if you want to use abstracted controls.

          note: server controls are seperate objects to the server code.

          -- bruce (sqlwork.com)


          "serge calderara" <sergecalderara @discussions.mi crosoft.com> wrote in
          message news:77AEC502-9963-431F-ABF3-A0BFE976BFF9@mi crosoft.com...[color=blue]
          > Wooooow
          > Thats already too deep as a startup...now I am confuse in confusion...
          > Is there any simple general terms for beginners which could help answer
          > the
          > question like :
          >
          > "Should I use Label webcontrols or Lable HTML controls ?"
          >
          > For example for me a Label is used to contains a simple text whatever it
          > is
          > web or HTML control.
          >
          > A check box will display a selection (checked or not checked) whatever it
          > is
          > Web or HTML control
          >
          > I think the confusion comes also from the fact that for a beginner HTML is
          > a
          > simpple formated page with specific sytax and Web controls is more like
          > real
          > VB code, but we tuse also the word HTML when talking about webcontrols,
          > thats
          > make confusion
          >
          > Do you have any other simple explanation ?
          >
          > thnaks
          > "Kevin Spencer" wrote:
          >[color=green][color=darkred]
          >> > I still have dificulties to understand the difference between server
          >> > control
          >> > and HTML control.[/color]
          >>
          >> This can be confusing to new ASP.Net developers. In fact, it is important
          >> to
          >> distinguish between several different types of ASP.Net Controls. Let me
          >> elaborate, if I may:
          >>
          >> To begin with, let's start with the parent NameSpace/Class for all
          >> ASP.Net
          >> Controls: System.Web.UI.C ontrol. All ASP.Net Controls inherit this class.
          >>
          >> Under this, there are about a dozen different classes and NameSpaces. I
          >> will
          >> only mention the most important ones here:
          >>
          >> System.Web.UI.H tmlControls.Htm lControl
          >>
          >> This is the base class from which all HtmlControls are derived. An
          >> HtmlControl is, at the very least, a simple, client-side HTML element,
          >> such
          >> as <span> (Label), <form> (HtmlForm), or <table> (HtmlTable). There is no
          >> server-side aspect to any HtmlControl, unless you add a runat="server"
          >> attribute to it. Adding this attribute gives you server-side control over
          >> the client-side HTML. You can create an HtmlControl from any client-side
          >> HTML element. There are several ready-made HtmlControls, and an
          >> HtmlGenericCont rol which you can use for any other HTML element.
          >>
          >> System.Web.UI.T emplateControl
          >>
          >> This is the base Class for any ASP.Net Control that uses an HTML
          >> Template.
          >> There are 2 ready-made classes in the CLR that inherit this class.
          >> System.Web.UI.P age, and System.Web.UI.U serControl. Generally, when people
          >> talk about "Web Controls," they are talking about HtmlControls,
          >> WebControls,
          >> or the UserControl class, and not the Page class, although the Page class
          >> is, in fact a "Web Control" (Note the space in the term, which
          >> distinguishes
          >> "Web Control" from the class WebControl).
          >>
          >> A UserControl is a Templated Control that is a container for pure HTML
          >> and
          >> other Web Controls. Of all the "Web Controls" that are used frequently in
          >> ASP.Net, the UserControl is the only one that has an HTML Template. It
          >> allows a block of HTML and server-side Controls to be treated as a single
          >> unit, or Control.
          >>
          >> System.Web.UI.W ebControls
          >>
          >> This is a NameSpace, not a class. It has 6 different top-level classes:
          >>
          >> System.Web.UI.W ebControls.Lite ral
          >>
          >> This class is used to encapsulate pure HTML in a container. It does
          >> nothing
          >> else. As ASP.Net is fully object-oriented, any HTML in a template that is
          >> not a server-side control is encapsulated in a Literal Control at
          >> run-time.
          >> It can also be used to pop any block of HTML into a Page or Control at
          >> run-time.
          >>
          >> System.Web.UI.W ebControls.Plac eHolder
          >>
          >> This class is used, quite literally, as a "place holder." It renders no
          >> HTML, but as a "Web Control," (System.Web.UI. Conrol) it has a Controls
          >> Collection to which any other Control can be added. As it exists in a
          >> certain location in a Page or other Control, any Control can be popped
          >> into
          >> it at run-time. A UserControl could be used for this, by not having
          >> anything
          >> in it. But what would the purpose of the Template be? This class is not
          >> Templated, so it is easier to work with for this purpose.
          >>
          >> System.Web.UI.W ebControls.Repe ater
          >> System.Web.UI.W ebControls.Repe aterItem
          >>
          >> These 2 WebControls comprise a Repeater Control. The Repeater is a
          >> container
          >> for RepeaterItems. In addition, it has properties that allow for the
          >> addition of a number of System.Web.UI.I Template classes for fomatting the
          >> data contained in it. A Repeater is a sort of hybrid. While it is not a
          >> Templated Control, it is hosted in a Templated Control, and the Templates
          >> in
          >> it are placed in the Template of the hosting Templated Control. It is
          >> used
          >> for binding aggregate data (arrays, Collections, etc) to a block of
          >> repeating HTML in any format desired.
          >>
          >> System.Web.UI.W ebControls.WebC ontrol
          >>
          >> This is the base class for most of the Controls that are often confused
          >> with
          >> HtmlControls. A WebControl is a Control that ALWAYS has a server-side
          >> component, and WebControls all share the same fields, properties and
          >> methods
          >> of System.Web.UI.W ebControl. In addition, each WebControl has fields,
          >> properties, and methods that correspond uniquely to the type of HTML
          >> element
          >> that the WebControl renders and interacts with at run-time.
          >>
          >> HtmlControls are, therefore, by nature, leaner (consume less resources)
          >> than
          >> WebControls, but have less functionality as well.
          >>
          >> System.Web.UI.W ebControls.Xml
          >>
          >> This class displays XML without any formatting or using XSLT. It is
          >> genreally used to display embedded XML in a web page.
          >>
          >> In summary, the term "Web Control" is a fairly common, and confusing term
          >> that is generally used to encompass HtmlControls, WebControls, and the
          >> UserControl ASP.Net System.Web.UI.C ontrol classes. It is important to
          >> distinguish between what type of "Web Control" is being discussed. The
          >> main
          >> differences between these 3 types of Controls are:
          >>
          >> HtmlControls are lightweight Controls that can represent pure HTML, or
          >> add
          >> server-side functionality to client-side HTML.
          >>
          >> WebControls are Controls that always have a server-side class associated
          >> with them, and provide a common server-side functionality for working
          >> with
          >> various HTML elements, and specific functionality for specific HTML
          >> elements.
          >>
          >> A UserControl is a Templated Control which has a Template file, a
          >> container
          >> for both pure HTML and server-side class references in it, and allows for
          >> server-side manipulation of the server-side Controls in it. It allows a
          >> block of HTML and server-side Controls to be treated as a single unit, or
          >> Control.
          >>
          >> --
          >> HTH,
          >>
          >> Kevin Spencer
          >> Microsoft MVP
          >> ..Net Developer
          >> Neither a follower nor a lender be.
          >>
          >> "serge calderara" <sergecalderara @discussions.mi crosoft.com> wrote in
          >> message news:AB29108A-F38B-4BAE-AFAC-4D171A448A2E@mi crosoft.com...[color=darkred]
          >> > Dear all,
          >> >
          >> > I am new in asp.net and prepare myself for exam
          >> > I still have dificulties to understand the difference between server
          >> > control
          >> > and HTML control.
          >> > Okey things whcih are clear are the fact that for server control
          >> > component
          >> > ,
          >> > code is running on the server side.
          >> >
          >> > But if I take as example a Label. I place on a webform an HTM label
          >> > control
          >> > and a WebForm label control, I could see that properties are different
          >> > for
          >> > sure server control offer more tuning possibilities in property side.
          >> > But
          >> > then if I double click on an HTML label control it prompts me if I want
          >> > to
          >> > change it to runat server side...
          >> >
          >> > In that way could we say that that if we need to add code behind a
          >> > control
          >> > we msut use server control instead of HTML control ?
          >> >
          >> > thanks for your clarification
          >> > regards
          >> > serge[/color]
          >>
          >>
          >>[/color][/color]


          Comment

          • serge calderara

            #6
            Re: Help on HTML server control vs HTML control

            thanks for your reply

            what is the reson then to have both type of controls for building asp
            application, why not using only server controls ? sounds safere as the
            buisness logic is always at the server side and could be less hacked ?

            In client side script anyone could chanage it and you application
            not working anymore ?

            thnaks
            serge

            "Bruce Barker" wrote:
            [color=blue]
            > you can think of the html on a web page as three categories
            >
            > raw html output as a literal text (all html on the page with out a
            > runat=server tag). all the html between server controls is stuffed into a
            > generic web control
            >
            >
            > Web.UI.HtmlCont rols
            > these are server controls (runat=server) named after their html
            > counterparts. they have simular method to the html. use these if you want to
            > work at the html level, or do lots of client script.
            >
            > Web.UI.WebContr ols
            > these are server controls with a common set of methods and may generate
            > multiple html elements. use these if you want to use abstracted controls.
            >
            > note: server controls are seperate objects to the server code.
            >
            > -- bruce (sqlwork.com)
            >
            >
            > "serge calderara" <sergecalderara @discussions.mi crosoft.com> wrote in
            > message news:77AEC502-9963-431F-ABF3-A0BFE976BFF9@mi crosoft.com...[color=green]
            > > Wooooow
            > > Thats already too deep as a startup...now I am confuse in confusion...
            > > Is there any simple general terms for beginners which could help answer
            > > the
            > > question like :
            > >
            > > "Should I use Label webcontrols or Lable HTML controls ?"
            > >
            > > For example for me a Label is used to contains a simple text whatever it
            > > is
            > > web or HTML control.
            > >
            > > A check box will display a selection (checked or not checked) whatever it
            > > is
            > > Web or HTML control
            > >
            > > I think the confusion comes also from the fact that for a beginner HTML is
            > > a
            > > simpple formated page with specific sytax and Web controls is more like
            > > real
            > > VB code, but we tuse also the word HTML when talking about webcontrols,
            > > thats
            > > make confusion
            > >
            > > Do you have any other simple explanation ?
            > >
            > > thnaks
            > > "Kevin Spencer" wrote:
            > >[color=darkred]
            > >> > I still have dificulties to understand the difference between server
            > >> > control
            > >> > and HTML control.
            > >>
            > >> This can be confusing to new ASP.Net developers. In fact, it is important
            > >> to
            > >> distinguish between several different types of ASP.Net Controls. Let me
            > >> elaborate, if I may:
            > >>
            > >> To begin with, let's start with the parent NameSpace/Class for all
            > >> ASP.Net
            > >> Controls: System.Web.UI.C ontrol. All ASP.Net Controls inherit this class.
            > >>
            > >> Under this, there are about a dozen different classes and NameSpaces. I
            > >> will
            > >> only mention the most important ones here:
            > >>
            > >> System.Web.UI.H tmlControls.Htm lControl
            > >>
            > >> This is the base class from which all HtmlControls are derived. An
            > >> HtmlControl is, at the very least, a simple, client-side HTML element,
            > >> such
            > >> as <span> (Label), <form> (HtmlForm), or <table> (HtmlTable). There is no
            > >> server-side aspect to any HtmlControl, unless you add a runat="server"
            > >> attribute to it. Adding this attribute gives you server-side control over
            > >> the client-side HTML. You can create an HtmlControl from any client-side
            > >> HTML element. There are several ready-made HtmlControls, and an
            > >> HtmlGenericCont rol which you can use for any other HTML element.
            > >>
            > >> System.Web.UI.T emplateControl
            > >>
            > >> This is the base Class for any ASP.Net Control that uses an HTML
            > >> Template.
            > >> There are 2 ready-made classes in the CLR that inherit this class.
            > >> System.Web.UI.P age, and System.Web.UI.U serControl. Generally, when people
            > >> talk about "Web Controls," they are talking about HtmlControls,
            > >> WebControls,
            > >> or the UserControl class, and not the Page class, although the Page class
            > >> is, in fact a "Web Control" (Note the space in the term, which
            > >> distinguishes
            > >> "Web Control" from the class WebControl).
            > >>
            > >> A UserControl is a Templated Control that is a container for pure HTML
            > >> and
            > >> other Web Controls. Of all the "Web Controls" that are used frequently in
            > >> ASP.Net, the UserControl is the only one that has an HTML Template. It
            > >> allows a block of HTML and server-side Controls to be treated as a single
            > >> unit, or Control.
            > >>
            > >> System.Web.UI.W ebControls
            > >>
            > >> This is a NameSpace, not a class. It has 6 different top-level classes:
            > >>
            > >> System.Web.UI.W ebControls.Lite ral
            > >>
            > >> This class is used to encapsulate pure HTML in a container. It does
            > >> nothing
            > >> else. As ASP.Net is fully object-oriented, any HTML in a template that is
            > >> not a server-side control is encapsulated in a Literal Control at
            > >> run-time.
            > >> It can also be used to pop any block of HTML into a Page or Control at
            > >> run-time.
            > >>
            > >> System.Web.UI.W ebControls.Plac eHolder
            > >>
            > >> This class is used, quite literally, as a "place holder." It renders no
            > >> HTML, but as a "Web Control," (System.Web.UI. Conrol) it has a Controls
            > >> Collection to which any other Control can be added. As it exists in a
            > >> certain location in a Page or other Control, any Control can be popped
            > >> into
            > >> it at run-time. A UserControl could be used for this, by not having
            > >> anything
            > >> in it. But what would the purpose of the Template be? This class is not
            > >> Templated, so it is easier to work with for this purpose.
            > >>
            > >> System.Web.UI.W ebControls.Repe ater
            > >> System.Web.UI.W ebControls.Repe aterItem
            > >>
            > >> These 2 WebControls comprise a Repeater Control. The Repeater is a
            > >> container
            > >> for RepeaterItems. In addition, it has properties that allow for the
            > >> addition of a number of System.Web.UI.I Template classes for fomatting the
            > >> data contained in it. A Repeater is a sort of hybrid. While it is not a
            > >> Templated Control, it is hosted in a Templated Control, and the Templates
            > >> in
            > >> it are placed in the Template of the hosting Templated Control. It is
            > >> used
            > >> for binding aggregate data (arrays, Collections, etc) to a block of
            > >> repeating HTML in any format desired.
            > >>
            > >> System.Web.UI.W ebControls.WebC ontrol
            > >>
            > >> This is the base class for most of the Controls that are often confused
            > >> with
            > >> HtmlControls. A WebControl is a Control that ALWAYS has a server-side
            > >> component, and WebControls all share the same fields, properties and
            > >> methods
            > >> of System.Web.UI.W ebControl. In addition, each WebControl has fields,
            > >> properties, and methods that correspond uniquely to the type of HTML
            > >> element
            > >> that the WebControl renders and interacts with at run-time.
            > >>
            > >> HtmlControls are, therefore, by nature, leaner (consume less resources)
            > >> than
            > >> WebControls, but have less functionality as well.
            > >>
            > >> System.Web.UI.W ebControls.Xml
            > >>
            > >> This class displays XML without any formatting or using XSLT. It is
            > >> genreally used to display embedded XML in a web page.
            > >>
            > >> In summary, the term "Web Control" is a fairly common, and confusing term
            > >> that is generally used to encompass HtmlControls, WebControls, and the
            > >> UserControl ASP.Net System.Web.UI.C ontrol classes. It is important to
            > >> distinguish between what type of "Web Control" is being discussed. The
            > >> main
            > >> differences between these 3 types of Controls are:
            > >>
            > >> HtmlControls are lightweight Controls that can represent pure HTML, or
            > >> add
            > >> server-side functionality to client-side HTML.
            > >>
            > >> WebControls are Controls that always have a server-side class associated
            > >> with them, and provide a common server-side functionality for working
            > >> with
            > >> various HTML elements, and specific functionality for specific HTML
            > >> elements.
            > >>
            > >> A UserControl is a Templated Control which has a Template file, a
            > >> container
            > >> for both pure HTML and server-side class references in it, and allows for
            > >> server-side manipulation of the server-side Controls in it. It allows a
            > >> block of HTML and server-side Controls to be treated as a single unit, or
            > >> Control.
            > >>
            > >> --
            > >> HTH,
            > >>
            > >> Kevin Spencer
            > >> Microsoft MVP
            > >> ..Net Developer
            > >> Neither a follower nor a lender be.
            > >>
            > >> "serge calderara" <sergecalderara @discussions.mi crosoft.com> wrote in
            > >> message news:AB29108A-F38B-4BAE-AFAC-4D171A448A2E@mi crosoft.com...
            > >> > Dear all,
            > >> >
            > >> > I am new in asp.net and prepare myself for exam
            > >> > I still have dificulties to understand the difference between server
            > >> > control
            > >> > and HTML control.
            > >> > Okey things whcih are clear are the fact that for server control
            > >> > component
            > >> > ,
            > >> > code is running on the server side.
            > >> >
            > >> > But if I take as example a Label. I place on a webform an HTM label
            > >> > control
            > >> > and a WebForm label control, I could see that properties are different
            > >> > for
            > >> > sure server control offer more tuning possibilities in property side.
            > >> > But
            > >> > then if I double click on an HTML label control it prompts me if I want
            > >> > to
            > >> > change it to runat server side...
            > >> >
            > >> > In that way could we say that that if we need to add code behind a
            > >> > control
            > >> > we msut use server control instead of HTML control ?
            > >> >
            > >> > thanks for your clarification
            > >> > regards
            > >> > serge
            > >>
            > >>
            > >>[/color][/color]
            >
            >
            >[/color]

            Comment

            Working...