<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Andrey Shchekin's Blog - Latest Comments</title><link xmlns="http://www.w3.org/2005/Atom" rel="http://api.friendfeed.com/2008/03#sup" href="http://disqus.com/sup/all.sup#forumcomments-4801441f" type="application/json"/><link>http://ashmind.disqus.com/</link><description></description><atom:link href="http://ashmind.disqus.com/comments.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Wed, 02 May 2012 09:30:59 -0000</lastBuildDate><item><title>Re: DI Framework Challenges, 2: Lists</title><link>http://blog.ashmind.com/index.php/2008/06/26/di-framework-challenges-2-lists/#comment-516654548</link><description>&lt;p&gt;Old post... :)&lt;/p&gt;

&lt;p&gt;But StructureMap can easily handle such lists!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">janus007</dc:creator><pubDate>Wed, 02 May 2012 09:30:59 -0000</pubDate></item><item><title>Re: Multiple submit buttons with ASP.NET MVC: final solution</title><link>http://blog.ashmind.com/index.php/2010/03/15/multiple-submit-buttons-with-asp-net-mvc-final-solution/#comment-488665207</link><description>&lt;p&gt; This one is good :)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Lenkowski Andrzej</dc:creator><pubDate>Fri, 06 Apr 2012 06:53:29 -0000</pubDate></item><item><title>Re: Multiple submit buttons with ASP.NET MVC: final solution</title><link>http://blog.ashmind.com/index.php/2010/03/15/multiple-submit-buttons-with-asp-net-mvc-final-solution/#comment-487304210</link><description>&lt;p&gt;=== MY SOLUTION ==&lt;/p&gt;

&lt;p&gt;&amp;lt;input type="submit" value="Standard action"&amp;gt;&amp;lt;input data-action="@Url.Action(" mysecondaction")"="" type="submit" value="Second action"&amp;gt;&lt;/p&gt;

&lt;p&gt;== JavaScript (jQuery): ==&lt;/p&gt;

&lt;p&gt;    $('form input[data-action]').click(function () {        this.form.action = $(this).data('action');    });&lt;/p&gt;

&lt;p&gt;===&lt;/p&gt;

&lt;p&gt;And that's it.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Krzysztof Jeske</dc:creator><pubDate>Thu, 05 Apr 2012 10:36:19 -0000</pubDate></item><item><title>Re: Multiple submit buttons with ASP.NET MVC: final solution</title><link>http://blog.ashmind.com/index.php/2010/03/15/multiple-submit-buttons-with-asp-net-mvc-final-solution/#comment-485131135</link><description>&lt;p&gt;Do you have any other inputs named login or register in your form?&lt;br&gt;(one example might be user name textbox called "login")&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Andrey Shchekin</dc:creator><pubDate>Tue, 03 Apr 2012 21:04:56 -0000</pubDate></item><item><title>Re: Multiple submit buttons with ASP.NET MVC: final solution</title><link>http://blog.ashmind.com/index.php/2010/03/15/multiple-submit-buttons-with-asp-net-mvc-final-solution/#comment-484606476</link><description>&lt;p&gt;&lt;br&gt;1.) public ActionResult Login(LoginModel viewModel, string returnUrl)public ActionResult Register(LoginModel viewModel)&lt;/p&gt;

&lt;p&gt;2.)&lt;br&gt;&amp;lt;input name="login" type="submit" value="Login"&amp;gt;&lt;br&gt;&amp;lt;input name="register" value="Register"  type="submit"&amp;gt; &lt;br&gt;3)&lt;br&gt;@using (Html.BeginForm("Action", "Secure")) &lt;/p&gt;

&lt;p&gt;Thanks for your help.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Junk</dc:creator><pubDate>Tue, 03 Apr 2012 10:39:19 -0000</pubDate></item><item><title>Re: Multiple submit buttons with ASP.NET MVC: final solution</title><link>http://blog.ashmind.com/index.php/2010/03/15/multiple-submit-buttons-with-asp-net-mvc-final-solution/#comment-484018149</link><description>&lt;p&gt;What are the&lt;br&gt;1. Names of actions&lt;br&gt;2. Names of buttons&lt;br&gt;3. Name of action in Html.BeginForm?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Andrey Shchekin</dc:creator><pubDate>Mon, 02 Apr 2012 21:26:29 -0000</pubDate></item><item><title>Re: Multiple submit buttons with ASP.NET MVC: final solution</title><link>http://blog.ashmind.com/index.php/2010/03/15/multiple-submit-buttons-with-asp-net-mvc-final-solution/#comment-483947557</link><description>&lt;p&gt;I am getting &lt;br&gt;The current request for action 'Action' on controller type 'MyController' is ambiguous between the following action methods:  and it lists my two actions. &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Junk</dc:creator><pubDate>Mon, 02 Apr 2012 19:20:30 -0000</pubDate></item><item><title>Re: NMock 3.5</title><link>http://blog.ashmind.com/index.php/2007/09/23/nmock-35/#comment-463255866</link><description>&lt;p&gt;Hi Andrey,&lt;/p&gt;

&lt;p&gt;Really Great stuff. Can you share the code please. Email : vikram30capri@gmail.com&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Vikram30capri</dc:creator><pubDate>Mon, 12 Mar 2012 07:21:01 -0000</pubDate></item><item><title>Re: Multiple submit buttons with ASP.NET MVC: final solution</title><link>http://blog.ashmind.com/index.php/2010/03/15/multiple-submit-buttons-with-asp-net-mvc-final-solution/#comment-458592974</link><description>&lt;p&gt; There are two drawbacks to this implementation: 1) when the form is posted, the URL changes; and 2) the executing action must explicitly specify the view name.  I have written a blog post demonstrating how to avoid these issues:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://stevenbey.com/archive/2012/02/18/enable-multiple-submit-buttons-in-asp-net-mvc.aspx" rel="nofollow"&gt;http://stevenbey.com/archive/2...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Steven Bey</dc:creator><pubDate>Wed, 07 Mar 2012 06:18:55 -0000</pubDate></item><item><title>Re: Multiple submit buttons with ASP.NET MVC: final solution</title><link>http://blog.ashmind.com/index.php/2010/03/15/multiple-submit-buttons-with-asp-net-mvc-final-solution/#comment-431720726</link><description>&lt;p&gt;Strange, I'll try this a bit later.&lt;br&gt;I tried my method with parameters before and it worked.&lt;/p&gt;

&lt;p&gt;However, does it fail if id is not specified in the route?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Raj</dc:creator><pubDate>Tue, 07 Feb 2012 04:08:12 -0000</pubDate></item><item><title>Re: Multiple submit buttons with ASP.NET MVC: final solution</title><link>http://blog.ashmind.com/index.php/2010/03/15/multiple-submit-buttons-with-asp-net-mvc-final-solution/#comment-426738916</link><description>&lt;p&gt;After working with another developer on my team we solved our issue. For us, instead of using BeginForm("Action","Post") we needed to specify our actual controller: BeginForm("Action","ActualControllerNameHere") and this worked. &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jared Ross</dc:creator><pubDate>Wed, 01 Feb 2012 18:24:00 -0000</pubDate></item><item><title>Re: Multiple submit buttons with ASP.NET MVC: final solution</title><link>http://blog.ashmind.com/index.php/2010/03/15/multiple-submit-buttons-with-asp-net-mvc-final-solution/#comment-426679755</link><description>&lt;p&gt;Would anyone be willing to share some code related to how they're registering routes in their Global.asax.cs? I've been attempting to utilize the code in this post (beautifully written, btw) however I'm struggling to get it working correctly. When I run the given code I receive an error because it attempts to find the controller "Post" and the action "Action". So based on my MapRoute it's trying to go to Post.aspx/Action which does not exist. &lt;/p&gt;

&lt;p&gt;I also tried removing BeginForm("Action","Post") and instead stuck with simply BeginForm(). This almost appears to work, it enters the overridden IsValidName method but the actionName does not match my button, instead it matches my page.&lt;br&gt;Any thoughts or help would be appreciated. I believe we're using MVC v2.0.50727&lt;/p&gt;

&lt;p&gt;Thank you,&lt;br&gt;Jared&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jared Ross</dc:creator><pubDate>Wed, 01 Feb 2012 17:20:36 -0000</pubDate></item><item><title>Re: Comparing .NET DI (IoC) Frameworks, Part 1</title><link>http://blog.ashmind.com/index.php/2008/08/19/comparing-net-di-ioc-frameworks-part-1/#comment-396428120</link><description>&lt;p&gt;Simple Injector is missing from the comparison. There's a answer on Stackoverflow that uses this article's feature list, to compare Simple Injector: &lt;a href="http://stackoverflow.com/a/8190700/264697" rel="nofollow"&gt;http://stackoverflow.com/a/819...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Steven</dc:creator><pubDate>Thu, 29 Dec 2011 07:38:49 -0000</pubDate></item><item><title>Re: Multiple submit buttons with ASP.NET MVC: final solution</title><link>http://blog.ashmind.com/index.php/2010/03/15/multiple-submit-buttons-with-asp-net-mvc-final-solution/#comment-376206962</link><description>&lt;p&gt;For anyone curious, I had a similar issue and the problem was in my Action.  I was using return View(model), so the server was looking for an "Action" view which really does not exist. The simple fix is to specifiy the view in the return:  return View("Edit", model).&lt;/p&gt;

&lt;p&gt;Thanks for this solution.  It has helped make a very nice Edit/Preview feature work efficently and cleanly.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David Faucher</dc:creator><pubDate>Wed, 30 Nov 2011 15:51:05 -0000</pubDate></item><item><title>Re: Multiple submit buttons with ASP.NET MVC: final solution</title><link>http://blog.ashmind.com/index.php/2010/03/15/multiple-submit-buttons-with-asp-net-mvc-final-solution/#comment-372019506</link><description>&lt;p&gt;Hello Andrey,&lt;/p&gt;

&lt;p&gt;If i left the Html.BeginForm() as default then irrespective of which button i click the actionName parameter is always the same, Ex: "delete", so my collection of buttons only behavior in the same way. If i left the Html.BeginForm("Action", "Post") as you used in this article then the IsValidName will always return false and no method at all will be executed. Am I missing on anything here?&lt;/p&gt;

&lt;p&gt;Regards,&lt;br&gt;Ambrish&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ambrish</dc:creator><pubDate>Fri, 25 Nov 2011 05:28:39 -0000</pubDate></item><item><title>Re: Multiple submit buttons with ASP.NET MVC: final solution</title><link>http://blog.ashmind.com/index.php/2010/03/15/multiple-submit-buttons-with-asp-net-mvc-final-solution/#comment-369418731</link><description>&lt;p&gt;Hi Diego,&lt;/p&gt;

&lt;p&gt;Can you please explain what was the mistake and what fix you had to do. I am facimg the same problem.&lt;/p&gt;

&lt;p&gt;Regards,&lt;br&gt;Ambrish&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ambrish</dc:creator><pubDate>Mon, 21 Nov 2011 11:34:08 -0000</pubDate></item><item><title>Re: Multiple submit buttons with ASP.NET MVC: final solution</title><link>http://blog.ashmind.com/index.php/2010/03/15/multiple-submit-buttons-with-asp-net-mvc-final-solution/#comment-360351781</link><description>&lt;p&gt;Hey Andrey,&lt;/p&gt;

&lt;p&gt;This solution is just excellent, very clean , much better then the proposed solution from David Findley&lt;/p&gt;

&lt;p&gt;I added some commenting and swapped the hard coded "Action" for a default, check it out:&lt;br&gt;&lt;a href="http://pastebin.com/PhnKDekw" rel="nofollow"&gt;http://pastebin.com/PhnKDekw&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I will be using this whenever i use multiple buttons, in other situations i usually just use jQuery Postback.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">willem dhaeseleer</dc:creator><pubDate>Thu, 10 Nov 2011 16:03:12 -0000</pubDate></item><item><title>Re: Multiple submit buttons with ASP.NET MVC: final solution</title><link>http://blog.ashmind.com/index.php/2010/03/15/multiple-submit-buttons-with-asp-net-mvc-final-solution/#comment-357393549</link><description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;I can't really get it to work with JQuery, seems to be conflicting in some area. Any ideas?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Richard Lim</dc:creator><pubDate>Mon, 07 Nov 2011 04:53:44 -0000</pubDate></item><item><title>Re: Multiple submit buttons with ASP.NET MVC: final solution</title><link>http://blog.ashmind.com/index.php/2010/03/15/multiple-submit-buttons-with-asp-net-mvc-final-solution/#comment-305371558</link><description>&lt;p&gt;It depends on a mindset — if you are looking for a solution, yes, there are several ways to do this.&lt;br&gt;However I wanted to solve it in the way MVC framework has intended for controllers to be used — abstracted from the lowest details of HTTP (see Model Binders etc).&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Andrey Shchekin</dc:creator><pubDate>Thu, 08 Sep 2011 18:44:21 -0000</pubDate></item><item><title>Re: Multiple submit buttons with ASP.NET MVC: final solution</title><link>http://blog.ashmind.com/index.php/2010/03/15/multiple-submit-buttons-with-asp-net-mvc-final-solution/#comment-305156269</link><description>&lt;p&gt;this seems like a very complicated solution to a very simple issue. All you have to do is give each button a unique name, set the names as optional string parameters with default empty string values, then check if the parameters have a value. &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">sarah perrie</dc:creator><pubDate>Thu, 08 Sep 2011 13:47:13 -0000</pubDate></item><item><title>Re: Multiple submit buttons with ASP.NET MVC: final solution</title><link>http://blog.ashmind.com/index.php/2010/03/15/multiple-submit-buttons-with-asp-net-mvc-final-solution/#comment-265482242</link><description>&lt;p&gt;Very clean. I like it. Thanks for a great post.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">DGurram</dc:creator><pubDate>Tue, 26 Jul 2011 11:07:00 -0000</pubDate></item><item><title>Re: Multiple submit buttons with ASP.NET MVC: final solution</title><link>http://blog.ashmind.com/index.php/2010/03/15/multiple-submit-buttons-with-asp-net-mvc-final-solution/#comment-244786039</link><description>&lt;p&gt;I am having the problem in passing an id to my action method. The id passed is null. I have read the comments in the blog but haven't found any solutions. Can anybody who previously faced the same problem help me&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Prateeksasanker</dc:creator><pubDate>Thu, 07 Jul 2011 04:59:22 -0000</pubDate></item><item><title>Re: Multiple submit buttons with ASP.NET MVC: final solution</title><link>http://blog.ashmind.com/index.php/2010/03/15/multiple-submit-buttons-with-asp-net-mvc-final-solution/#comment-200049124</link><description>&lt;p&gt;Thats work fine.&lt;br&gt;But what if u use Ajax.BeginForm? can we have more than one actionmethod?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Garry</dc:creator><pubDate>Mon, 09 May 2011 05:20:03 -0000</pubDate></item><item><title>Re: Comparing .NET DI (IoC) Frameworks, Part 2</title><link>http://blog.ashmind.com/index.php/2008/09/08/comparing-net-di-ioc-frameworks-part-2/#comment-198253431</link><description>&lt;p&gt;Great article. But a bit dated. A update will do a lot of good.&lt;br&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Naser</dc:creator><pubDate>Fri, 06 May 2011 06:51:25 -0000</pubDate></item><item><title>Re: Multiple submit buttons with ASP.NET MVC: final solution</title><link>http://blog.ashmind.com/index.php/2010/03/15/multiple-submit-buttons-with-asp-net-mvc-final-solution/#comment-178513933</link><description>&lt;p&gt;Very useful, thanks.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jackandjane</dc:creator><pubDate>Tue, 05 Apr 2011 10:38:32 -0000</pubDate></item></channel></rss>
