Hi There, May be I am getting the whole idea wrong but this is what I am facing as a horrible problem at this point. In my application (MVC2, ASP.NET) I have something like following :
<%using (Html.BeginForm("ProcessOrder", "ShoppingCart", FormMethod.Post, new { @name="processorder"}))
{ %>
other html codes. [typically a cart item list]
<%Html.RenderPartial("ProcessOrderPartial", Model); %>
<%} %>
<a href="#" onclick="document.forms[0].submit();">
<img id="Img2" runat="server" src="~/App_Themes/DefaultTheme/images/btn_purchase_tickets.gif" width="149" height="25" />
</a>
Then in my controller I have defined my action like below:
[HttpPost]
public ActionResult ProcessOrder(HK7Mvc.Models.ShoppingCartViewModel dataModel)
{
if (ModelState.IsValid)
{
ok everything looks good. now process the order.
return Redirect("~/ShoppingCart");
}
return PartialView("ProcessOrderPartial",dataModel);
}
The prolem is: When partial view is working file with validation but the other html content of my page is not showing [the cart item list, page header logo, and other static/dynamic html bla bla].
How/why is this happening ? My understanding was partial view will only render the .ascx and simply put/write that where i have called it.
Please help. thanks in advance.