Cast ListDictionary

S

SK

Hello,

I am trying to convert an object to a ListDictionary,
but I get always the error: Specified cast is not valid.
Here is my code:

Private Property StoredProcedureParams() As ListDictionary
Get
Dim o As Object = ViewState("StoredProcedure")
If o Is Nothing Then
Return Nothing
Else
Return CType(o, ListDictionary)
End If
End Get
Set(ByVal Value As ListDictionary)
ViewState("StoredProcedureParams") = Value
End Set
End Property
 
P

Peter Rilling

First of all, you viewstate key names are not the same. Does this matter in
your context?
 

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

Top