internal static string GetActionAsForm(this HtmlHelper html, ActionContext actionContext, string controllerName, object routeValues, out string value, out RouteValueDictionary attributes) {
            const string tagType = "form";

            IEnumerable<ElementDescriptor> concurrencyElements = html.GetConcurrencyElements(actionContext.Target, actionContext.GetConcurrencyActionInputId);

            string elements = concurrencyElements.Aggregate(String.Empty, (s, t) => s + t.BuildElement());

            RouteValueDictionary routeValueDictionary;
            if (actionContext.ParameterValues != null && actionContext.ParameterValues.Any()) {
                // custom values have been set so push the values into view data 
                // fields will be hidden and action will be 'none' so that action goes straight through and doesn't prompt for 
                // parameters 

                foreach (var pc in actionContext.GetParameterContexts(html.Facade())) {
                    if (pc.CustomValue != null) {
                        html.ViewData[html.IdHelper().GetParameterInputId((actionContext.Action), (pc.Parameter))] = pc.CustomValue.Specification.IsParseable ? pc.CustomValue.GetDomainObject() : pc.CustomValue;
                    }
                }

                List<ElementDescriptor> paramElements = html.ActionParameterFields(actionContext).ToList();
                elements = paramElements.Aggregate(String.Empty, (s, t) => s + t.BuildElement());
                routeValueDictionary = new RouteValueDictionary();
            } else {
                routeValueDictionary = new RouteValueDictionary(new { action = "action" });
            }

            value = (elements + GetSubmitButton(null, actionContext.Action.Name, IdConstants.ActionInvokeAction, routeValueDictionary)).WrapInDivTag();

            attributes = new RouteValueDictionary(new {
                action = html.GenerateUrl(Action(actionContext.Action.Id), controllerName, new RouteValueDictionary(routeValues)),
                method = "post",
                id = actionContext.GetActionId(),
                @class = actionContext.GetActionClass()
            });
            return tagType;
        }
        internal static IEnumerable<ElementDescriptor> ActionParameterFields(this HtmlHelper html,
                                                                             ActionContext actionContext,
                                                                             IList<ElementDescriptor> childElements = null,
                                                                             string propertyName = null) {
            IEnumerable<ElementDescriptor> concurrencyElements = html.GetConcurrencyElements(actionContext.Target, actionContext.GetConcurrencyActionInputId);
            IEnumerable<ElementDescriptor> collectionFilterElements = html.GetCollectionSelectedElements(actionContext.Target);

            return (from parameterContext in actionContext.GetParameterContexts(html.Facade())
                    let parmValue = html.GetParameter(parameterContext, childElements, propertyName)
                    select new ElementDescriptor {
                        TagType = "div",
                        Label = html.GetLabel(parameterContext),
                        Value = parmValue,
                        Attributes = new RouteValueDictionary(new {
                            id = parameterContext.GetParameterId(),
                            @class = parameterContext.GetParameterClass()
                        })
                    }).Union(concurrencyElements).Union(collectionFilterElements);
        }