@using (Html.BeginForm("Test", "Test", FormMethod.Post, new { id = "submitForm" })){ <div> <fieldset> <legend>Form</legend> <div class="editor-label"> @Html.LabelFor(m => m.UserName) </div> <div class="editor-field"> @Html.TextBoxFor(m => m.UserName, new { maxlength = 50 }) @Html.ValidationMessageFor(m => m.UserName) </div> <div class="editor-label"> @Html.LabelFor(m => m.Address) </div> <div class="editor-field"> @Html.TextAreaFor(m => m.Address, new { maxlength = 200 }) @Html.ValidationMessageFor(m => m.Address) </div> <p> <button type="submit" id="btnSave" name="Command" value="Save"> Save</button> <button type="submit" id="btnCancel" name="Command" value="Cancel" onclick="$('#submitForm').submit()"> Cancel (Server Side)</button> </p> </fieldset> </div>}
Software Developer at iFour Technolab Pvt Ltd
Login to post response