1.引用Bootstarp3

@Styles.Render("~/Content/css")

@Scripts.Render("~/bundles/bootstrap")

2.登陆代码

@using AquaWeb.Models
@model LoginViewModel
@{
ViewBag.Title = "登录";
} <div id="loginModal" >
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h1 class="text-center text-primary">登录</h1>
</div>
<div class="modal-body"> @using (Html.BeginForm("Login", "Account", new { ReturnUrl = ViewBag.ReturnUrl }, FormMethod.Post, new { @class = "form col-md-12 center-block", role = "form" }))
{
@Html.AntiForgeryToken() @Html.ValidationSummary(true, "", new { @class = "text-danger" }) <div class="form-group"> @Html.TextBoxFor(m => m.Email, new { @class = "form-control input-lg" ,placeholder = "电子邮件" })
@Html.ValidationMessageFor(m => m.Email, "", new { @class = "text-danger" })
</div> <div class="form-group"> @Html.PasswordFor(m => m.Password, new { @class = "form-control input-lg", placeholder = "登录密码" })
@Html.ValidationMessageFor(m => m.Password, "", new { @class = "text-danger" })
</div> <div class="form-group">
<button class="btn btn-primary btn-lg btn-block">立刻登录</button>
<span>@Html.ActionLink("忘记了密码?", "ForgotPassword")</span>
<span>@Html.ActionLink("注册新用户", "Register","",new { @class="pull-right"})</span>
</div>
} </div>
<div class="modal-footer"> </div> </div>
</div>
</div>
<div>
<section id="socialLoginForm">
@Html.Partial("_ExternalLoginsListPartial", new ExternalLoginListViewModel { ReturnUrl = ViewBag.ReturnUrl })
</section>
</div> @section Scripts {
@Scripts.Render("~/bundles/jqueryval")
}

3.注册代码

@model AquaWeb.Models.RegisterViewModel
@{
ViewBag.Title = "注册";
} <div id="loginModal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h1 class="text-center text-primary">注册</h1>
</div>
<div class="modal-body"> @using (Html.BeginForm("Register", "Account", new { ReturnUrl = ViewBag.ReturnUrl }, FormMethod.Post, new { @class = "form col-md-12 center-block", role = "form" }))
{
@Html.AntiForgeryToken() @Html.ValidationSummary("", new { @class = "text-danger" }) <div class="form-group"> @Html.TextBoxFor(m => m.Email, new { @class = "form-control input-lg", placeholder = "电子邮件" })
@Html.ValidationMessageFor(m => m.Email, "", new { @class = "text-danger" })
</div> <div class="form-group"> @Html.PasswordFor(m => m.Password, new { @class = "form-control input-lg", placeholder = "密码" })
@Html.ValidationMessageFor(m => m.Password, "", new { @class = "text-danger" })
</div> <div class="form-group"> @Html.PasswordFor(m => m.ConfirmPassword, new { @class = "form-control input-lg", placeholder = "确认密码" })
@Html.ValidationMessageFor(m => m.Password, "", new { @class = "text-danger" })
</div> <div class="form-group">
<button class="btn btn-primary btn-lg btn-block">注册</button>
</div>
} </div>
<div class="modal-footer"> </div> </div>
</div>
</div> @section Scripts {
@Scripts.Render("~/bundles/jqueryval")
}

4.界面展示

5.参考地址:

http://www.gbtags.com/gb/rtreplayerpreview/183.htm

Asp.net MVC+Bootstrap3的悬浮式登录框效果的更多相关文章

  1. 基于ASP.NET MVC的热插拔模块式开发框架(OrchardNoCMS)介绍(二)

    基于ASP.NET MVC的热插拔模块式开发框架(OrchardNoCMS)介绍(二) 之前文章中给大家说明了下我这个小小的想法,发现还是有不少人的支持和关注.你们的鼓励是对我最大的支持. 我总结了了 ...

  2. JQuery+CSS3实现封装弹出登录框效果

    原文:JQuery+CSS3实现封装弹出登录框效果 上次发了一篇使用Javascript来实现弹出层的效果,这次刚好用了JQuery来实现,所以顺便记录一下: 因为这次使用了Bootstrap来做一个 ...

  3. 基于ASP.NET MVC的热插拔模块式开发框架(OrchardNoCMS)--AOP编程

    AOP编程在目前来说好像是大家都比较喜欢的.ASP.NET MVC中的Filter就是使用AOP实现的配置器模式.AOP在编码中的应用主要有如下几个方面: 日志记录,跟踪,优化和监控 事务的处理 持久 ...

  4. ASP.NET MVC:模块化/插件式文章汇总

    方案 Shazwazza | Developing a plugin framework in ASP.NET MVC with medium trust 基于ASP.NET MVC3 Razor的模 ...

  5. HTML和CSS实现的透明登录框效果

    实现代码 HTML部分 <!DOCTYPE html> <html lang="en"> <head> <meta charset=&qu ...

  6. ASP.NET MVC网站使用新浪微博账号登录

    首先到http://open.weibo.com/development 注册一个开发者账号. 然后可以点微连接--网站接入 会分配App Key 和App Secret 然后点高级信息 在这里设置回 ...

  7. ASP.NET MVC:模块化/插件式架构实现(转载)

    I’ve recently spent quite a lot of time researching and prototyping different ways to create a plugi ...

  8. asp.net mvc 权限过滤和单点登录(禁止重复登录)

    1.权限控制使用controller和 action来实现,权限方式有很多种,最近开发项目使用控制控制器方式实现代码如下 /// <summary> /// 用户权限控制 /// < ...

  9. 基于ASP.NET MVC的热插拔模块式开发框架(OrchardNoCMS)--瘦身计划

    Orchard CMS是针对CMS开发的,对于很多开发需求来说,内容管理这块儿可能并不需要,而需要它的模块式开发模式.所以我这里通过对OrchardCMS进行瘦身,去除 内容管理部分的内容,保留简单的 ...

随机推荐

  1. 开源战棋 SLG 游戏框架设计思考(二)规则系统要考虑的因素

    游戏对象 1. 地块方格 地形:山脉.丘陵.乔木林.灌木林.平原.河流.湖泊.海洋.雪原.沼泽.沙漠.暗礁.滩涂.岛屿等等(需完善) 设施:铁路.公路.桥梁.机场.城市.村庄.岸防炮.要塞.废墟等等( ...

  2. 标签案例-开发foreach标签

    if(item.getClass().isArray()){ this.collection = new ArrayList(); int length = Array.getLength(items ...

  3. php变量和数组大小限制

    前言:shopnc在默认拼接sql的时候会带上limit 1000 那么问题就来了,如果在使用系统的封装的方法,但是如果你没有带上->limit(false)就完蛋了 那么问题来了,在判断时候, ...

  4. Android 学习路线图

  5. 阿里云服务器Linux CentOS安装配置(七)域名解析

    阿里云服务器Linux CentOS安装配置(七)域名解析 1.购买域名 登录阿里云,左侧菜单点击[域名],然后[域名注册],完成域名购买.(一般首年45元) 2.添加域名解析 在域名列表里点击你的域 ...

  6. 取到 tableview 自定义section header 上的button

    在自定义的组头上,添加了一个button,在点击cell是想取到相应的组头上的button来进行操作时(比如说隐藏.是否响应点击事件等)时,我遇到了取不到所有button的问题,试过了常规的通过vie ...

  7. 利用paramiko模块实现堡垒机+审计功能

    paramiko模块是一个远程连接服务器,全真模拟ssh2协议的python模块,借助paramiko源码包中的demos目录下:demo.py和interactive.py两个模块实现简单的堡垒机+ ...

  8. mybatis---实现关联表查询

    推荐学习博客: 1.http://www.cnblogs.com/xdp-gacl/p/4264440.html 2.http://www.cnblogs.com/yaobolove/p/544404 ...

  9. pip的相关操作

    >Python中的pip是什么?能够做些什么? pip是Python中的一个进行包管理的东西,能够下载包.安装包.卸载包......一些列操作 >怎么查看pip的相关信息 在控制台输入: ...

  10. play 源码分析

    play 入口: play.server.Server类 主要做2件事情: 1,Play.init;    // 初始化,主要是配置的加载,插件的加载等等 2,new Server(); 这里play ...