DetailsView - Index out of range error ...

A

Annie

Hi guys,

I am trying the get the values of DetailsView controls once the user Clicks
the Update button ..
I do as below:

Protected Sub dvCustomers_ItemUpdating(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DetailsViewUpdateEventArgs) Handles
dvCustomers.ItemUpdating

Try

''MsgBox(e.OldValues.Item(0)) '''this doesn't work

MsgBox(e.NewValues.Item(0))

Catch ex As Exception

MsgBox(ex.Message)

End Try

End Sub



But it raises, the Index out of rage ... Even I tried 1 etc but non of them
works.

What is wrong here?

thx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top