473,732 Members | 2,083 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3247
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.sup erfeed.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.netNoS pamMwrote in
message news:CA******** *************** ***********@mic rosoft.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.sup erfeed.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.I CallbackEventHa ndler 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.sup erfeed.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.netNoS pamMwrote in
message news:CA******** *************** ***********@mic rosoft.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.su perfeed.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:Textbo x 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.goo glegroups.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.nosp amwrote in message
news:Oh******** ******@TK2MSFTN GP02.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(objec t sender, EventArgs e)
{
MyTextBox.Visib le = 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**@markNOSPA Mrae.comwrote in message
news:%2******** ********@TK2MSF TNGP03.phx.gbl. ..
"Scott M." <s-***@nospam.nosp amwrote in message
news:Oh******** ******@TK2MSFTN GP02.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(objec t sender, EventArgs e)
{
MyTextBox.Visib le = false;
}

Mar 24 '07 #8
"Scott M." <s-***@nospam.nosp amwrote in message
news:OX******** *****@TK2MSFTNG P06.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.goo glegroups.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:Textbo x 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

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

Similar topics

54
6568
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 FRICKIN' COOL!!! ***MAN*** that would save me a buttload of work and make my life sooooo much easier!" As opposed to minor differences of this feature here, that feature there. Variations on style are of no interest to me. I'm coming at this from a...
125
14801
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 software giant such as Microsoft SQL Server, Oracle, and Sybase? Is PostgreSQL reliable enough to be used for high-end commercial application? Thanks
10
5983
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" size="20" value="100.50"> + <input type="text" name="Box 2" size="20" value="200.50"> + <input type="text" name="Box 3" size="20" value="1.50"> = <input type="text" name="Total" size="20" value="302.50"> </p> </form>
3
2221
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" name="MyImageButton" id="MyImageButton" src="somePic.jpg" /> I want for the code-behind to "know" when the user clicked on the image - but I don't want to also have to dynamically specify a delegate for an event procedure to handle this control which is really...
10
17368
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) stored in Me.Cursor. Or is Cursors.Default some process wide cursor shape? What is a correct statement?
14
2504
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 connecting directly with a SqlDataAdapter to the SQL Server). The WebMethod simply gives a DataSet back, and does exactly the same actions as the normal-Method does. The difference are enormous in my opinion: 1 record:
5
5848
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. Thanks kai
15
12489
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 toggling on again. Furthermore, UAs do not recognize the same values. To make a table row visible, IE wants display:block while FF wants display:table-row. Am I missing something? I am looking for something like display:normal
20
2814
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;
1
9234
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9180
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8186
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6733
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6030
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4548
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3259
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2721
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2177
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.