It is similar to "von v"'s answer, but I think the error of "Nullable object must have a value." can be from IndustryId since is nullable, so it is good to check for that first:
<p>
<strong>Industry Type:</strong>
<%:if(Model.IndustryId.HasValue)
{
var idustry = Model.GetIndustry(Model.IndustryId.Value);
if(industry!= null)
industry.Name
}
else
{
""
}
%>
</p>
In my view it is good to do this
Model.GetIndustry()
in Back end, like controller, and then return the industry by viewstate, like checking in the:
string industryName = "";
if(Industry.IndustryId.HasValue){
var industry = YourClass.GetIndustry(Industry.IndustryId.Value);
industryName = industry!= null ? Industry.Name : "" ;
}
ViewBag.IndustryName= industryName;
and then use your ViewBag in view like this:
<p>
<strong>Industry Type:</strong>
<%: ViewBag.IndustryName %>
</p>
It is good to separate the checking from view and do the logics in code.
Hope it helps.