I am developing a simple MVC application.
I have main view, partial view and controller.
This is my main View
@model partitalViewTest.Models.Qset
@{
}
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>Question</title>
</head>
<body>
<div class="transbox" style="height:inherit;">
@Html.Partial("CheckAnswer",Model.partialModel)
</div>
</body>
</html>
This is my Partial View :
@model IEnumerable<partitalViewTest.Models.Qset>
@{
Layout = null;
}
<h2> </h2>
@foreach (var item in Model)
{
@item.currpos;
}
@* <input type="button" title="Delete" value="@item.qstuinList[item.currpos].AnsC ;" onclick="changeBtn(this); location.href='@Url.Action("CheckAnswer", "RazerQuestion", new { id = 'A' }) '" />*@
<input id="Button1" type="button" value="button" onclick="location.href='@Url.Action("CheckAnswer", "RazerQuestion", new { id = 'A' }) '" />
This is my controller :
public ActionResult CheckAnswer()
{
// Some Code
return PartialView(qustinb.partialModel);
}
This is working fine but my question is Partial View returns without wrapping the main view.
Please help me to solve this problem.