How to work with layouts in mvc4 mobile applicaiton?..
I am working with mvc4 mobile application but views with layouts are not working .could you please tell me how to do that?..
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Sasi ReddyRank #4,458 · 342 reputationPosted Jul 12, 2014, 2:53 AM EDT
I wrote layout like below,so it is working fine
In body tag i made some changes like below
@if (IsSectionDefined("Header"))
{
@RenderSection("Header")
@Html.ActionLink("Non-Farmer Details", "IndividualCustomerDetails", "CustomerBasicDetails")
@Html.ActionLink("Non-Farmer", "Create", "CustomerBasicDetails")
@Html.ActionLink("Logout", "Logout", "NormalRegistration")
}
else
{
@ViewBag.Title
@Html.ActionLink("Non-Farmer Details", "IndividualCustomerDetails", "CustomerBasicDetails")
@Html.ActionLink("Non-Farmer", "Create", "CustomerBasicDetails")
@Html.ActionLink("Logout", "Logout", "NormalRegistration")
}
@RenderSection("featured", false)
@RenderBody()
@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/jquerymobile")
@RenderSection("scripts", required: false)