vendredi 26 juin 2015

Adding an item to a table in MVC

I have created a table of comments and in a separate view I want to add comments.

I made this code in that view:

<form action="#" method="post">
    <h3>Post a comment</h3>
        <label for="Title">Title</label>
        <input name="Title" id="Title" type="text" required />
        <label for="Text">Text</label>
        <input name="Text" id="Text" type="text" required />
        <label for="AuthorSite">AuthorSite</label>
        <input name="AuthorSite" id="AuthorSite" required />
        <label for="Author">Author</label>
        <input name="Author" id="Author" type="text" required/>
    <input type="submit" value="Post comment" onclick=""@Url.Action("Index", "Home")"/>

I have no idea what to do in the button when I want to add that information to the table.

Aucun commentaire:

Enregistrer un commentaire