Hi Mate
I have login.cshtml page and it has login button(this works), but my create button does not(how do i make an implementation for this to allow users be created)? I have this flow below from my Views/Account/login.cshmtl;
- "mainContent">
class ="container">class="logo col-sm-12 text-center col-md-12">"" src="~/Images/eNtsa.png" />
class="clearfix">class="container">class="row">"MyWizard" class="formArea LRmargin">- @using (Html.BeginForm())
- {
- @Html.AntiForgeryToken()
"divMessage" class="text-center col-md-12 col-md-offset-12 alert-success">- @Html.ValidationSummary()
class="glyphicon-log-out col-sm-12 text-center col-md-12">"" src="~/Images/gcobani.jpg" />
class="clearfix">class="col-md-12 col-md-offset-10 col-xs-12">class="loginPage panel-info">- class="">class="glyphicon glyphicon-user">Username
class="form-group text-center">- @Html.TextBoxFor(model => model.username, new { @class = "form-control text-center", autocomplete = "off" })
- @Html.ValidationMessageFor(model => model.username)
class="form-group">- class="">class="glyphicon glyphicon-user">Password
- @Html.PasswordFor(model => model.password, new { @class = "form-control text-center", autocomplete = "off" })
- @Html.ValidationMessageFor(model => model.password)
class="form-group">- "BtnLogin" type="submit" class="btn btn-success btn-pressure" name="BtnLogin" value="Login" />
- "BtnReset" type="reset" value="Create" class="btn btn-info btn-pressure" name="BtnReset" value="Reset" />
- }
class="clear">My Question do i have to create this first on my Routing.cs under AppStart folder, i notice my login is routing there? Also have i created a method create on my Controller. See this below- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using System.Web.Mvc;
- using System.Web.Routing;
- namespace eNtsaPortalWebsiteProject
- {
- public class RouteConfig
- {
- public static void RegisterRoutes(RouteCollection routes)
- {
- routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
- routes.MapRoute(
- name: "Default",
- url: "{controller}/{action}/{id}",
- defaults: new { controller = "Account", action = "Login", id = UrlParameter.Optional }
- );
- }
- }
- }
1 Reply
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jignesh KumarPosted Jan 23, 2020, 8:44 PM