普通表单元素和Web控件元素之间有什么区别? [英] what's the difference between a normal form element and a web control element?

查看:106
本文介绍了普通表单元素和Web控件元素之间有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




普通网元之间的区别是什么:


< input type =" text" ID = QUOT; txtName的"命名= QUOT; txtName的" runat =" server">


vs webcontrol文本框:


< asp:Textbox id =" username"列= QUOT; 10" runat =" server">

< / asp:TextBox>


我们应该何时使用普通输入文本框,何时应该使用asp

文本框?


请指教。


谢谢。


发布通过Usenet.com高级Usenet新闻组服务

------------------------------- ---------------------------

**速度**保留**完成**匿名**

------------------------------------------- ---------------
http:// www .usenet.com

解决方案

3月25日上午8:30,Eric Layman < namyalcire [无垃圾邮件] gmail.com>

写道:





普通网元之间的区别是什么:


< input type =" text" ID = QUOT; txtName的"命名= QUOT; txtName的" runat =" server">


vs webcontrol文本框:


< asp:Textbox id =" username"列= QUOT; 10" runat =" server">

< / asp:TextBox>


我们应该何时使用普通输入文本框,何时应该使用asp

文本框?


请指教。


谢谢。


发布通过Usenet.com高级Usenet新闻组服务

------------------------------- ---------------------------

**速度**保留**完成**匿名**

------------------------------------------- ---------------
http:// www .usenet.com



当页面被呈现时,所有Asp.net服务器控件最终都转换为html元素

...

Asp.net服务器控件提供更多用户友好的编程

环境......

例如开发人员用于通过Control.Text访问文本字段

属性......

但是在html中你必须通过控制访问。值...

当control.Text更具意义时......编程

应用程序......


谢谢...

Masudur


总的来说,我会在大多数时候使用asp.net服务器控件。唯一的

时间我会反对这个规则是当我有控件,我在客户端使用更多
并且只从大量拉动中收集数据(

整个表格)。我也会小心选择那些不太可能会变得更加复杂并需要在服务器端进行大量处理的表格。你可以使用
来处理HTML控件(runat =" server"),但它们并不那么丰富。


HTML控件主要包括在内允许从传统的ASP和其他遗产中轻松过渡。 ASP.NET的技术。这是非常罕见的

您将使用HTML控件。


如果您需要大量客户端自定义,通过JavaScript,HTML

控件更容易使用,但是你可以从

服务器端发出JavaScript,所以这只是稍微容易一些。并且,是否值得牺牲




如果您的开发人员不熟练,我也会考虑使用HTML控件

web服务器控件,因为它们映射到HTML元素。但是,你可能会为这个方向牺牲一些富有的用户界面,所以请谨慎使用

这个原因。稍微低一点的学习曲线值得牺牲吗?


在ASP.NET 1.x中,故事有点不同,我可以看到更多原因

使用HTML控件。有了2.0,我将不得不努力想出上一个很好的理由。


-

Gregory A Beamer

MVP; MCP:+ I,SE,SD,DBA


**************************** *****************

在盒子外面思考!

************ *********************************

" Eric Layman" < namyalcire [无垃圾邮件] gmail.com写信息

新闻:11 ************ @ sp6iad.superfeed.net ...
< blockquote class =post_quotes>



普通网元之间有什么区别:


< ; input type =" text" ID = QUOT; txtName的"命名= QUOT; txtName的" runat =" server">


vs webcontrol文本框:


< asp:Textbox id =" username"列= QUOT; 10" runat =" server">

< / asp:TextBox>


我们应该何时使用普通输入文本框,何时应该使用

asp文本框?


请指教。


谢谢。


发布通过Usenet.com高级Usenet新闻组服务

------------------------------- ---------------------------

**速度**保留**完成**匿名**

------------------------------------------- ---------------
http:// www .usenet.com







感谢您的回复。


您是否介意解释为什么.NET 1.1不同?


现在客户端正在使用net 1.1进行公共网站。 />

虽然我已经将我的IIS配置为运行.net 1.1,但是我应该注意哪些陷阱?
应该注意什么?


我正在使用.net服务器控制此刻。


现在它是使用经典asp与dotnet之间的战斗。


我刚刚最近尝试了dotnet,我非常高兴

结果。复杂的任务可以在很短的时间内完成!


" Cowboy(Gregory A. Beamer)" < No ************ @ comcast.netNoSpamMwrote

消息新闻:CA ****************** **************** @ microsof t.com ...


总的来说,我会使用asp.net服务器在大多数情况下控制。

只有我反对这个规则的时候才是我控制器,我在客户端使用更多的控制器,并且只在大的时候收集数据>
拉(整个表格)。我也会小心选择那些不太可能变得更加复杂并且需要在服务器上进行大量处理的表格

。你可以处理HTML控件(runat =" server"),但它们并不像
那样丰富。


HTML控件主要包括在内允许从传统ASP和其他遗产中轻松过渡

ASP.NET的技术。这是非常罕见的,您将使用HTML控件。


如果您需要通过JavaScript进行大量客户端自定义,

HTML控件更容易使用,但是你可以从服务器端发出JavaScript

,所以这只是稍微容易一些。而且,这是值得牺牲的吗?


如果您的开发人员不熟练,我也会考虑使用HTML控件

web服务器控件,因为它们映射到HTML元素。但是,你可能会为这个方向牺牲一些富有的用户界面,所以请谨慎使用

这个原因。稍微低一点的学习曲线值得牺牲吗?


在ASP.NET 1.x中,故事有点不同,我可以看到更多

使用HTML控件的原因。有了2.0,我将不得不认真思考

想出一个非常好的理由。


-

Gregory A Beamer

MVP; MCP:+ I,SE,SD,DBA


**************************** *****************

在盒子外面思考!

************ *********************************

" Eric Layman" < namyalcire [无垃圾邮件] gmail.com写信息

新闻:11 ************ @ sp6iad.superfeed.net ...
< blockquote class =post_quotes>
>

普通网元之间有什么区别:

< input type ="文本" ID = QUOT; txtName的"命名= QUOT; txtName的" runat =" server">


< asp:Textbox id =" username"列= QUOT; 10" runat =" server">
< / asp:TextBox>

我们应该何时使用普通输入文本框,何时应该使用
asp文本框?<请告知。

谢谢。

发布通过Usenet.com高级Usenet新闻组服务
--------- -------------------------------------------------
**速度**保留**完成**匿名**
----------------------------- -----------------------------
http://www.usenet.com




发布通过Usenet.com Premium Usenet新闻组服务

----------------------------------------- -----------------

**速度**保留**完成**匿名**

--- -------------------------------------------------- -----
http://www.usenet.com

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

解决方案

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


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



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


这篇关于普通表单元素和Web控件元素之间有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆