为什么datagrid绑定的时候。我获得的值为空!!!
为什么datagrid绑定的时候。我获得的值为空, 这个值在数据库中是自增的主健
<asp:BoundColumn Visible="True" DataField="dnsid" HeaderText="dnsid"></asp:BoundColumn>
后台程序:
Dim t0 As TextBox
t0 = CType(e.Item.Cells(0).Controls(0), TextBox)
Dim id As Integer = CInt(t0.Text)
Dim sql As String = "update dns set content='" & t1.Text & "' where dnsid='" & id & "'"
Dim mycom As New SqlCommand(sql, myconn.conn)