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. 【javaweb学习】XML和约束模式

    xml:可扩展标记语言,w3c组织发布的,用于保存有关系的数据,作为配置文件,描述程序模块之间的关系 <?xml version="1.0" encoding="g ...

  2. Nginx+Tomcat+Redis实现负载均衡、资源分离、session共享

    Nginx+Tomcat+Redis实现负载均衡.资源分离.session共享 CentOS安装Nginx http://centoscn.com/CentosServer/www/2013/0910 ...

  3. Scala的模式匹配

    1.概述 2.程序示例(普通的示例) 3.模式匹配(Array) 4.程序示例(Array) 5.模式匹配(List) 6.程序示例 7.遍历 8.模式匹配(case class) 9.程序示例(传统 ...

  4. 给inpu加背景图,input内容又不能盖着背景图

    问题: 根据需要,给input添加背景图片,又需要点击input及input的这个背景触发事件,但是给input输入内容多时,会覆盖此背景(如下图), 图中,java人员使用插件省市区三级联动,需要i ...

  5. 2017年8个UI设计流行趋势

    设计趋势变化的理由需要考虑各种各样的因素.让我们来一起看看2017年的设计流行趋势吧. 应用界面的设计趋势是不断变化的.随着时间的推移他也在不断的成长,进化.虽然有些趋势还有待检验,但我们还是需要不断 ...

  6. Magento table rates表运费设置

    在magento中集成了Table rate表运费,这种运输方式.表运费就是我们自己写个运费表,根据距离和商品重量设置运费,制做成一张csv格式的表,导入到magento中,来实现运费的控制. 在我的 ...

  7. dynamodb golang query one Item

    golang  dynamodb  query  oneItem  and unmarshal  to object // +build example package main import ( / ...

  8. Oracle中PL/SQL的执行部分和各种流程控制

    Oracle中PL/SQL的执行部分和异常部分 一.PL/SQL的执行部分. 赋值语句. 赋值语句分两种,一种是定义一个变量,然后接收用户的IO赋值:另一种是通过SQL查询结果赋值. 用户赋值举例: ...

  9. [转]搬瓦工换机房换ip之后不能连外网

    搬瓦工换机房换ip之后不能连外网 时间 2015-07-21 15:17:16  Wendal随笔 原文  http://wendal.net/2015/07/21.html 主题 iptables ...

  10. 现在web前端这么火,钱景怎么样啊?

    web前端开发工程师可以说是一个全新的职业,在IT整个行业中真正受到重视的时间没有超过5年,也正因为这样,大家越来越想了解web前端工程师的前景究竟怎么样? web前端培训就业前景如何?web前端工程 ...