asp.net控件中的Runat服务器 [英] Runat server in asp.net controls

查看:89
本文介绍了asp.net控件中的Runat服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么我必须在所有ASP.NET控件上指定runat ="server" ...请告诉我原因是什么...请给我解释

Why do I have to specify runat="server" on all my ASP.NET controls ...Please tell me what is the reason...give me explanations for it

推荐答案

通过设置runat ="server"来控制此属性可用于后面的代码.
这是使HTML控件和ASP控件有所不同的属性.

希望对您有所帮助.
By settting runat="server" this property to controls that control is available to you on code behind.
This is the property which makes difference between HTML control and ASP controls.

hope this helps you.


runat="server"因为它的服务器端控件太简单了
runat="server" Because it''s server side controls too simple


您可以在以下线程中获得详细的答案:
为什么ASP.NET网络表单需要Runat ="Server "属性 [ ^ ]

任何标有runat="server"的元素都会使框架知道这将是服务器端的控件.本文有更多详细信息:
探索Runat属性 [为什么ASP.NET Webforms使用"Runat = Server"属性 [
You can get detailed answer on following thread:
Why does ASP.NET webforms need the Runat="Server" attribute[^]

Any element marked with runat="server" lets the framework know that this will be a control on the server side. This article has more details:
Exploring the Runat Attribute[^]


Here''s another good article i have found, you''ll surely get some more needful from it:
Why does ASP.NET Webforms use the "Runat=Server" attribute[^]


这篇关于asp.net控件中的Runat服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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