vendredi 14 août 2015

How dynamicly add new partial form and how get data from them in ASP MVC?

I have project on ASP MVC 5. I have a model "Article". This model have HashSet and ICollection of Author. Author - second model:

 public partial class Article
{
    public Article()
    {
        Authors = new HashSet<Author>();
    }

    [DisplayName("Авторы")]
    public virtual ICollection<Author> Authors { get; set; }

I need to add page of creating Article, on which you can increase the number of authors(using AJAX), and each author to register the fields. I decided to use partial view of Author's model, without "Create" button(Create button used only view of creating Article). I need in unlimited adding new partial views, and after fill them - get all data from them. How make it? I newbie in MVC, and can't imagine how it will works.

http://ift.tt/1UFGYKD - an illustration of how it should look



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire