I realize I did not fully think this through ~~ I'm guesing
that it's simpler that I thought and that JavaScript is not necessary.
Since both buttons are in the same form,
the browser will indicate which button was clicked, n'est-ce pas?
The <% using (Html.BeginForm()) {%>
.
.
.
<% } %>
will send everything back to
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Create([Bind(Exclude = "Id")] Movie movieToCreate)
and vinothkumarsi need only decide whether the
<input type="submit" value="Create" />
or
<input type="submit" value="CreateClassicMovie" />
was clicked.
That way, one need not worry about JavaScript being enabled.
Regards,
Gerry (Lowry)
B-) Please help me by completing my school survey about computer programmers on my website. Thank you!!! Gerry Lowry +1 705-429-7550 wasaga beach, ontario, canada
gerrylowry
All-Star
20513 Points
5712 Posts
Re: submit Button In Mvc
Apr 27, 2009 06:04 PM|LINK
Hi Jacques,
I realize I did not fully think this through ~~ I'm guesing
that it's simpler that I thought and that JavaScript is not necessary.
Since both buttons are in the same form,
the browser will indicate which button was clicked, n'est-ce pas?
The <% using (Html.BeginForm()) {%>
.
.
.
<% } %>
will send everything back to
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Create([Bind(Exclude = "Id")] Movie movieToCreate)
and vinothkumarsi need only decide whether the
<input type="submit" value="Create" />
or
<input type="submit" value="CreateClassicMovie" />
was clicked.
That way, one need not worry about JavaScript being enabled.
Regards,
Gerry (Lowry)