public static MvcForm BeginForm(this AjaxHelper helper, string actionName, string controllerName, object newRouteValues, string[] removingQuerystringKeys, System.Web.Mvc.Ajax.AjaxOptions ajaxOptions) { var values = new RouteValueDictionary(newRouteValues); foreach (string key in HttpContext.Current.Request.QueryString.AllKeys) { if (!removingQuerystringKeys.Contains(key) && !values.ContainsKey(key)) { values.Add(key, HttpContext.Current.Request.QueryString[key]); } } if (controllerName == null) { return(System.Web.Mvc.Ajax.AjaxExtensions.BeginForm(helper, actionName, values, ajaxOptions)); } else { return(System.Web.Mvc.Ajax.AjaxExtensions.BeginForm(helper, actionName, controllerName, values, ajaxOptions)); } }
public static MvcForm BeginForm(this AjaxHelper helper, string actionName, object newRouteValues, string[] removingQuerystringKeys, System.Web.Mvc.Ajax.AjaxOptions ajaxOptions) { return(BeginForm(helper, actionName, null, newRouteValues, removingQuerystringKeys, ajaxOptions)); }