Skip to content
Loading
How to make your create work in your MVC web?  
  • 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
    1. using System;  
    2. using System.Collections.Generic;  
    3. using System.Linq;  
    4. using System.Web;  
    5. using System.Web.Mvc;  
    6. using System.Web.Routing;  
    7. namespace eNtsaPortalWebsiteProject  
    8. {  
    9. public class RouteConfig  
    10. {  
    11. public static void RegisterRoutes(RouteCollection routes)  
    12. {  
    13. routes.IgnoreRoute("{resource}.axd/{*pathInfo}");  
    14. routes.MapRoute(  
    15. name: "Default",  
    16. url: "{controller}/{action}/{id}",  
    17. defaults: new { controller = "Account", action = "Login", id = UrlParameter.Optional }  
    18. );  
    19. }  
    20. }  
    21. }  

    1 Reply

    Know the answer? Post it — somebody with the same question will find it here.