I have a question for a behaviour that I don't understand. I have added some data annotation to my PartialClass, and created a partial view for it. All works as expected if I use
@Html.Partial("_partial", new PartialClass())
On my View. The problem is that if I try to get the same partial view from my controller, using
public ActionResult GetNew()
{
return PartialView("_partial", new PartialClass());
}
I don't get the same results, because the HTML that is render is different. Don't have any validation tags.
Can anyone help me to understand and to get the same HTML from my PartialView in my controller?