📄 16.3.txt
字号:
Listing 16.3 Validating a TextBox Control
private void ColorValidator_ServerValidate(object source,
System.Web.UI.WebControls.ServerValidateEventArgs args)
{
string[] colorArray = new string[]{“red”, “orange”, “yellow”,
“green”, “blue”, “indigo”, “violet”};
ArrayList colorList = new ArrayList( colorArray );
if( colorList.Contains( args.Value.ToLower() ))
{
args.IsValid = true;
}
else
{
args.IsValid = false;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -