okay so im new to database im still learning so my sql local database is working fine on my pc help needed.
to make it work i had to manually string it everytime
public partial class adminLogin : System.Web.UI.Page
{
SqlConnection con = new SqlConnection(@"Data Source=(LocalDB)\v11.0;AttachDbFilename=C:\UsersSuren\Documents\Visual Studio 2012\Projects\Shopee mobile\Shopee mobile\App_Data\shopping.mdf;Integrated Security=True");
int i;
protected void Page_Load(object sender, EventArgs e)
{
}
protected void b1_Click(object sender, EventArgs e)
{
con.Open();
SqlCommand cmd = con.CreateCommand();
cmd.CommandText = "select * from admin_login where username='"+t1.Text+"' and password='"+t2.Text+"'";
cmd.ExecuteNonQuery();
DataTable dt = new DataTable();