Hi,
I am trying to update 3 individual fields from a row in my database using LINQ. I have to enter a student id when the page runs then this matches their record in the database and populates the gridview with the 3 fields that i want to edit. Is their any way to do this? So far i have this,
Any help much appreciated.
Thanks,
Michael
I am trying to update 3 individual fields from a row in my database using LINQ. I have to enter a student id when the page runs then this matches their record in the database and populates the gridview with the 3 fields that i want to edit. Is their any way to do this? So far i have this,
Code:
Protected Sub SubBtn_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles SubBtn.Click Dim number = txtStudentID.Text Dim db As New OrionDataClassesDataContext() Dim match = From u In db.Users Where u.User_Number = number Select u.Contact_number, u.Home_address, u.Term_address GridView1.DataSource = match GridView1.DataBind() End Sub
Thanks,
Michael
Comment