dimanche 28 juin 2015

How can I extend MvcForm so that It will not generate a form tag?

I would like to add a condition to a html beginform. If the condition is false, I dont want the form tag to be generated.

Similar to this code:



        public static MvcHtmlString If(this MvcHtmlString value, bool evaluation)
        {
            return evaluation ? value : MvcHtmlString.Empty;
        }

Aucun commentaire:

Enregistrer un commentaire