Reputation: 467
Using the following code I get Identifier expected
and Property access must assign property or use its value
errors:
ViewState["SomeKeyValue"] What is wrong with this code?
Upvotes: 0
Views: 1690
Reputation: 24236
I think ViewState["SomeKeyValue"]
should be ViewState("SomeKeyValue")
Square brackets would be used for c# vb uses ()
.
Upvotes: 2
Reputation: 887449
VB.Net uses ()
instead of []
for indexers:
ViewState("SomeKey") = ...
Upvotes: 2