protected void OnSubmit(object sender, EventArgs ae)
{
string connnection = Convert.ToString(ConfigurationManager.ConnectionStrings["Connection"]);
SqlConnection con = new SqlConnection(connnection);
SqlCommand cmd = new SqlCommand("Sp_Updateusers", con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@Userinfo", SqlDbType.Structured).Value = Getusers();
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
public DataTable Getusers()
{
DataTable dt = new DataTable();
dt.Columns.Add("userId");
dt.Columns.Add("Username");
dt.Columns.Add("password");
dt.Columns.Add("role");
dt.Columns.Add("CreatedDate");
dt.Rows.Add(1, "Amit", "123456", "vice-admin", "2019-01-30");
dt.Rows.Add(2, "Mark", "123456", "vice-admin", "2019-01-30");
dt.Rows.Add(3, "Mairia", "123456", "Member", "2019-01-30");
return dt;
}