Hi.
I was wondering if it is possible to conditionaly render a MasterPageFile reference in DW.
This is what I am looking to do.
@{
string ajaxRequest = System.Web.HttpContext.Current.Request.QueryString["ajax"];
}
@if (ajaxRequest == "true"){
@MasterPageFile("Master/Empty.cshtml")
}
else{
@MasterPageFile("Master/MasterPage.cshtml")
}
But in this case both master templates are rendered.
Best Regards,
Snævar