Advertisement
Guest User

Untitled

a guest
Jul 24th, 2017
486
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.30 KB | None | 0 0
  1. [RouteArea("Account")]
  2. public class AccountController : Controller
  3. {
  4. #region Properties
  5. #endregion
  6.  
  7. #region Constructor
  8. public AccountController()
  9. {
  10.  
  11. }
  12. #endregion
  13.  
  14. #region Methods
  15. /// <summary>
  16. /// Primary Action Method to be called during Application Startup
  17. /// </summary>
  18. /// <returns></returns>
  19. [HttpGet, Route("Index")]
  20. public ActionResult Index()
  21. {
  22. var model = new AccountViewModel();
  23. return View(model);
  24. }
  25. #endregion
  26. }
  27.  
  28. <div class="container">
  29. <!-- Partial View to render the Login Section -->
  30. <div class="row"> //Enable by Default
  31. @Html.Partial("~/Areas/Account/Views/Shared/_Login.cshtml", Model)
  32. </div>
  33.  
  34. <!-- Partial View to render the Register Section -->
  35. <div class="row"> //Hidden by Default
  36. @Html.Partial("~/Areas/Account/Views/Shared/_Register.cshtml", Model)
  37. </div>
  38.  
  39. <!-- Partial View to render the Forgot Password Section -->
  40. <div class="row"> //Hidden by Default
  41. @Html.Partial("~/Areas/Account/Views/Shared/_ForgotPassword.cshtml", Model)
  42. </div>
  43. </div>
  44.  
  45. @using Account.Models
  46. @{ Layout = null;}
  47. @model AccountViewModel
  48.  
  49. <html>
  50. <head>
  51. <title>NewEmployeeBuddy | Home</title>
  52. <meta name="viewport" content="width=device-width, initial-scale=1">
  53.  
  54. <!-- Pre-requisite Scripts -->
  55. <script src="~/Scripts/jquery-3.1.1.min.js"></script>
  56. <script src="~/Scripts/jquery.validate.min.js"></script>
  57. <script src="~/Scripts/jquery.validate.unobtrusive.min.js"></script>
  58. <script src="~/Scripts/bootstrap.min.js"></script>
  59. <link href="~/Content/bootstrap.css" rel="stylesheet" />
  60.  
  61. <!-- Custom Scripts -->
  62. <link href="~/Areas/Account/Content/Css/account.css" rel="stylesheet" />
  63. <script src="~/Areas/Account/Content/Scripts/account.js"></script>
  64. <script>
  65. function OpenRegisterView()
  66. {
  67. $.ajax({
  68. url: '@Url.Action("RegisterView", "Account")',
  69. type: "GET",
  70. success: function (result) {
  71. $('#myModal .modal-body').html(result);
  72. }
  73. });
  74. }
  75.  
  76. function OpenForgotPasswordView() {
  77. $.ajax({
  78. url: '@Url.Action("ForgotPasswordView", "Account")',
  79. type: "GET",
  80. success: function (result) {
  81. $('#myModal .modal-body').html(result);
  82. }
  83. });
  84. }
  85. </script>
  86. </head>
  87. <body>
  88. <div class="container">
  89. <!-- Partial View to render the Login Section -->
  90. <div class="row">
  91. @Html.Partial("~/Areas/Account/Views/Shared/_Login.cshtml", Model)
  92. </div>
  93.  
  94. <!-- Partial View to render the Register Section -->
  95. <div class="row">
  96. <button id="register" onclick="OpenRegisterView();">Register</button>
  97. @*@Html.Partial("~/Areas/Account/Views/Shared/_Register.cshtml", Model)*@
  98. </div>
  99.  
  100. <!-- Partial View to render the Forgot Password Section -->
  101. <div class="row">
  102. <button id="register" onclick="OpenForgotPasswordView();">Forgot Password</button>
  103. @*@Html.Partial("~/Areas/Account/Views/Shared/_ForgotPassword.cshtml", Model)*@
  104. </div>
  105.  
  106. <div>
  107. <!---Bootstrap Modal Popup here -->
  108. </div>
  109. </div>
  110. </body>
  111. </html>
  112.  
  113. [RouteArea("Account")]
  114. public class AccountController : Controller
  115. {
  116. #region Properties
  117. #endregion
  118.  
  119. #region Constructor
  120. public AccountController()
  121. {
  122.  
  123. }
  124. #endregion
  125.  
  126. #region Methods
  127. /// <summary>
  128. /// Primary Action Method to be called during Application Startup
  129. /// </summary>
  130. /// <returns></returns>
  131. [HttpGet, Route("Index")]
  132. public ActionResult Index()
  133. {
  134. var model = new AccountViewModel();
  135. return View(model);
  136. }
  137.  
  138. [HttpGet, Route("RegisterView")]
  139. public ActionResult RegisterPopup()
  140. {
  141. return PartialView("_Register.cshtml");
  142. }
  143.  
  144. [HttpGet, Route("ForgotPasswordView")]
  145. public ActionResult ForgotpasswordPopup()
  146. {
  147. return PartialView("_ForgotPassword.cshtml");
  148. }
  149. #endregion
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement