Exemple #1
0
 protected void TextBox1_TextChanged(object sender, EventArgs e)
 {
     string[] chars = new string[] { "!", "@", "#", "%", "$", "^", "&", "*", "(", ")", "-", "=", "+", "~", @"<", ">", "{", "}", "\"", "?", "/", @"\" };
     foreach (string str in chars)
     {
         if (TextBox1.Text.Contains(str))
         {
             TextBox1.Text = "Test";
             BaseDo.show(this, "Title 包含非法字符");
         }
     }
 }
Exemple #2
0
 protected void Button2_Click(object sender, EventArgs e)
 {
     if (TextBox1.Text.Length <= 0 || TextBox1.Text.Length > 4)
     {
         BaseDo.show(this, "Key 操作码格式不正确");
         WebFileCommunitySystem.SiteMaster.passjs = "1";
     }
     else if (TextBox1.Text == "3520")
     {
         WebFileCommunitySystem.SiteMaster.passjs = "0";
     }
     else
     {
         BaseDo.show(this, "Key 操作码不正确");
         WebFileCommunitySystem.SiteMaster.passjs = "1";
     }
 }