G
Guest
Have problem updating a web form.
Unfortunely when i edit one of the feilds and press the button, it loads the
old data back without any change !! I be happy if some one help me fix this
update problem.Thanks
I use the wizard for generating sqlconnection, sqladapter and dataset.
AutoPostBack is set to true for all fileds
EnableViewState is set to true for all fileds
Here is some code:
private void Page_Load(object sender, System.EventArgs e)
{
if (! IsPostBack)
{
sqlSelectCommand1.Parameters["@ID"].Value = Request.QueryString["id"];
sqlDataAdapter1.Fill(dataSet11);
TextBox1.DataBind();
....
}
private void Update_Click(object sender, System.EventArgs e)
{
sqlDataAdapter1.Update(dataSet11);
}
Unfortunely when i edit one of the feilds and press the button, it loads the
old data back without any change !! I be happy if some one help me fix this
update problem.Thanks
I use the wizard for generating sqlconnection, sqladapter and dataset.
AutoPostBack is set to true for all fileds
EnableViewState is set to true for all fileds
Here is some code:
private void Page_Load(object sender, System.EventArgs e)
{
if (! IsPostBack)
{
sqlSelectCommand1.Parameters["@ID"].Value = Request.QueryString["id"];
sqlDataAdapter1.Fill(dataSet11);
TextBox1.DataBind();
....
}
private void Update_Click(object sender, System.EventArgs e)
{
sqlDataAdapter1.Update(dataSet11);
}