コード例 #1
0
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        DateTime dat = (DateTime.Now);

        try
        {
            m.CreateUser(txtname.Text, txtuser.Text, txtpass.Text, txtmail.Text, dat, true);
            Label4.Text = "Congratulations , Registration Complete";
            //Label4.ForeColor = "Green";
            Label4.Visible = true;
        }
        catch (Exception ex)
        {
            Label4.Text    = "Username/Email Already Exists";
            Label4.Visible = true;
        }

        txtname.Text    = "";
        txtuser.Text    = "";
        txtpass.Text    = "";
        txtmail.Text    = "";
        txtconfirm.Text = "";
    }