difference between HtmlControls and WebControls?

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

    difference between HtmlControls and WebControls?

    For instance, when should I use HtmlControls.Ht mlImage,
    and when should I use WebControls.Ima ge ?

    And what is the difference between
    <img runat="server" />
    and
    <asp:image runat="server" /> ?



  • Steve C. Orr [MVP, MCSD]

    #2
    Re: difference between HtmlControls and WebControls?

    The first example you gave <img runat="server"> is an HTML control.
    The second example you gave <asp:image runat="server" /> is a web control.

    HTML controls are quick and small and require little memory. Conversly, web
    controls provide more advanced functionality than HTML controls.

    If you're an old school HTML web developer then you'll find the HTML
    controls to be intuitive and familiar. If you have more of a
    Windows/VB/ActiveX background then you're more likely to feel at home with
    the extra features that web controls provide.

    --
    I hope this helps,
    Steve C. Orr, MCSD, MVP






    "Henri" <hmfireball@hot mail.com> wrote in message
    news:%23wxxmPFP EHA.3476@tk2msf tngp13.phx.gbl. ..[color=blue]
    > For instance, when should I use HtmlControls.Ht mlImage,
    > and when should I use WebControls.Ima ge ?
    >
    > And what is the difference between
    > <img runat="server" />
    > and
    > <asp:image runat="server" /> ?
    >
    >
    >[/color]


    Comment

    • Henri

      #3
      Re: difference between HtmlControls and WebControls?

      Very clear, thanks a lot!
      :-)
      To make a custom control, it seems that many control developpers inherit
      WebControls. What does it add more than inheriting HtmlControl or Control?

      Henri

      "Steve C. Orr [MVP, MCSD]" <Steve@Orr.ne t> a écrit dans le message de
      news:%23eyCDRGP EHA.632@TK2MSFT NGP12.phx.gbl.. .[color=blue]
      > The first example you gave <img runat="server"> is an HTML control.
      > The second example you gave <asp:image runat="server" /> is a web control.
      >
      > HTML controls are quick and small and require little memory. Conversly,[/color]
      web[color=blue]
      > controls provide more advanced functionality than HTML controls.
      >
      > If you're an old school HTML web developer then you'll find the HTML
      > controls to be intuitive and familiar. If you have more of a
      > Windows/VB/ActiveX background then you're more likely to feel at home with
      > the extra features that web controls provide.
      >
      > --
      > I hope this helps,
      > Steve C. Orr, MCSD, MVP
      > http://Steve.Orr.net
      >
      >
      >
      >
      >
      > "Henri" <hmfireball@hot mail.com> wrote in message
      > news:%23wxxmPFP EHA.3476@tk2msf tngp13.phx.gbl. ..[color=green]
      > > For instance, when should I use HtmlControls.Ht mlImage,
      > > and when should I use WebControls.Ima ge ?
      > >
      > > And what is the difference between
      > > <img runat="server" />
      > > and
      > > <asp:image runat="server" /> ?
      > >
      > >
      > >[/color]
      >
      >
      >[/color]



      Comment

      • Steve C. Orr [MVP, MCSD]

        #4
        Re: difference between HtmlControls and WebControls?

        HTML controls weren't designed to be extensible.
        Therefore, when making your own controls you should inherit from WebControl
        or Control.

        --
        I hope this helps,
        Steve C. Orr, MCSD, MVP




        "Henri" <hmfireball@hot mail.com> wrote in message
        news:%23YXXu1GP EHA.308@TK2MSFT NGP11.phx.gbl.. .[color=blue]
        > Very clear, thanks a lot!
        > :-)
        > To make a custom control, it seems that many control developpers inherit
        > WebControls. What does it add more than inheriting HtmlControl or Control?
        >
        > Henri
        >
        > "Steve C. Orr [MVP, MCSD]" <Steve@Orr.ne t> a écrit dans le message de
        > news:%23eyCDRGP EHA.632@TK2MSFT NGP12.phx.gbl.. .[color=green]
        > > The first example you gave <img runat="server"> is an HTML control.
        > > The second example you gave <asp:image runat="server" /> is a web[/color][/color]
        control.[color=blue][color=green]
        > >
        > > HTML controls are quick and small and require little memory. Conversly,[/color]
        > web[color=green]
        > > controls provide more advanced functionality than HTML controls.
        > >
        > > If you're an old school HTML web developer then you'll find the HTML
        > > controls to be intuitive and familiar. If you have more of a
        > > Windows/VB/ActiveX background then you're more likely to feel at home[/color][/color]
        with[color=blue][color=green]
        > > the extra features that web controls provide.
        > >
        > > --
        > > I hope this helps,
        > > Steve C. Orr, MCSD, MVP
        > > http://Steve.Orr.net
        > >
        > >
        > >
        > >
        > >
        > > "Henri" <hmfireball@hot mail.com> wrote in message
        > > news:%23wxxmPFP EHA.3476@tk2msf tngp13.phx.gbl. ..[color=darkred]
        > > > For instance, when should I use HtmlControls.Ht mlImage,
        > > > and when should I use WebControls.Ima ge ?
        > > >
        > > > And what is the difference between
        > > > <img runat="server" />
        > > > and
        > > > <asp:image runat="server" /> ?
        > > >
        > > >
        > > >[/color]
        > >
        > >
        > >[/color]
        >
        >
        >[/color]


        Comment

        • Henri

          #5
          Re: difference between HtmlControls and WebControls?

          Thanks :-)

          "Steve C. Orr [MVP, MCSD]" <Steve@Orr.ne t> a écrit dans le message de
          news:uKJxULHPEH A.556@TK2MSFTNG P10.phx.gbl...[color=blue]
          > HTML controls weren't designed to be extensible.
          > Therefore, when making your own controls you should inherit from[/color]
          WebControl[color=blue]
          > or Control.
          >
          > --
          > I hope this helps,
          > Steve C. Orr, MCSD, MVP
          > http://Steve.Orr.net
          >
          >
          >
          > "Henri" <hmfireball@hot mail.com> wrote in message
          > news:%23YXXu1GP EHA.308@TK2MSFT NGP11.phx.gbl.. .[color=green]
          > > Very clear, thanks a lot!
          > > :-)
          > > To make a custom control, it seems that many control developpers inherit
          > > WebControls. What does it add more than inheriting HtmlControl or[/color][/color]
          Control?[color=blue][color=green]
          > >
          > > Henri
          > >
          > > "Steve C. Orr [MVP, MCSD]" <Steve@Orr.ne t> a écrit dans le message de
          > > news:%23eyCDRGP EHA.632@TK2MSFT NGP12.phx.gbl.. .[color=darkred]
          > > > The first example you gave <img runat="server"> is an HTML control.
          > > > The second example you gave <asp:image runat="server" /> is a web[/color][/color]
          > control.[color=green][color=darkred]
          > > >
          > > > HTML controls are quick and small and require little memory.[/color][/color][/color]
          Conversly,[color=blue][color=green]
          > > web[color=darkred]
          > > > controls provide more advanced functionality than HTML controls.
          > > >
          > > > If you're an old school HTML web developer then you'll find the HTML
          > > > controls to be intuitive and familiar. If you have more of a
          > > > Windows/VB/ActiveX background then you're more likely to feel at home[/color][/color]
          > with[color=green][color=darkred]
          > > > the extra features that web controls provide.
          > > >
          > > > --
          > > > I hope this helps,
          > > > Steve C. Orr, MCSD, MVP
          > > > http://Steve.Orr.net
          > > >
          > > >
          > > >
          > > >
          > > >
          > > > "Henri" <hmfireball@hot mail.com> wrote in message
          > > > news:%23wxxmPFP EHA.3476@tk2msf tngp13.phx.gbl. ..
          > > > > For instance, when should I use HtmlControls.Ht mlImage,
          > > > > and when should I use WebControls.Ima ge ?
          > > > >
          > > > > And what is the difference between
          > > > > <img runat="server" />
          > > > > and
          > > > > <asp:image runat="server" /> ?
          > > > >
          > > > >
          > > > >
          > > >
          > > >
          > > >[/color]
          > >
          > >
          > >[/color]
          >
          >
          >[/color]



          Comment

          Working...