Search Results

Search found 2 results on 1 pages for 'ronnblack'.

Page 1/1 | 1 

  • ASP.NET MVC Ajax.BeginForm eats params of submit button clicked. Looks like bug.

    - by RonnBlack
    If you are using Ajax.BeginForm() with multiple submit buttons similar to this: // View.aspx <% using (Ajax.BeginForm("Action", "Controller", new AjaxOptions { UpdateTargetId = "MyControl", })) { %> <span id="MyControl"> <% Html.RenderPartial("MyControl"); %> </span> <% } %> //MyControl.ascx <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %> <input name="prev" type="submit" value="prev" /> <input name="next" type="submit" value="next" /> //... Everything is submitted to the controller fine but the params for the submit button that was clicked are absent from the Request. In otherwords Request["next"] and Request["prev"] are always null. I looked in to the JavaScript in Microsoft.MvcAjax.js and it looks like the function Sys_Mvc_MvcHelpers$_serializeForm completely skips over the inputs that are of type 'submit'. This doesn't seem logical at all. How else can you find out what button has been clicked? It looks like a bug to me. Is there any logical reason to skip these form parameters?

    Read the article

  • Does MVCScriptManager from CodePlex work with ViewUserControls?

    - by RonnBlack
    I tried the MVCScriptManager from CodePlex and it seems to work well until you try to use it in conjunction with a ViewUserControl. When it is used in this type of scenario it gives the following error. A ScriptManager with RenderMode set to Master is not present. Such ScriptManager must precede one with RenderMode set to Slave. There is a ScriptManager with render mode set to "Master" in the header of the Site.Master page but it appears that the partial views are rendered first. Is there any way to work around this problem?

    Read the article

1