sonal malhotra

sonal malhotra

  • NA
  • 410
  • 52k

how to save automatically in forms in razor(mvc)?

Dec 19 2018 4:12 AM
 in create razor
 
@model blogdemo1.Models.Blog
@{
ViewBag.Title = "Create";
}
<h2>Create</h2>
@using (Html.BeginForm("Create","Blog"))
{
<div class="form-group">
@Html.LabelFor(m=>m.Title)
@Html.TextBoxFor(m=>m.Title,new { @class = "form-control"})
</div>
<div class="form-group">
@Html.LabelFor(m => m.Author)
@Html.TextBoxFor(m => m.Author, new { @class = "form-control" })
</div>
<div class="form-group">
@Html.LabelFor(m => m.Content)
@Html.TextAreaFor(m => m.Content, new { @class = "form-control" })
</div>
<button type="submit"class="btn btn-primary"> Submit</button>
}
 
 how to save textbox n textarea in draft page