post to actionrequest from an anchor
- by griegs
I have the following;
<% using(Html.BeginForm("GetRecommendedProducts", "Home", FormMethod.Post)) { %>
<% Html.RenderPartial("QuickQuote", Model.quickQuote); %>
<div class="But brown" style="float:left;">
<a href="." onclick="$.unblockUI(); return false;">Close</a>
</div>
<div class="But green" style="">
<a href="." onclick="this.form.submit(); return false;">Go</a>
</div>
<%} %>
When I click the anchor I do not get a post to my action. I know this should be possible so what am I doing wrong?
The partial view only contains fields and not another BeginForm or anything like that.
If I use a submit button it works ok but I can't use a submit button I need to use an anchor.