how a parameters collection picks its @parameters from a simple string ? hwo it differentiate btw them ?
e.g.
String com1 = "select email, pwd from login where email=@email and pwd=@pwd";
SqlCommand sqlcom1 = new SqlCommand(com1,con1);
sqlcom1.Parameters.AddWithValue("@email",txtboxEmail.Text);
sqlcom1.Parameters.AddWithValue("@pwd", txtboxPwd.Text);
now email=@email and pwd=@pwd; so how 'sqlcom1.parameters.addwithvalue' knows and selects its parameters from a simple query ? why don't it takes this string a continous simple text ?
Go to the complete details ...