正在阅读:ASP.NET14个热点问题解答ASP.NET14个热点问题解答

2004-02-14 09:34 出处:PConline 作者:andy.m 责任编辑:huangpeidan
10、Web控件是否支持样式表(CSS)呢?

Yes. All Web controls inherit a property named CssClass from the base class System.Web.UI.WebControls.WebControl. The following example defines a CSS class named Input and uses it to modify a TextBox control to display text in red 10-point Verdana type:

支持,所有的Web控件都从基类System.Web.UI.WebControls.WebControl中继承了一个叫做CssClass的属性。
例如:
<html>
<head>
<style>
.Input { font: 10pt verdana; color: red; }
</style>
</head>
<body>
<form runat="server">
<asp:TextBox CssClass="Input" RunAt="server" />
</form>
</body>
</html>

11、在ASPX文件中默认导入那些名称空间?

ASPX默认导入的名称空间可以直接引用了,使用其它的名称空间就的自行导入了。

默认名称空间
&#61548; System
&#61548; System.Collections
&#61548; System.Collections.Specialized
&#61548; System.Configuration
&#61548; System.Text
&#61548; System.Text.RegularExpressions
&#61548; System.Web
&#61548; System.Web.Caching
&#61548; System.Web.Security
&#61548; System.Web.SessionState
&#61548; System.Web.UI
&#61548; System.Web.UI.HtmlControls
&#61548; System.Web.UI.WebControls

键盘也能翻页,试试“← →”键

关注我们

最新资讯离线随时看 聊天吐槽赢奖品