Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
<asp:ListBox ID="lb" Runat=server SelectionMode=Multiple>
<asp:ListItem Value="1">Item 1</asp:ListItem>
<asp:ListItem Value="2">Item 2</asp:ListItem>
<asp:ListItem Value="3">Item 3</asp:ListItem>
</asp:ListBox>
<asp:RequiredFieldValidator ID="rvlb" Runat=server ControlToValidate="lb" InitialValue="" ErrorMessage="Select Item" />
<head>
<script language=javascript>
function checkChars(source, arguments){
arguments.IsValid = true;
var len = arguments.Value.length;
// ensure that 5 characters are entered
if(len != 5){
arguments.IsValid = false;
}
}
</script>
</head>
<asp:TextBox ID="myText" Runat=server />
<asp:CustomValidator ID="vldMyText" Runat=server ErrorMessage="Invalid number of characters" ControlToValidate="myText" ClientValidationFunction="checkChars" />