views:

85

answers:

4

Hello everybody,

I want to build something very similar to the "Ask Question" form in stackoverflow,

making some tag fields being added to my event model dynamically.

But I'm very new to MVC and I don't even imagine how to do that, can you provide me an

example or a tutorial?

Thank you, Felipe.

A: 

If you tell me what you mean by tag fields it will make it easier for me to give you an answer. Thanks

The_Lorax
A: 

I mean, an Event is a model that contains Tags, what I want, is make one single form that can register not just one model, but register the Event with their "N" Tags.

This helped you to understand?

A: 

create a view model with the event (post?) and tags for that event.

example

public class CreatePostViewModel
{
    public Post Post
    {
        get;
        set;
    }

    public IList<PostTag> Tags
    {
        get;
        get;
    }
}

is this what you are aiming for so far?

Mike Geise
A: 

Exactly, that is the model I have,

but I want to know how to "Fill" these Tags, from the View, or in the Controller.

I'm not understanding very well how the MVC works for this scenario.