473,386 Members | 1,819 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Question on HTML and Web(Server Side) Controls

I know more html is needed to really produce this but enough is here
for me to ask my question. So, this HTML code produce 2 buttons. One
button is a HTML control and the other is ASP Web or Server Control.
Why are there 2 ways to create buttons if they so the same thing? Do
they do the same thing? In what senario would I use a HTML button
rather than a Web control button. Does it matter? If not why 2
different controls that do the same thing.

<HTML>

<form id="Form1" method="post" runat="server">

<INPUT style="Z-INDEX: 101; LEFT: 104px; POSITION: absolute; TOP:
40px" type="button" value="Button1" id="Button2" name="Button2"
runat="server">

<asp:Button id="Button1" style="Z-INDEX: 102; LEFT: 104px; POSITION:
absolute; TOP: 88px" runat="server" Text="Button2"></asp:Button>
</form>

</HTML>
Thanks
Ralph Krausse

www.consiliumsoft.com
Use the START button? Then you need CSFastRunII...
A new kind of application launcher integrated in the taskbar!
ScreenShot - http://www.consiliumsoft.com/ScreenShot.jpg
Nov 18 '05 #1
2 1016
What you are asking is why have System.Web.UI.WebControls and
System.Web.UI.HtmlControls? Specifically, why have the overlapping
controls?

The WebControls tend to provide more flexibility and power from a
development stand-point. They expose more properties, more events, and more
functionality. That's their raison d'être.

HtmlControls, exist because of how easily pure HTML/ASP can be converted to
them. Add a runat="server" and an id="xxx" and you can program against them
You won't have all the power of WebControls, but you'll get under way a lot
quicker.
Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"Ralph Krausse" <go*******@consiliumsoft.com> wrote in message
news:49**************************@posting.google.c om...
I know more html is needed to really produce this but enough is here
for me to ask my question. So, this HTML code produce 2 buttons. One
button is a HTML control and the other is ASP Web or Server Control.
Why are there 2 ways to create buttons if they so the same thing? Do
they do the same thing? In what senario would I use a HTML button
rather than a Web control button. Does it matter? If not why 2
different controls that do the same thing.

<HTML>

<form id="Form1" method="post" runat="server">

<INPUT style="Z-INDEX: 101; LEFT: 104px; POSITION: absolute; TOP:
40px" type="button" value="Button1" id="Button2" name="Button2"
runat="server">

<asp:Button id="Button1" style="Z-INDEX: 102; LEFT: 104px; POSITION:
absolute; TOP: 88px" runat="server" Text="Button2"></asp:Button>
</form>

</HTML>
Thanks
Ralph Krausse

www.consiliumsoft.com
Use the START button? Then you need CSFastRunII...
A new kind of application launcher integrated in the taskbar!
ScreenShot - http://www.consiliumsoft.com/ScreenShot.jpg

Nov 18 '05 #2
Ralph Krausse wrote:
I know more html is needed to really produce this but enough is here
for me to ask my question. So, this HTML code produce 2 buttons. One
button is a HTML control and the other is ASP Web or Server Control.
Why are there 2 ways to create buttons if they so the same thing? Do
they do the same thing? In what senario would I use a HTML button
rather than a Web control button. Does it matter? If not why 2
different controls that do the same thing.

<HTML>

<form id="Form1" method="post" runat="server">

<INPUT style="Z-INDEX: 101; LEFT: 104px; POSITION: absolute; TOP:
40px" type="button" value="Button1" id="Button2" name="Button2"
runat="server">

<asp:Button id="Button1" style="Z-INDEX: 102; LEFT: 104px; POSITION:
absolute; TOP: 88px" runat="server" Text="Button2"></asp:Button>
</form>

</HTML>
Thanks
Ralph Krausse

www.consiliumsoft.com
Use the START button? Then you need CSFastRunII...
A new kind of application launcher integrated in the taskbar!
ScreenShot - http://www.consiliumsoft.com/ScreenShot.jpg

For button it may be that you do not need web server control but
generally web controls will enable you to write browser independent code
(of course you can create little problems to yourself). And web controls
by default has viewstate enabled so any changes on them are preserved in
postbacks but if you are e.g. changing the text of the button, you need
to run the client code to change it all the time or, in the Page_Load
assing the value all the time. However if you have a web control you can
assing it once and it will stay there as long as you don't change it
agian. (A basic viewstate example)

But again, most of the time, it will help you to write browser
independent code as ASP.NET web controls handles this part for you.

I hope it was not too complicated.

--

SevDer
http://www.sevder.com
Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Hari | last post by:
What is the difference between HTML controls, HTML server controls , ASP.Net controls? Which will give more performance?
1
by: Ralph Krausse | last post by:
I know more html is needed to really produce this but enough is here for me to ask my question. So, this HTML code produce 2 buttons. One button is a HTML control and the other is ASP Web or Server...
1
by: Matthew Louden | last post by:
Personally, I am totally confused with the following control terms and usage and advantages of each one in ASP.NET web application. Here's what I know so far.. 1. HTML Client Control: understood...
1
by: eNathan | last post by:
I want to be able to disable\enable controls on the client via client-side scripting. I'm trying to avoid a postback. I'd like to use HTML and server-side controls on the same page. In code-behind...
2
by: Mihir | last post by:
Is CLR a process or a thread? if process then name it... if thread, name its parent process? 2. Is Garbage Colelctor a process or a thread? if process then name it... if thread, name its parent...
5
by: siaj | last post by:
Hello All, Can any one give me a clue when to use Web Server controls/ HTML server controls/HTML Controls. As I understand .. HTML controls should be used if u dont need to refer it in the code...
2
by: dee | last post by:
Hi, I was wondering if server side html controls were used prior to dotnet? Thanks Dee
5
by: serge calderara | last post by:
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...
2
by: acb | last post by:
Hi, If one ignores the fact that web controls are rich when compared to HTML Server controls, are there any other issues that make Web Controls more bandwidth hungry when compared to HTML Server...
3
by: balurajeev | last post by:
Hii, currently i am working on an apliction(ASP.NET/C#) that creates dynamic html rows which contain six html text boxes and a html dropdowllist. At the time of page load the web page contain six...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.