protected void btnStatus_Click(object sender, EventArgs e) { string sqlQry = "insert into tblcomment(username,date,status) values('" + Request.QueryString[0] + "','" + DateTime.Now.ToString("yyyyMMdd hh:mm:ss") + "','" + txtcommand.Text + "')"; dm.getupdate(sqlQry); fillrpt(); txtcommand.Text = ""; }
protected void btnReg_Click(object sender, EventArgs e) { string sqlqry = "select * from tblUser where userName='******'"; DataSet ds = new DataSet(); ds = dm.GetData(sqlqry); if (ds.Tables[0].Rows.Count > 0) { Label1.Text = "User Name is already exist...!"; } else if (txtconfrm.Text != txtPassword.Text) { Label1.Text = "Password mismatch...!"; } else { sqlqry = "insert into tblUser(userName,Passwo)" + " values('" + txtInput.Text + "','" + txtconfrm.Text + "')"; int i = dm.getupdate(sqlqry); if (i > 0) { Response.Redirect("~/Login.aspx"); } else { Label1.Text = "Register Faild"; } } }