473,324 Members | 2,214 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,324 software developers and data experts.

what's the difference between a normal form element and a web control element?

Hi,

What's the difference between a normal web element:

<input type="text" id="txtname" name="txtname" runat="server">

vs webcontrol text box:

<asp:Textbox id="username" Columns="10" runat="server">
</asp:TextBox>

When should we use the normal input text box and when should we use the asp
textbox?

please advise.

Thanks.

Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Mar 24 '07 #1
12 3216
On Mar 25, 8:30 am, "Eric Layman" <namyalcire[at no spam]gmail.com>
wrote:
Hi,

What's the difference between a normal web element:

<input type="text" id="txtname" name="txtname" runat="server">

vs webcontrol text box:

<asp:Textbox id="username" Columns="10" runat="server">
</asp:TextBox>

When should we use the normal input text box and when should we use the asp
textbox?

please advise.

Thanks.

Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com

All Asp.net server controls eventually translated to html elements
when the page gets rendered...
Asp.net server controls provide more user friendly programming
environment...
for instance developers are use to access a Text Field by Control.Text
Property...
but in html you got to access via control.value ...
when control.Text is more meaning full... in programming a
application...

Thanks...
Masudur

Mar 24 '07 #2
Overall, I would use the asp.net server controls most of the time. The only
time I would go against that rule is when I have controls that I am using
more on the client side and only collecting data from in a large pull (the
entire form). I would also be careful to pick forms that are unlikely to
become more complex and need a lot of handling on the server side. WHile you
can handle HTML controls (runat="server"), they are not as rich.

The HTML controls were included, primarily, to allow an easy transition from
traditional ASP and other "legacy" technologies to ASP.NET. It is very rare
you will use the HTML controls.

If you need a lot of client side customization, through JavaScript, the HTML
controls are a bit easier to work with, but you can emit JavaScript from the
server side, so this is only marginally easier to do. And, is it worth the
sacrifice?

I would also consider HTML controls if your developers are not skilled in
web server controls, as they map to the HTML elements. But, you may
sacrifice some of the rich user interface heading this direction, so use
this reason with caution. Is the slightly lower learning curve worth the
sacrifice?

In ASP.NET 1.x, the story was a bit different, and I could see more reasons
to use the HTML controls. With 2.0, I will have to think hard to come up
with a really good reason.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*********************************************
Think outside the box!
*********************************************
"Eric Layman" <namyalcire[at no spam]gmail.comwrote in message
news:11************@sp6iad.superfeed.net...
Hi,

What's the difference between a normal web element:

<input type="text" id="txtname" name="txtname" runat="server">

vs webcontrol text box:

<asp:Textbox id="username" Columns="10" runat="server">
</asp:TextBox>

When should we use the normal input text box and when should we use the
asp textbox?

please advise.

Thanks.
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Mar 24 '07 #3

Hi,

Thanks for the reply.

Do u mind explaning why .NET 1.1 is different?

Right now the client is using net 1.1 for a public website.

Although I have configured my IIS to run .net 1.1, what are the pitfalls i
should watch out for?

Im using .net server controls at the moment.

Right now its a battle between building using classic asp vs dotnet.

I've just experimented with dotnet recently and Im pretty pleased by the
results. Complex task can be handled in a small amount of time!


"Cowboy (Gregory A. Beamer)" <No************@comcast.netNoSpamMwrote in
message news:CA**********************************@microsof t.com...
Overall, I would use the asp.net server controls most of the time. The
only time I would go against that rule is when I have controls that I am
using more on the client side and only collecting data from in a large
pull (the entire form). I would also be careful to pick forms that are
unlikely to become more complex and need a lot of handling on the server
side. WHile you can handle HTML controls (runat="server"), they are not as
rich.

The HTML controls were included, primarily, to allow an easy transition
from traditional ASP and other "legacy" technologies to ASP.NET. It is
very rare you will use the HTML controls.

If you need a lot of client side customization, through JavaScript, the
HTML controls are a bit easier to work with, but you can emit JavaScript
from the server side, so this is only marginally easier to do. And, is it
worth the sacrifice?

I would also consider HTML controls if your developers are not skilled in
web server controls, as they map to the HTML elements. But, you may
sacrifice some of the rich user interface heading this direction, so use
this reason with caution. Is the slightly lower learning curve worth the
sacrifice?

In ASP.NET 1.x, the story was a bit different, and I could see more
reasons to use the HTML controls. With 2.0, I will have to think hard to
come up with a really good reason.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*********************************************
Think outside the box!
*********************************************
"Eric Layman" <namyalcire[at no spam]gmail.comwrote in message
news:11************@sp6iad.superfeed.net...
>Hi,

What's the difference between a normal web element:

<input type="text" id="txtname" name="txtname" runat="server">

vs webcontrol text box:

<asp:Textbox id="username" Columns="10" runat="server">
</asp:TextBox>

When should we use the normal input text box and when should we use the
asp textbox?

please advise.

Thanks.
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com


Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Mar 24 '07 #4
With classic asp, you for the most part you need to reload the page each
time you need data from the server or want to send data to the server. With
asp.net using server controls you can do no without reloading the page. That
is the biggest advantage as far as I'm concerned in using asp.net.

I myself like to use System.Web.UI.ICallbackEventHandler to send and
receive data to and from the server

--
Dim Alan as ThatsIT.net.au.Staffmember
Alan.signature = "Thank You"
Response.Write Alan.signature.toString()
__________________________________________

"Eric Layman" <namyalcire[at no spam]gmail.comwrote in message
news:11************@sp6iad.superfeed.net...
>
Hi,

Thanks for the reply.

Do u mind explaning why .NET 1.1 is different?

Right now the client is using net 1.1 for a public website.

Although I have configured my IIS to run .net 1.1, what are the pitfalls i
should watch out for?

Im using .net server controls at the moment.

Right now its a battle between building using classic asp vs dotnet.

I've just experimented with dotnet recently and Im pretty pleased by the
results. Complex task can be handled in a small amount of time!


"Cowboy (Gregory A. Beamer)" <No************@comcast.netNoSpamMwrote in
message news:CA**********************************@microsof t.com...
>Overall, I would use the asp.net server controls most of the time. The
only time I would go against that rule is when I have controls that I am
using more on the client side and only collecting data from in a large
pull (the entire form). I would also be careful to pick forms that are
unlikely to become more complex and need a lot of handling on the server
side. WHile you can handle HTML controls (runat="server"), they are not
as rich.

The HTML controls were included, primarily, to allow an easy transition
from traditional ASP and other "legacy" technologies to ASP.NET. It is
very rare you will use the HTML controls.

If you need a lot of client side customization, through JavaScript, the
HTML controls are a bit easier to work with, but you can emit JavaScript
from the server side, so this is only marginally easier to do. And, is it
worth the sacrifice?

I would also consider HTML controls if your developers are not skilled in
web server controls, as they map to the HTML elements. But, you may
sacrifice some of the rich user interface heading this direction, so use
this reason with caution. Is the slightly lower learning curve worth the
sacrifice?

In ASP.NET 1.x, the story was a bit different, and I could see more
reasons to use the HTML controls. With 2.0, I will have to think hard to
come up with a really good reason.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*********************************************
Think outside the box!
*********************************************
"Eric Layman" <namyalcire[at no spam]gmail.comwrote in message
news:11************@sp6iad.superfeed.net...
>>Hi,

What's the difference between a normal web element:

<input type="text" id="txtname" name="txtname" runat="server">

vs webcontrol text box:

<asp:Textbox id="username" Columns="10" runat="server">
</asp:TextBox>

When should we use the normal input text box and when should we use the
asp textbox?

please advise.

Thanks.
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com

Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Mar 24 '07 #5
Well, you missed the most important difference between the two...

Web Form controls are server controls, which means that they are instances
of classes created on the web server. As such, they can be programmed by
your server-side code.

HTML Form controls are simply the standard, client-side, controls of the
HTML language and must be programmed only with client-side code.

This main diiference has many implacations for performance and scalability.
"Masudur" <mu*****@gmail.comwrote in message
news:11**********************@p15g2000hsd.googlegr oups.com...
On Mar 25, 8:30 am, "Eric Layman" <namyalcire[at no spam]gmail.com>
wrote:
>Hi,

What's the difference between a normal web element:

<input type="text" id="txtname" name="txtname" runat="server">

vs webcontrol text box:

<asp:Textbox id="username" Columns="10" runat="server">
</asp:TextBox>

When should we use the normal input text box and when should we use the
asp
textbox?

please advise.

Thanks.

Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com


All Asp.net server controls eventually translated to html elements
when the page gets rendered...
Asp.net server controls provide more user friendly programming
environment...
for instance developers are use to access a Text Field by Control.Text
Property...
but in html you got to access via control.value ...
when control.Text is more meaning full... in programming a
application...

Thanks...
Masudur

Mar 24 '07 #6
"Scott M." <s-***@nospam.nospamwrote in message
news:Oh**************@TK2MSFTNGP02.phx.gbl...
HTML Form controls are simply the standard, client-side, controls of the
HTML language and must be programmed only with client-side code.
Utter rubbish!

<input type="text" id="MyTextBox" run="server" value="Hello" />

protected void Page_Load(object sender, EventArgs e)
{
MyTextBox.Visible = false;
}
Mar 24 '07 #7
Not at all!

I noticed you added: run="server" (it should actually be runat="server", by
the way), but by doing that, you have changed the control from an HTML Form
Element to a .NET HTML Server control (which is then represented by a
server-side class and does give the object server-side programmability.).
Thus, you provided a response that has nothing to do with the question or my
reply.

Do you see the subject of this thread: "what's the difference between a
normal form element and a web control element?"?

An HTML Server Control (runat="server") is not a "normal form element", it
is a web control. So, basically, your response is comparing a web control
to a web control, not a normal HTML form element to a web control.

-Scott

"Mark Rae" <ma**@markNOSPAMrae.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
"Scott M." <s-***@nospam.nospamwrote in message
news:Oh**************@TK2MSFTNGP02.phx.gbl...
>HTML Form controls are simply the standard, client-side, controls of the
HTML language and must be programmed only with client-side code.

Utter rubbish!

<input type="text" id="MyTextBox" run="server" value="Hello" />

protected void Page_Load(object sender, EventArgs e)
{
MyTextBox.Visible = false;
}

Mar 24 '07 #8
"Scott M." <s-***@nospam.nospamwrote in message
news:OX*************@TK2MSFTNGP06.phx.gbl...
runat="server", by the way)
You're quite right - well done for picking that up...
Mar 24 '07 #9
The OP is asking about the difference of the server controls. Look at
the code he presented as examples.

If you ignore the examples because you think that they are incorrect,
and only answer the question in the subject, I think that you should say
so. Otherwise your reply only adds confusion to the thread.

Scott M. wrote:
Well, you missed the most important difference between the two...

Web Form controls are server controls, which means that they are instances
of classes created on the web server. As such, they can be programmed by
your server-side code.

HTML Form controls are simply the standard, client-side, controls of the
HTML language and must be programmed only with client-side code.

This main diiference has many implacations for performance and scalability.
"Masudur" <mu*****@gmail.comwrote in message
news:11**********************@p15g2000hsd.googlegr oups.com...
>On Mar 25, 8:30 am, "Eric Layman" <namyalcire[at no spam]gmail.com>
wrote:
>>Hi,

What's the difference between a normal web element:

<input type="text" id="txtname" name="txtname" runat="server">

vs webcontrol text box:

<asp:Textbox id="username" Columns="10" runat="server">
</asp:TextBox>

When should we use the normal input text box and when should we use the
asp
textbox?

please advise.

Thanks.

Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com

All Asp.net server controls eventually translated to html elements
when the page gets rendered...
Asp.net server controls provide more user friendly programming
environment...
for instance developers are use to access a Text Field by Control.Text
Property...
but in html you got to access via control.value ...
when control.Text is more meaning full... in programming a
application...

Thanks...
Masudur


--
Göran Andersson
_____
http://www.guffa.com
Mar 25 '07 #10
Eric Layman wrote:
Hi,

What's the difference between a normal web element:

<input type="text" id="txtname" name="txtname" runat="server">

vs webcontrol text box:

<asp:Textbox id="username" Columns="10" runat="server">
</asp:TextBox>

When should we use the normal input text box and when should we use the asp
textbox?

please advise.

Thanks.
An html element with runat="server" will be parsed into a server control
in the System.Web.UI.HtmlControls namespace.

These are server controls that directly correspond to the html elements
that will end up in the final page. It gives you access to the
properties of the control from the server code, but it doesn't add the
rich functionality of the web controls. A control like this does not
require a form with runat="server" to work.

A server control with the asp: prefix will be parsed into a server
control in the System.Web.UI.WebControls namespace.

These are rich controls that can use ViewState to retain values between
postbacks, and offer you events to handle the result of the user
actions. A web control might not exactly correspond to a single html
element in the page, but may render several elements, or even none at
all. A web control that uses ViewState has to be placed in a form with
runat="server".

--
Göran Andersson
_____
http://www.guffa.com
Mar 25 '07 #11
I'll be honest with you Goran and tell you that I didn't notice the
runat=server in the first post. My response was based on the subject and
the <INPUTvs. <ASP:>
"Göran Andersson" <gu***@guffa.comwrote in message
news:ud**************@TK2MSFTNGP02.phx.gbl...
The OP is asking about the difference of the server controls. Look at the
code he presented as examples.

If you ignore the examples because you think that they are incorrect, and
only answer the question in the subject, I think that you should say so.
Otherwise your reply only adds confusion to the thread.

Scott M. wrote:
>Well, you missed the most important difference between the two...

Web Form controls are server controls, which means that they are
instances of classes created on the web server. As such, they can be
programmed by your server-side code.

HTML Form controls are simply the standard, client-side, controls of the
HTML language and must be programmed only with client-side code.

This main diiference has many implacations for performance and
scalability.
"Masudur" <mu*****@gmail.comwrote in message
news:11**********************@p15g2000hsd.googleg roups.com...
>>On Mar 25, 8:30 am, "Eric Layman" <namyalcire[at no spam]gmail.com>
wrote:
Hi,

What's the difference between a normal web element:

<input type="text" id="txtname" name="txtname" runat="server">

vs webcontrol text box:

<asp:Textbox id="username" Columns="10" runat="server">
</asp:TextBox>

When should we use the normal input text box and when should we use the
asp
textbox?

please advise.

Thanks.

Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com

All Asp.net server controls eventually translated to html elements
when the page gets rendered...
Asp.net server controls provide more user friendly programming
environment...
for instance developers are use to access a Text Field by Control.Text
Property...
but in html you got to access via control.value ...
when control.Text is more meaning full... in programming a
application...

Thanks...
Masudur



--
Göran Andersson
_____
http://www.guffa.com

Mar 25 '07 #12
The answer to your question is in my FAQ.
Here I have summarized the difference between HTML controls ("web elements"
as you call them) and web controls:
http://SteveOrr.net/faq/3in1.aspx#HTMLvsWeb

--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net
"Eric Layman" <namyalcire[at no spam]gmail.comwrote in message
news:11************@sp6iad.superfeed.net...
Hi,

What's the difference between a normal web element:

<input type="text" id="txtname" name="txtname" runat="server">

vs webcontrol text box:

<asp:Textbox id="username" Columns="10" runat="server">
</asp:TextBox>

When should we use the normal input text box and when should we use the
asp textbox?

please advise.

Thanks.
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Mar 27 '07 #13

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

Similar topics

54
by: Brandon J. Van Every | last post by:
I'm realizing I didn't frame my question well. What's ***TOTALLY COMPELLING*** about Ruby over Python? What makes you jump up in your chair and scream "Wow! Ruby has *that*? That is SO...
125
by: Sarah Tanembaum | last post by:
Beside its an opensource and supported by community, what's the fundamental differences between PostgreSQL and those high-price commercial database (and some are bloated such as Oracle) from...
10
by: giancarlodirisioster | last post by:
Can someone help me modify this for future Usenet archival and to help me solve what I don't know? <form name="addform" method="POST" action="./submit.php"> <input type="text" name="Box 1"...
3
by: Jordan | last post by:
I am dynamically inserting an html <input> tag as text (equivalent of an image button) into a page via a Literal control. Something like this gets inserted: <input type="image"...
10
by: Just Me | last post by:
Does Me.Cursor.Current=Cursors.WaitCursor set the current property of Me.Cursor to Cursors.WaitCursor And Me.Cursor.Current=Cursors.Default set the Me.Current property to something (default)...
14
by: DraguVaso | last post by:
Hi, I'm new to WebServices, and I'm doing some tests (with a small VB.NET-application) to know the performance-difference between a WebService and the 'normal'-way of getting data (just...
5
by: kai | last post by:
Hi, In ASP.NET , what is the difference between OnClick and Click events for a button? Because we have button click event, it can trigger events, why we still need OnClick? Please help. ...
15
by: Markus Ernst | last post by:
Hi When toggling an element on and off by setting its display property via DOM access, display:none is valid for all kinds of elements, but I can't find anything about a generic value for...
20
by: Daniel.C | last post by:
Hello. I just copied this code from my book with no modification : #include <stdio.h> /* count characters in input; 1st version */ main() { long nc; nc = 0;
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shćllîpôpď 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.