June 13, 2009 at 4:46 am
public partial class Default2 : System.Web.UI.Page
{
SqlConnection cn = new SqlConnection("Persist Security Info=False;User ID=sa;Initial Catalog=Sms;data source=WINDOWS-8D8C34A;password=sqlserver ");
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button2_Click(object sender, EventArgs e)
{
Response.Redirect("register.aspx");
}
protected void LinkButton1_Click(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
SqlCommand cmd = new SqlCommand("select Login from Register Where Mobile NO='"+TextBox1.Text+"' and Password='"+TextBox2.Text+"'",cn );
cn.Open();
SqlDataReader dr = cmd.ExecuteReader();
if (dr.Read())
{
Response.Redirect("send sms.aspx");
}
}
}
source code:
Editor's Note: Removed source code and moved to an attachment.
June 13, 2009 at 5:02 am
Which line of code's throwing the error and what's the complete error message?
p.s. SA login and a simple password? I hope that's not what your system's actually using....
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply