im trying to delete multiple records with checkboxes in datagrid but im getting an error
ie
Object reference not set to an instance of an object
at line
dgids = CType(i.FindControl("id"), Label).ToString()
here is my sample code
Dim bxschked As Boolean
Dim i As DataGridItem
Dim dgids As String = ""
For Each i In dg3.Items
Dim delchkitm As CheckBox
delchkitm = CType(i.FindControl("chkdel"), CheckBox)
If (delchkitm.Checked) Then
bxschked = True
dgids = CType(i.Cells(0).FindControl("id"), Label).ToString()
End If
Next
plz help me out ,im new to asp.net
thanks in advance
hemant
Abhimanyu K VatsaPosted Aug 5, 2010, 4:02 AM
but tell me one thing
are u using some database. it would be perfect if you upload you zipped project here.
gud luck