📄 styleclass.aspx
字号:
<%@ Page Language="C#"%>
<%@ Import Namespace="System.Drawing" %>
<script Runat="Server">
void Page_Load(Object sender, EventArgs e)
{
Style myStyle = new Style();
myStyle.BackColor = Color.Yellow;
myStyle.ForeColor = Color.Green;
myStyle.BorderStyle = BorderStyle.Dashed;
myStyle.BorderWidth = new Unit(4);
txtTextBox1.ApplyStyle( myStyle );
txtTextBox2.ApplyStyle( myStyle );
txtTextBox3.MergeStyle( myStyle );
}
</Script>
<html>
<head><title>StyleClass.aspx</title></head>
<body>
<form Runat="Server">
<asp:TextBox
id="txtTextBox1"
BackColor="red"
Text="Here is some text!"
Runat="Server"/>
<p>
<asp:TextBox
id="txtTextBox2"
BackColor="red"
Text="Here is some text!"
Runat="Server"/>
<p>
<asp:TextBox
id="txtTextBox3"
BackColor="red"
Text="Here is some text!"
Runat="Server"/>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -