using System;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

using System.Text.RegularExpressions;
public partial class _Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    public bool validateName(string str)
    {
        return Regex.IsMatch(str, "^[\u4E00-\u9FA5]{0,}$");
    }

    protected void Button2_Click(object sender, EventArgs e)
    {
        TextBox1.Text = "";
        TextBox2.Text = "";
        TextBox3.Text = "";
        TextBox4.Text = "";
        TextBox5.Text = "";
        TextBox6.Text = "";
        TextBox7.Text = "";
        DropDownList1.Text = "";
        DropDownList2.Text = "";
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        if (!validateName(TextBox4 .Text ))
        {
            Response.Write("<script>alert('输入的真实姓名应该为汉字')</script>");
        }
        else
        {
            Response.Write("<script>alert('恭喜你，会员注册成功！')</script>");
        }
    }
}
