ASP.NET MVC dynamic form

My problem is this. I have a system for creating accounts. However, different users can set different attributes for the created account. This means that I get a dynamic form with different attributes for different users. How should I handle such a form?

0


a source to share


2 answers


After you've processed the client side with jQuery, you probably want to process the form values โ€‹โ€‹based on whether there is any record. Check out how to use a controller to get the entire collection of a form:



public ActionResult AddUser(FormCollection formvals)
{
    //Check for existence of form values and save as appropriate

    return View();
}

      

+1


a source


It looks like you need to hide / show some HTML elements based on user selection. Take a look at jQuery to manipulate a form element on the client side.



0


a source







All Articles