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?..
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sasi ReddyPosted Jul 12, 2014, 6:53 AM
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)