上一页 1 2 3 4 5 6 7 8 9 10 ··· 20 下一页
摘要: 1.如表中没有主键,先添加自动增长主键 alter table 表名 add 列名 int identity (1,1) primary key 2.删除重复数据 delete from 表名 where id not in (select min(id) from 表名 group by id) 阅读全文
posted @ 2016-03-27 22:56 黄者之风 阅读(1365) 评论(0) 推荐(0) 编辑
摘要: 此软件可以把SQL语句转换成LINQ语句 首先把Linqer下载到本地, 1.在VS中创建.dbml文件和.cs文件 打开VS,创建一个控制台项目即可,再添加一个dbml项目 2.添加连接数据库 3.把里面的表全部拖到空白处,保存; 4.打开Linqer,创建连接数据库字符串 5.点击Add,输入C 阅读全文
posted @ 2016-03-18 16:45 黄者之风 阅读(927) 评论(0) 推荐(0) 编辑
摘要: 假如有一个数据表格UserInfo: public class UserInfo { public int Id { get; set; } public string Name { get; set; } public string Pwd { get; set; } public int Sex 阅读全文
posted @ 2016-03-06 16:08 黄者之风 阅读(1821) 评论(0) 推荐(0) 编辑
摘要: 1.添加RouteDebug.dll引用;2.在全局Global文件添加如下代码:RouteDebug.RouteDebugger.RewriteRoutesForTesting(RouteTable.Routes);3.在Web.config配置文件中,appSettings节点下添加如下内容(此 阅读全文
posted @ 2016-03-05 17:15 黄者之风 阅读(262) 评论(0) 推荐(0) 编辑
摘要: 在cshtml文件中任意位置添加如下代码: @this.GetType().Assembly.Location 打开反编译器,在ASP---Execute():Void下即可查看原代码 阅读全文
posted @ 2016-03-05 17:14 黄者之风 阅读(238) 评论(0) 推荐(0) 编辑
摘要: student表: lag表: 要求将student表stu_id列为1的stu_nick列和stu_phont列的数据更新为lag表的lag_nick列和lag_phone列. SQL语句: update s set s.stu_nick=o.lag_nick,s.stu_phone=o.lag_ 阅读全文
posted @ 2016-03-01 15:11 黄者之风 阅读(805) 评论(0) 推荐(0) 编辑
摘要: html代码: <input id="file_upload" type="file" /> <div class="image_container"> <img id="preview" style="height:130px;width:117px;border-width:0px;"/> </ 阅读全文
posted @ 2016-02-29 10:27 黄者之风 阅读(20450) 评论(0) 推荐(4) 编辑
摘要: 在Model文件夹下添加一个类MyActionFilterAttribute继承于ActionFilterAttribute: using System; using System.Collections.Generic; using System.Linq; using System.Web; u 阅读全文
posted @ 2016-02-27 14:24 黄者之风 阅读(1200) 评论(0) 推荐(0) 编辑
摘要: MVC4提供的四种基本类型过滤器接口,IAuthorizationFilter、IActionFilter、IResultFilter和IExceptionFilter,可通过继承对应的接口和FilterAttrbute特性,定义自己的过滤器,也可继承内置的过滤器,重写相应的方法,完成自己的需求。 阅读全文
posted @ 2016-02-27 14:17 黄者之风 阅读(423) 评论(0) 推荐(0) 编辑
摘要: 1. RenderBody在Razor引擎中没有了“母版页”,取而代之的是叫做“布局”的页面(_Layout.cshtml)放在了共享视图文件夹中。在这个页面中,会看到标签里有这样一条语句:@RenderBody()其实它的作用和母版页中的服务器控件类似,当创建基于此布局页面的视图时,视图的内容会和 阅读全文
posted @ 2016-02-27 10:58 黄者之风 阅读(649) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 20 下一页