hi
Please try the following code and let me knw
SqlConnection cn = new SqlConnection(ConfigurationManager.AppSettings
["urconfig"]);
cn.Open();
string query = "select count(emailid) as emailid from users
where emailid= '" + txtEmail.Text + "'";
SqlCommand cmd = new SqlCommand(query, cn);
string iemail = cmd.ExecuteScalar().ToString();
cn.Close();
if (iemail == "0")
{
Label1.Visible = true;
Label1.Text = "Email id already exist.";
}
else
{
Label1.Visible = true;
Label1.Text = "Not Available";
}
On Jan 29, 6:51 pm, HelloWorld <[email protected]> wrote:
> Hello World...!!!
>
> I need to create a login page consisting of just 2 text boxes(username
> and password) and a login button. I am required not to use the
> available Login Control from the toolbox. Also, I just need to create
> a login page, considering that the user is already registered and the
> username and password is already stored in the sql server database.
> There is no need of creating a signup page for new users as it is not
> required. I guess, Cookies or Session coding is required for this
> task.
> Plz help mw out.
>
> Thanx :)