{$cfg_webname}
主页 > 外文翻译 > 计算机翻译 >

ASP.NET的Web窗体

来源:wenku163.com  资料编号:WK1635562 资料等级:★★★★★ %E8%B5%84%E6%96%99%E7%BC%96%E5%8F%B7%EF%BC%9AWK1635562
资料介绍


 asp.NET的Web窗体

 

  控件的应用样式

  * HTML控件的应用样式

  * WEB控件的应用样式

  * 段落摘要

  WEB是一个灵活的用户接口环境,在不同的WEB站点,有许多不同的变量。由于CSS技术的广泛采用,产生了设计样式风格迥异的网页。所有的asp.NET的HTML服务控件和WEB服务控件,都为CSS样式提供最高级别的支持。这段讲讨论如何使用服务器连接控件和如何非出色地对服务控件提供的WEB格式进行控制。

  HTML控件的应用样式

  标准的HTML标签支持CSS是通过将样式属性设置为一系列不同的值。Internet浏览器支持CSS属性,其中关于属性的很多信息可以查阅Msdn Web WorkShop的CSS属性进行参照。所有的asp.NET HTML的服务控件可以与标准HTML标签相同的方式进行连接。下面的例子证明了不同HTML服务控件应用的不同样式。如果你浏览了返回到客户端的源程序代码,你将明白这些样式是通过控件传到浏览器上。

  CSS也定义了类的属性。类的属性在CSS中被定义为包含在一个 section of the document. The class attribute makes it easy to define styles once and apply them to several tags without having to redefine the style itself. Styles on HTML server controls also can be set in this manner, as demonstrated in the following sample.

When an asp.NET page is parsed, the style information is populated into a Style property (of type CssStyleCollection) on the System.Web.UI.HtmlControls.HtmlControl class. This property is essentially a dictionary that exposes the control's styles as a string-indexed collection of values for each style-attribute key. For example, you could use the following code to set and subsequently retrieve the width style attribute on an HtmlInputText server control.

推荐资料