exercise1a.aspx
来自「asp入门到精通的源代码」· ASPX 代码 · 共 25 行
ASPX
25 行
<html><body>
<form runat="server">
<asp:ListBox id="lb1" runat="server" >
<asp:ListItem>Red</asp:ListItem>
<asp:ListItem>Green</asp:ListItem>
<asp:ListItem>Blue</asp:ListItem>
<asp:ListItem>Brown</asp:ListItem>
</asp:ListBox>
<asp:ListBox id="lb2" runat="server" >
<asp:ListItem>Red</asp:ListItem>
<asp:ListItem>Green</asp:ListItem>
<asp:ListItem>Blue</asp:ListItem>
<asp:ListItem>Brown</asp:ListItem>
</asp:ListBox>
<p>
<asp:CompareValidator runat="server"
ControlToValidate="lb1"
ControlToCompare="lb2"
Operator="Equal"
ErrorMessage="The selected values are not equal!" />
</form>
</body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?