post to actionrequest from an anchor
Posted
by griegs
on Stack Overflow
See other posts from Stack Overflow
or by griegs
Published on 2010-04-15T01:00:35Z
Indexed on
2010/04/15
1:03 UTC
Read the original article
Hit count: 389
asp.net-mvc
|postback
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.
© Stack Overflow or respective owner