textbox value remains unchanged on form submission in edit profile page
<p>i am trying to create a edit profile page so when the page loads first i am filling all text boxes values as the value present in the database for the particular user.i am doing this using the code:</p>

<pre><code>        DBconn obj1 = new DBconn();
        String sql1 = "select* from users where user_id='" + Session["user_id"].ToString() + "'";
        DataTable dt = new DataTable();
        dt = obj1.getdatatable(sql1);
        if (dt.Rows.Count &gt; 0)
        {
            referal_id.Text = dt.Rows[0]["referal_id"].ToString();
            name.Text = dt.Rows[0]["name"].ToString();
            password.Text = dt.Rows[0]["password"].ToString();
            email.Text = dt.Rows[0]["email"].ToString();
            mobile.Text = dt.Rows[0]["mobile"].ToString();
            city.Text = dt.Rows[0]["city"].ToString();
            state.Text = dt.Rows[0]["state"].ToString();
            pincode.Text = dt.Rows[0]["pincode"].ToString();
            sec_ques.Text = dt.Rows[0]["securityq"].ToString();
            answer.Text = dt.Rows[0]["answer"].ToString();
            age.Text = dt.Rows[0]["age"].ToString();
            gender.Text = dt.Rows[0]["gender"].ToString();
            user_id.Text = dt.Rows[0]["user_id"].ToString();
            address.Text = dt.Rows[0]["address"].ToString();
            date_of_joining.Text = dt.Rows[0]["date_of_joining"].ToString();
            user_type.Text = dt.Rows[0]["user_type"].ToString();
        }
</code></pre>

<p>now this is filling all the text boxes with the values .
when user edits some values in some textbox and resubmits the form the database is getting updated implementing the code:</p>

<pre><code>protected void LinkButton1_Click(object sender, EventArgs e)
{
    int i;
    DBconn obj2 = new DBconn();
    String sql2 = "update users set name='"+name.Text+"',address='"+address.Text+"',age='"+age.Text+"',gender='"+gender.Text+"',email='"+email.Text+"',mobile='"+mobile.Text+"',securityq='"+sec_ques.Text+"',answer='"+answer.Text+"',city='"+city.Text+"',state='"+state.Text+"',pincode='"+pincode.Text+"' where user_id='"+Session["user_id"].ToString()+"'";
    i = obj2.executeDML(sql2);
    if (i &gt; 0)
    {
        Label1.Visible = true;
        Image2.Visible = true;
        Label1.Text = "Updated successfully!";

    }
    else
    {
        Label1.Visible = true;

        Label1.Text = "Oops Update was unsuccessfull!";
    }

}
</code></pre>

<p>the problem is the database is getting updated with the previous values which was already present in the database.when i used watchpoints i found the sql statement gets loaded with the textbox values which i binded using the above database code but its not fetching the values which the user edits.</p>

<p>plz help.</p>
