本文介绍了asp控件中的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服务器
发布评论