I yesterday started working on my first .NET c# MVC project. Now I receive a null reference when i try to POST but before that when i try to read from that same value it works fine. What I mean is that when the page loads, it loads the value correctly, but when i press the submit button it throws the exception .
@model QnA_WebApp_MVC.Models.Block
@{
Block block = (Block)@TempData["block"];
}
<h5>User: @block.user_id</h5>
And the thing is that the block.user_id is not even among the posted values.