Exemple #1
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            DataConnection.ConnectionObject objct = new DataConnection.ConnectionObject();

            if (!txtId.Text.Equals("") && !txtEmail.Text.Equals("") && !txtNo.Text.Equals("") && !txtMsg.Text.Equals(""))
            {
                objct.AddDelUpdate("insert into Message values('" + txtId.Text + "','" + txtEmail.Text + "','" + txtNo.Text + "','" + txtMsg.Text + "')");
                result.InnerHtml = "We Will COntact you SOon ";
                txtId.Text       = "";
                txtEmail.Text    = "";
                txtMsg.Text      = "";
                txtNo.Text       = "";
            }
            else
            {
                result.InnerHtml = "fill all details to ENter ";
            }
        }
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            DataConnection.ConnectionObject objct = new DataConnection.ConnectionObject();

            if (!txtId.Text.ToString().Equals("") && !txtPassword.Text.ToString().Equals(""))
            {
                DataTable tbl = new DataTable();
                tbl = objct.SearchRecord("select * from Admin where AdminID='" + txtId.Text + "' and AdminPassword='******'");
                if (tbl.Rows.Count > 0)
                {
                    Response.Redirect("Pannel.aspx");
                }
                else
                {
                    result.InnerHtml = "CHeck User Name  or Password";
                }
            }
            else
            {
                result.InnerHtml = "Fill User Name or Password";
            }
        }