473,387 Members | 1,575 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,387 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
Jul 21 '05 #1
1 1365
1. <input type="button" value="Submit">
2. <input type="button" value="Submit" runat="server">

Item 1 is a Html Control (similar to the one used in ASP and traditional
HTML programming). Item 2 is a Html Server Control which has the additional
runat="server" in the syntax. The difference between the two is that Item 2
remembers the state information and is accessible programmatically in the
code-behind files. The state information is not relevant in this case of a
button but will be useful if it were an dropdown list or textbox.

Another kind of control available in .NET is the Web Server Control which
also has the runat="server" in its syntax. The difference between a web
server control and an html control is that web server controls are more smart
where they can render html based on the type of browsers and they also
support event bubbling (if you have controls nested in the container control,
say, an button in the datagrid, then events occurring in the button can
bubble up to the datagrid)

Hope this helps
Niranjan.
"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

Jul 21 '05 #2

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: 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...
2
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...
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...
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: 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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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,...

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.