Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [RouteArea("Account")]
- public class AccountController : Controller
- {
- #region Properties
- #endregion
- #region Constructor
- public AccountController()
- {
- }
- #endregion
- #region Methods
- /// <summary>
- /// Primary Action Method to be called during Application Startup
- /// </summary>
- /// <returns></returns>
- [HttpGet, Route("Index")]
- public ActionResult Index()
- {
- var model = new AccountViewModel();
- return View(model);
- }
- #endregion
- }
- <div class="container">
- <!-- Partial View to render the Login Section -->
- <div class="row"> //Enable by Default
- @Html.Partial("~/Areas/Account/Views/Shared/_Login.cshtml", Model)
- </div>
- <!-- Partial View to render the Register Section -->
- <div class="row"> //Hidden by Default
- @Html.Partial("~/Areas/Account/Views/Shared/_Register.cshtml", Model)
- </div>
- <!-- Partial View to render the Forgot Password Section -->
- <div class="row"> //Hidden by Default
- @Html.Partial("~/Areas/Account/Views/Shared/_ForgotPassword.cshtml", Model)
- </div>
- </div>
- @using Account.Models
- @{ Layout = null;}
- @model AccountViewModel
- <html>
- <head>
- <title>NewEmployeeBuddy | Home</title>
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <!-- Pre-requisite Scripts -->
- <script src="~/Scripts/jquery-3.1.1.min.js"></script>
- <script src="~/Scripts/jquery.validate.min.js"></script>
- <script src="~/Scripts/jquery.validate.unobtrusive.min.js"></script>
- <script src="~/Scripts/bootstrap.min.js"></script>
- <link href="~/Content/bootstrap.css" rel="stylesheet" />
- <!-- Custom Scripts -->
- <link href="~/Areas/Account/Content/Css/account.css" rel="stylesheet" />
- <script src="~/Areas/Account/Content/Scripts/account.js"></script>
- <script>
- function OpenRegisterView()
- {
- $.ajax({
- url: '@Url.Action("RegisterView", "Account")',
- type: "GET",
- success: function (result) {
- $('#myModal .modal-body').html(result);
- }
- });
- }
- function OpenForgotPasswordView() {
- $.ajax({
- url: '@Url.Action("ForgotPasswordView", "Account")',
- type: "GET",
- success: function (result) {
- $('#myModal .modal-body').html(result);
- }
- });
- }
- </script>
- </head>
- <body>
- <div class="container">
- <!-- Partial View to render the Login Section -->
- <div class="row">
- @Html.Partial("~/Areas/Account/Views/Shared/_Login.cshtml", Model)
- </div>
- <!-- Partial View to render the Register Section -->
- <div class="row">
- <button id="register" onclick="OpenRegisterView();">Register</button>
- @*@Html.Partial("~/Areas/Account/Views/Shared/_Register.cshtml", Model)*@
- </div>
- <!-- Partial View to render the Forgot Password Section -->
- <div class="row">
- <button id="register" onclick="OpenForgotPasswordView();">Forgot Password</button>
- @*@Html.Partial("~/Areas/Account/Views/Shared/_ForgotPassword.cshtml", Model)*@
- </div>
- <div>
- <!---Bootstrap Modal Popup here -->
- </div>
- </div>
- </body>
- </html>
- [RouteArea("Account")]
- public class AccountController : Controller
- {
- #region Properties
- #endregion
- #region Constructor
- public AccountController()
- {
- }
- #endregion
- #region Methods
- /// <summary>
- /// Primary Action Method to be called during Application Startup
- /// </summary>
- /// <returns></returns>
- [HttpGet, Route("Index")]
- public ActionResult Index()
- {
- var model = new AccountViewModel();
- return View(model);
- }
- [HttpGet, Route("RegisterView")]
- public ActionResult RegisterPopup()
- {
- return PartialView("_Register.cshtml");
- }
- [HttpGet, Route("ForgotPasswordView")]
- public ActionResult ForgotpasswordPopup()
- {
- return PartialView("_ForgotPassword.cshtml");
- }
- #endregion
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement