Click to See Complete Forum and Search --> : updating data in database


ujjwalmeshram
June 28th, 2008, 05:24 AM
hello all
I m new to asp.net. I m using .net 2.0
I am updating data in database, for that i changed data in controls of form such as text boxes and click On save Button but textbox1.text property does not showing changed text hence updation is not taking effect

protected void btnSave_Click(object sender, EventArgs e)
{
string fname = txtfname.Text;
string lname = txtlname.Text;
//method for update
updateData(fname,lname);
}

please help

bhushan1980
July 13th, 2008, 06:11 PM
Here it is...


....
....
public String fname;
public String lname;

protected void btnSave_Click(object sender, EventArgs e)
{
fname = txtfname.Text.ToString();
lname = txtlname.Text.ToString();
}


btw...what is this update method in your code? 2 lines are enough.

Regards,
Bhushan.