Episerver Property Is Always Null

This post is a short and simple one to try and prevent people wasting precious time trying to figure out why your Episerver property is always returning null. Episerver_propert_is_null When you start to create properties on your pages and blocks, it's easy to miss keywords or attributes when you're typing in a new property.  If you are trying to run your Episerver project and no matter what you try in the editor, your Episerver property is always null and whenever you try and run your project you receive an object reference not set error when you try and display it, go to your property definition in your page of block and double check that you have all the required property definitions specified A very common scenario is forgetting to add the 'virtual' keyword off the property deceleration: missing_virtual_on_a_property Simply adding the keyword back to the property allows Episerver to populate it with the data entered via the editor as expected and the property will have the data you need.

submit to reddit

Jon D Jones

Software Architect, Programmer and Technologist Jon Jones is founder and CEO of London-based tech firm Digital Prompt. He has been working in the field for nearly a decade, specializing in new technologies and technical solution research in the web business. A passionate blogger by heart , speaker & consultant from England.. always on the hunt for the next challenge

Back to top