惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

aimingoo的专栏
aimingoo的专栏
宝玉的分享
宝玉的分享
博客园 - 【当耐特】
博客园 - 司徒正美
L
LangChain Blog
有赞技术团队
有赞技术团队
大猫的无限游戏
大猫的无限游戏
Stack Overflow Blog
Stack Overflow Blog
Engineering at Meta
Engineering at Meta
U
Unit 42
Microsoft Azure Blog
Microsoft Azure Blog
I
InfoQ
博客园 - 叶小钗
H
Hackread – Cybersecurity News, Data Breaches, AI and More
J
Java Code Geeks
月光博客
月光博客
量子位
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园_首页
Last Week in AI
Last Week in AI
人人都是产品经理
人人都是产品经理
Google DeepMind News
Google DeepMind News
云风的 BLOG
云风的 BLOG
D
DataBreaches.Net

博客园 - 阿社

!!如何看到真实的服务器 错误提示 !访问网站出现Directory Listing Denied 是什么原因? !后台登录总 提示验证码错误!! !设置IIS后 访问提示 页面不存在 HTTP 500错误 Windows2003网络服务器安全攻略! Win2003 ISS下Asp配置技巧 http 500内部服务器错误 !商城登录后不能自动在社区登录! ASP.NET中TreeView控件使用小结 使用IE WebControls中的TabStrip控件和MultiPage控件实现选项卡式风格页面 [程序员必看]请不要做浮躁的人 未能在设计视图中打开,在中以不同方式将值括起来 我应该用DataReader类还是DataSet类呢?” DataGrid、DataList和Repeater控件 ListBox控件使用 DropDownList控件使用 C#笔记 C#常用函数和方法集汇总-日期函数 ASP常用三十三种代码 ASP.net数据绑定概述和语法
编程控制控件Style属性
阿社 · 2006-09-02 · via 博客园 - 阿社

、可使用 WebControl 基类的 ApplyStyle 方法以编程方式设置 Web 服务器控件样式,如下面的代码所示。

<script language="C#" runat="server">
            void Page_Load(Object Src, EventArgs E ) {
            Style style = new Style();
            style.BorderColor = Color.Black;
            style.BorderStyle = BorderStyle.Dashed;
            style.BorderWidth = 1;
            MyLogin.ApplyStyle (style);
            MyPassword.ApplyStyle (style);
            MySubmit.ApplyStyle (style);
            }
            </script>
            Login: <ASP:TextBox id="MyLogin" runat="server" />/<p/>
            Password: <ASP:TextBox id="MyPassword" TextMode="Password" runat="server" />
            View:  <ASP:DropDownList id="MySelect" runat="server">  ...  </ASP:DropDownList>