【发布时间】:2014-04-17 05:22:16
【问题描述】:
Public Function GridView_RowUpdating(sender As Object, _
e As GridViewUpdateEventArgs) As Integer
Dim ID As Integer = GridView1.DataKeys(e.RowIndex).Value
Return ID
End Function
我需要 id(datakey) 来在另一个页面上编辑来自 myGridview 的数据。我该怎么做?
【问题讨论】:
-
您到底想做什么?问题不够清楚。
-
我想在单击gridview 中的更新链接时更新数据。我建立另一个网页来编辑数据
-
@user3534404:欢迎使用 StackOverflow。请花一些时间通过添加更多详细信息来编辑您的问题。添加诸如,您的确切要求是什么?到目前为止你做了什么?你被困在哪里?单击
GridViewRow中的编辑链接时,您是否尝试打开新的EditDetails 页面? -
尝试使用 request.querystring 并将您的密钥转移到编辑页面并检索有关数据进行编辑。
-
我想在单击gridview 中的更新链接时更新数据。我建立另一个网页来编辑数据 // 例如 Dim db as SampleEntity() Dim obj = db.tblCustomer.First(Function(x) x.ID = ID) obj.Customer = Customer.Text db.SaveChange() // Gridview 在 Webform1 上,Editpage 在 Webform 2 上