Before anything let me say that I tried to delete this post but I couldn't. The question looks dummy enough but I though there was something different about MVC on umbraco until I realize that after hours porting some code from the evil Dr. VB.NET to C#, I started writing:
ViewData("MyKey")
Which is the VB.NET syntax, Instead of:
ViewData["MyKey"]
And that's the reason for the message: The name 'ViewData' does not exist in the current context. Anyways, I don't think it's helpfull so to any moderators out there, feel free to delete this post.
How can I access ViewData() or TempData() from a view?
When working with a view today I tried to access a value from ViewData("myValue") and it just doesn't work.
I got an compilation error:
The name 'TempData' does not exist in the current context
So, how can I access it from a view or partial view on Umbraco (4.11.1)
Before anything let me say that I tried to delete this post but I couldn't.
The question looks dummy enough but I though there was something different about MVC on umbraco until I realize that after hours porting some code from the evil Dr. VB.NET to C#, I started writing:
Which is the VB.NET syntax, Instead of:
And that's the reason for the message: The name 'ViewData' does not exist in the current context.
Anyways, I don't think it's helpfull so to any moderators out there, feel free to delete this post.
is working on a reply...