#MVC,#WebDevelomoent
I have an view but it's not strongly typed view. Firstly i dsigned a view in the view i have panel in that i have two dive forms id in their 1st one having login and 2nd once having registration but in their i user @url.action html helper. it's working only for registraion only i have controller with methods definatinos of each one. I will share the code now
Please slove this issue has early as possible thanking you
- <div class="panel panel-login">
- <div class="panel-heading">
- <div class="row">
- <div class="col-xs-6">
- <a href="#" class="active" id="login-form-link">Login</a>
- </div>
- <div class="col-xs-6">
- <a href="#" id="register-form-link">Register</a>
- </div>
- </div>
- <hr>
- </div>
- <div class="panel-body">
- <div class="row">
- <div class="col-lg-12">
- <form id="login-form" action="" method="post" role="form" style="display: block;">
- <div class="form-group">
- <div class="form-group">
- @Html.TextBoxFor(m => m.Email, new { placeholder = "Enter Your Name", @class = "form-input", @tabindex = "1" })
- </div>
- @*<input type="text" name="username" id="username" class="form-control" tabindex="1" placeholder="Username" value="">*@
- </div>
- <div class="form-group">
- @Html.TextBoxFor(m => m.Password, new { placeholder = "Enter Your Name", @class = "form-input", @tabindex = "1" })
- @*<input type="password" name="password" id="password" tabindex="2" class="form-control" placeholder="Password">*@
- </div>
- <div class="form-group">
- <div class="row">
- <div class="col-sm-6 col-sm-offset-3">
- <input type="submit" name="login-submit" id="login-submit" tabindex="4" class="form-control btn btn-login" value="Log In" onclick="@Url.Action("Register","Home")">
- </div>
- </div>
- </div>
- <div class="form-group">
- <div class="row">
- <div class="col-lg-12">
- <div class="text-center">
- <a href="" tabindex="5" class="forgot-password">Forgot Password?</a>
- </div>
- </div>
- </div>
- </div>
- </form>
- <form id="register-form" action="" method="post" role="form" style="display: none;">
- <div class="form-group">
- @Html.TextBoxFor(m => m.Uname, new { placeholder = "Enter Your Name", @class = "form-input", @tabindex = "1" })
- @*<input type="email" name="email" id="email" tabindex="1" class="form-control" placeholder="Email Address" value="">*@
- </div>
- <div class="form-group">
- @Html.TextBoxFor(m => m.Email, new { placeholder = "Enter Your Email", @class = "form-input", @tabindex = "2" })
- @*<input type="email" name="email" id="email" tabindex="1" class="form-control" placeholder="Email Address" value="">*@
- </div>
- <div class="form-group">
- @Html.TextBoxFor(m => m.Password, new { placeholder = "Enter Your Password", @class = "form-input", @tabindex = "3" })
- @*<input type="text" name="mobilenumber" id="mobilenumber" tabindex="1" class="form-control" placeholder="Phone Number" value="">*@
- </div>
- <div class="form-group">
- @Html.TextBoxFor(m => m.Cpassword, new { placeholder = "Enter Your Confirm Password", @class = "form-input", @tabindex = "4" })
- @*<input type="password" name="password" id="password" tabindex="2" class="form-control" placeholder="Password">*@
- </div>
- <div class="form-group">
- @Html.TextBoxFor(m => m.Mobile, new { placeholder = "Enter Your Mobile Number", @class = "form-input", @tabindex = "5" })
- @*<input type="password" name="confirm-password" id="confirm-password" tabindex="2" class="form-control" placeholder="Confirm Password">*@
- </div>
- <div class="form-group">
- <div class="row">
- <div class="col-sm-6 col-sm-offset-3">
- <input type="button" value="Register Now" name="register-submit" id="register-submit" tabindex="4" class="form-control btn btn-register" onclick="location.href='@Url.Action("Register","Home")'" />
- </div>
- </div>
- </div>
- </form>
- </div>
- </div>
- </div>
- </div>
and have home contoller with
- public ActionResult Register()
- {
- return View("WhyUs");
- }
- public ActionResult Login()
- {
- return View("InvestmentCorner");
- }