Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ListViewDataItem provides new error message

7 views
Skip to first unread message

Sherif Grace

unread,
Apr 21, 2012, 8:09:06 AM4/21/12
to
I have been using this line of code for a while and suddenly it started to give this error. I obviously changed something that triggers this exception but cannot find it. Any help will be appreciated.

This method is used in the ObjectDataSource's 'inserted' event, it fires after successful insertion of the ListView's insert method in the Business Logic Layer.

The purpose is to grab the Subject and Remarks fields from the ListView to include in an auto email.


Protected Sub TicketMasterODS_Inserted(sender As Object, e As System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs) Handles TicketMasterODS.Inserted

'Instantiate the ListView object.
Dim dataItem As ListViewDataItem = CType(sender.Item, ListViewDataItem)

' Retrieve the underlying data item.
Dim rowView As DataRowView = CType(dataItem.DataItem, DataRowView)

'Grab the input fields
Dim rowSubject As String = rowView("Subject")
Dim rowRemarks As String = rowView("Remarks")

'Open smtp session and set email attributes
.....





Sherif Grace

unread,
Apr 21, 2012, 8:12:43 AM4/21/12
to
Sorry, I forgot to add the error in my original post.

The line where the ListView is instantiated
Dim dataItem As ListViewDataItem = CType(sender.Item, ListViewDataItem)


I receive this error message:
"MissingMemberException was unhandled by user code.
Public member 'Item' on type 'ObjectDataSourceView' not found."

Thanks


0 new messages