I m a tad stuck trying to get a List to load from the ViewState using ASP.NET 4 and VB.NET. When I try to retrieve a collection using:
Public Property ItemsForImport As List(Of ImportItem)
Get
Return IIf(ViewState("ItemsForImport") Is Nothing, New List(Of ImportItem), CType(ViewState("ItemsForImport"), List(Of ImportItem)))
End Get
Set(value As List(Of ImportItem))
ViewState("ItemsForImport") = value
End Set
End Property
我例外:
[A]System.Collections.Generic.List`1[ImportItem] cannot be cast to [B]System.Collections.Generic.List`1[ImportItem].
Type A originates from mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 in the context LoadNeither at location C:WindowsMicrosoft.NetassemblyGAC_32mscorlibv4.0_4.0.0.0__b77a5c561934e089mscorlib.dll .
Type B originates from mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 in the context LoadNeither at location C:WindowsMicrosoft.NetassemblyGAC_32mscorlibv4.0_4.0.0.0__b77a5c561934e089mscorlib.dll .
偷窃表明,收集工作没有结果,有2个项目。 这一类别仅作一次界定,我从C:Coricrosoft.NETFrameworkv4.0.30319中清理了我的临时档案。 临时伙伴关系网文件
总的来说,我有时看到(我假定每个人都会这样做)在进行快速变化的同时进行分解,但经过了两次复习。 是否有人失踪?