protected void CustomValidator1_ServerValidate(object source, ServerValidateEventArgs args){
  
string s = args.Value;
  
byte[] sarr = System.Text.Encoding.Default.GetBytes(s);
  
int len = sarr.Length;//will output as 3+2*2=7
  if (len < 4 || len > 20)
  args.IsValid 
= false;
}

相关文章:

  • 2022-12-23
  • 2021-06-24
  • 2021-07-07
  • 2022-12-23
  • 2022-12-23
  • 2022-01-04
  • 2021-10-19
猜你喜欢
  • 2021-12-27
  • 2022-01-05
  • 2022-12-23
  • 2022-12-23
  • 2022-01-05
  • 2022-12-23
相关资源
相似解决方案