error indexoutofrangeexception

rjhe22

Well-known member
Joined
May 22, 2008
Messages
88
Programming Experience
Beginner
Hi
i am having a problem with the following code keep getting an error.
here is the code
VB.NET:
Dim lck As New CIMALock.clsLock 
            Dim rowC As DataRow = CType(Me.txtMailKey.DataBindings(0).BindingManagerBase.Current, DataRowView).Row 
            rowC.Item("MailKey") = lck.Encrypt(Me.txtMailKey.Text)

and th error that comes up is
Index -1 does not have a value. or indexoutofrangeexception was unhandled

can anyone help
 
anyone able to help. i know it happens at this line
Dim rowC As DataRow = CType(Me.txtMailKey.DataBindings(0).BindingManagerBase.Current, DataRowView).Row
i have looked at the colums and they seem to be all spelled right
 
Back
Top