Skip to content

Gridview control for 2 page

sujay anand

Asked Jul 8, 2014, 10:50 PM EDT3 answers
Share
LinkedInX
As  I m using gridview controls in page1. Using sqldatasource I have got data from database in  page2. And I have used Delete and Select query. My problem is I cant update data in gridview as I am using gridview in page2.

3 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    On GridView you can use events like onrowupdating="<your function name>"

    write code for update function like below
    SqlCommand cmd = new SqlCommand("update Employee_Details set City='" + txtcity.Text +"',Designation='" + txtDesignation.Text + "' where UserId=" + userid, con);
    cmd.ExecuteNonQuery();
    0
  • 0
    As gridview is in page2, but I have inserted datas in page1. I dont know how to edit and update values of page1.
    0
  • 0
    Can u anyone say technique to update one webform1 value in another webform2 using grdview
    0