hi here i have a block with 2 views, i want to display view depend on situation.
so i just folled this article.block with partial view
so here my block is inherited from siteblockdata.
here is my code.
public override ActionResult Index(BlockData blockData)
{
var viewName = string.Empty;
JobSearch js = new JobSearch();
if (blockData == js)
{
viewName = "promo";
}
//return PartialView(string.Format("{0}{1}.cshtml", PARTIAL_VIEW_DIRECTORY, viewName));
return null;
}
am getting block data is null.