私の質問は単純かもしれませんし、私はこれに慣れていないかもしれません. 「System.Data.DataRowView」と入力します。
エラー行は
Dim row As System.Data.DataRowView = DirectCast(e.Item.DataItem, System.Data.DataRowView)
どんな助けでも、事前に感謝します
コードスニペット
Protected Sub AutoPublishList_ItemDataBound(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.RepeaterItemEventArgs) Handles AutoPublishList.ItemDataBound
If e.Item.ItemType = ListItemType.AlternatingItem OrElse e.Item.ItemType = ListItemType.Item Then
Try
Dim row As System.Data.DataRowView = DirectCast(e.Item.DataItem, System.Data.DataRowView)
Dim pageID As Literal = DirectCast(e.Item.FindControl("PageID"), Literal)
If Convert.ToInt32(row("PageID")) = Business.Objects.Constants.A Then
pageID.Text = "Dummy A"
End If
If Convert.ToInt32(row("PageID")) = Business.Objects.Constants.B Then
pageID.Text = "Dummy B"
End If
Catch ex As Exception
AddErrInfo(ex)
ErrHandler(ex)
End Try
End If
End Sub