Advertisement
starinfox

Untitled

May 6th, 2018
644
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ASP 1.84 KB | None | 0 0
  1. @model SoftEnProject.Models.UserCourseHistory
  2.  
  3. @{
  4.     ViewBag.Title = "Create";
  5. }
  6.  
  7. <h2>Create</h2>
  8. <script>
  9.     $("#UserID").change(function () {
  10.         var end = this.value;
  11.         alert(end);
  12.     });
  13. </script>
  14.  
  15. @using (Html.BeginForm())
  16. {
  17.     @Html.AntiForgeryToken()
  18.    
  19.     <div class="form-horizontal">
  20.         <h4>UserCourseHistory</h4>
  21.         <hr />
  22.         @Html.ValidationSummary(true, "", new { @class = "text-danger" })
  23.         <div class="form-group">
  24.             @Html.LabelFor(model => model.UserID, "UserID", htmlAttributes: new { @class = "control-label col-md-2" })
  25.             <div class="col-md-10">
  26.                 @Html.DropDownList("UserID", null, htmlAttributes: new { @class = "form-control" })
  27.                 @Html.ValidationMessageFor(model => model.UserID, "", new { @class = "text-danger" })
  28.             </div>
  29.         </div>
  30.  
  31.         <div class="form-group">
  32.             <label class = "control-label col-md-2">Name</label>
  33.             <div class="col-md-10">
  34.                 @Html.TextBox("myName","", new { @class = "form-control", @disabled = "disabled" })
  35.             </div>
  36.         </div>
  37.  
  38.         <div class="form-group">
  39.             @Html.LabelFor(model => model.CourseID, "CourseID", htmlAttributes: new { @class = "control-label col-md-2" })
  40.             <div class="col-md-10">
  41.                 @Html.DropDownList("CourseID", null, htmlAttributes: new { @class = "form-control" })
  42.                 @Html.ValidationMessageFor(model => model.CourseID, "", new { @class = "text-danger" })
  43.             </div>
  44.         </div>
  45.  
  46.         <div class="form-group">
  47.             <div class="col-md-offset-2 col-md-10">
  48.                 <input type="submit" value="Create" class="btn btn-default" />
  49.             </div>
  50.         </div>
  51.     </div>
  52. }
  53.  
  54. <div>
  55.     @Html.ActionLink("Back to List", "Index")
  56. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement