Click here to Skip to main content
15,912,329 members

Comments by Member 12599631 (Top 12 by date)

Member 12599631 4-Sep-16 10:58am View    
local IIS Express how to settings ...
Member 12599631 30-Aug-16 5:27am View    
thanks
Member 12599631 30-Aug-16 5:20am View    
Thanks so much
Member 12599631 30-Aug-16 4:25am View    
string name = txtname.Text;

string country = txtcountry.Text;
string constr = ConfigurationManager.ConnectionStrings["constr"].ConnectionString;
using (SqlConnection con = new SqlConnection(constr))
{
using (SqlCommand cmd = new SqlCommand("sp_customers_Add"))
{
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@Action", "INSERT");
cmd.Parameters.AddWithValue("@Name", name);
cmd.Parameters.AddWithValue("@Country", country);
cmd.Connection = con;
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
}
this.BindGrid();

i give the identity(1,1) for customerid in database
Member 12599631 30-Aug-16 4:22am View    
string name = txtname.Text;

string country = txtcountry.Text;
string constr = ConfigurationManager.ConnectionStrings["constr"].ConnectionString;
using (SqlConnection con = new SqlConnection(constr))
{
using (SqlCommand cmd = new SqlCommand("sp_customers_Add"))
{
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@Action", "INSERT");
cmd.Parameters.AddWithValue("@Name", name);
cmd.Parameters.AddWithValue("@Country", country);
cmd.Connection = con;
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
}
this.BindGrid();