using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
namespace Testmvcapp.Models
{
public class ClsUser
{
public int MobileID { get; set; }
public string User_Id { get; set; }
[Required(ErrorMessage = "Please Enter UserName")]
[Display(Name = "Enter UserName")]
[MaxLength(50, ErrorMessage = "Exceeding Limit")]
public string User_Name { get; set; }
[Required(ErrorMessage = "Please Enter Password")]
[Display(Name = "Enter Password")]
[MaxLength(50, ErrorMessage = "Exceeding Limit")]
public string User_Password { get; set; }
[Required(ErrorMessage = "Please Enter Confirm Password")]
[Display(Name = "Enter Confirm Password")]
[Compare("User_Password", ErrorMessage = "Password and Confirmation Password must match.")]
[MaxLength(50, ErrorMessage = "Exceeding Limit")]
public string User_ConfPassword { get; set; }
[Required(ErrorMessage = "Please Enter Name")]
[Display(Name = "Enter Name")]
[DataType(DataType.Text)]
public string User_FullName { get; set; }
}
}
@model Testmvcapp.Models.ClsUser
@{
Layout = null;
}
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>Index</title>
<link href="@Url.Content("~/Content/Gridmvc.css")" rel="stylesheet" />
<link href="@Url.Content("~/Content/bootstrap.min.css")" rel="stylesheet" />
<script src="@Url.Content("~/Scripts/gridmvc.min.js")"></script>
<script src="~/Scripts/jquery-3.1.1.js"></script>
<script src="~/Scripts/bootstrap.js"></script>
<script src="~/Scripts/jquery-3.1.1.min.js"></script>
</head>
<body style="background-image:url(../Images/img11.jpg);background-repeat:no-repeat;background-size:cover;">
@using (Html.BeginForm())
{
<div style="padding-left:20%;padding-right:20%;padding-top:10%; ">
<div class="col-md-12 col-lg-12 col-sm-12 col-xs-12">
<div class="col-md-3 col-lg-3 col-sm-3 col-xs-3">
Enter Name
</div>
<div class="col-md-9 col-lg-9 col-sm-9 col-xs-9">
@Html.TextBoxFor(a => a.User_FullName, new { @class = "text-primary", width = "100%" })
<span style="color:red">
@Html.ValidationMessageFor(a => a.User_FullName)
</span>
</div>
</div>
<div class="col-md-12 col-lg-12 col-sm-12 col-xs-12" style="height:5px;"></div>
<div class="col-md-12 col-lg-12 col-sm-12 col-xs-12">
<div class="col-md-3 col-lg-3 col-sm-3 col-xs-3">
User Name
</div>
<div class="col-md-9 col-lg-9 col-sm-9 col-xs-9">
@Html.TextBoxFor(a => a.User_Name, new { @class = "text-primary", width = "100%" })
<span style="color:red">
@Html.ValidationMessageFor(a => a.User_Name)
</span>
</div>
</div>
<div class="col-md-12 col-lg-12 col-sm-12 col-xs-12" style="height:5px;"></div>
<div class="col-md-12 col-lg-12 col-sm-12 col-xs-12">
<div class="col-md-3 col-lg-3 col-sm-3 col-xs-3">
Enter Password
</div>
<div class="col-md-9 col-lg-9 col-sm-9 col-xs-9">
@Html.TextBoxFor(a => a.User_Password, new { @class = "text-primary", width = "100%", type = "password" })
<span style="color:red">
@Html.ValidationMessageFor(a => a.User_Password)
</span>
@*<input type="text" id="txtpassword" style="width:280px;" class="text-primary" />*@
</div>
</div>
<div class="col-md-12 col-lg-12 col-sm-12 col-xs-12" style="height:5px;"></div>
<div class="col-md-12 col-lg-12 col-sm-12 col-xs-12">
<div class="col-md-3 col-lg-3 col-sm-3 col-xs-3">
ReEnter Password
</div>
<div class="col-md-9 col-lg-9 col-sm-9 col-xs-9">
@Html.TextBoxFor(a => a.User_ConfPassword, new { @class = "text-primary", width = "100%", type = "password" })
<span style="color:red">
@Html.ValidationMessageFor(a => a.User_ConfPassword)
</span>
</div>
</div>
<div class="col-md-12 col-lg-12 col-sm-12 col-xs-12" style="height:5px;"></div>
<div class="col-md-12 col-lg-12 col-sm-12 col-xs-12" style="height:5px;"></div>
<div class="col-md-12 col-lg-12 col-sm-12 col-xs-12">
<div class="col-md-3 col-lg-3 col-sm-3 col-xs-3">
</div>
<div class="col-md-9 col-lg-9 col-sm-9 col-xs-9">
<input type="submit" value="Upload" class="btn btn-primary" onclick="location.href='@Url.Action("Index", "DefaultController")'" />
</div>
</div>
</div>
}
</body>
</html>