In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly shows you "how to close the unnecessary functions of the base class in ASP.NET", the content is simple and clear, and I hope it can help you solve your doubts. Let me lead you to study and learn this article "how to turn off unnecessary functions of the base class in ASP.NET".
Here are two of them:
1. Close the container
The Control class has the Controls collection property, that is, the control that inherits the Control class is a container control, and the asp.net control has a built-in PlaceHolder control, which only inherits from the Control class and does nothing. But all controls inherit from the Control class. Like a label control, it can still be used as a container.
Label1.Controls.add (control)
Some controls do not need this function, such as Literal controls, which only output plain text and are not allowed to add child controls.
Quite simply, override the CreateControlCollection method to return an empty collection of EmptyControlCollection
Protected override ControlCollection CreateControlCollection () {return new EmptyControlCollection (this);}
For example, the SqlDataSourceControl control inherits from the DataSourceControl,DataSourceControl class and inherits from the Control class. DataSourceControl does not need to render things and naturally does not need styles, so properties such as SkinID,EnableTheming do not need to be used. You can also disable some common properties like the WebControl class with the new keyword and some metadata. Sometimes you really don't need these things, or you can use these attributes for subtags.
/ * * / [Bindable (false), Browsable (false), EditorBrowsable (EditorBrowsableState.Never)] new public System.Drawing.Color BorderColor {get {return new System.Drawing.Color ();}} these are all the contents of the article "how to turn off unnecessary functions of the base class in ASP.NET". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.