I have a custom class MyCustomType. In that class I have a property MyCustomProperty of type bool and another property MyCustomProperty1 of type bool also.
I need to check if MyCustomProperty is true in my View. I`m doing the following thing:
<%if ( TempData[ViewDataConstants.MyCustomTypeKey] != null && ((MyCustomType)TempData[ViewDataConstants.MyCustomTypeKey]).MyCustomProperty %>show some custom content.
But for some reason when Im running it I see error message that MyCustomTYpe could not be found are you missing an assembly reference bla-bla-bla. MyCustomType is in my controller it
s public and to check I even added a reference to the view. But it keep saying that there`s no MyCustomType class. What am I doing wrong?
Interesting, for some reason when I moved it to Common from Controllers namespace it suddenly worked. Still dont see why its not working while in Controllers namespace. Both namespaces were included explicitly in the view.