自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(72)
  • 资源 (6)
  • 收藏
  • 关注

转载 MVC EF Code First

1 在Models里面创建类,用[Key]特性指定主键;2 在Model里面增加导航属性;3 在web.config里面增加连接字符串4 创建继承于DbContext的类5 创建Controller类,生成Index视图6 在Controller类的Index()里面,通过context.Database.CreateIfNotExist()//BookInfo.csusing System;us...

2018-04-26 17:20:51 277

转载 MVC EF Model First

1 在Models下新建实体数据模型Model.edmx2 在Model.edmx中点右键建立各个实体,增加Scalar Property3 空白处点右键,添加关系,勾选增加外键4 保存Model.edmx, 空白处点右键,选择从模型生成数据库既可...

2018-04-26 16:48:53 252

转载 MVC WebApi的两种访问方法

//UserInfoControllerusing ClassLibrary;using System;using System.Collections.Generic;using System.Linq;using System.Net;using System.Net.Http;using System.Web.Http;namespace WebApiExam.Controllers{   ...

2018-04-25 22:15:42 5436

转载 MVC CRUD 的两种方法

//Index.cshtml@model IQueryable<MvcExam2.Models.Product>@{    Layout = null;}<!DOCTYPE html><html><head>    <meta name="viewport" content="width=device-width" />    &

2018-04-25 22:04:57 595

转载 MVC EF 导航属性

@model IQueryable<EFExam.Models.CategoryProductViewModel>@{    Layout = null;}<!DOCTYPE html><html><head>    <meta name="viewport" content="width=device-width" />   

2018-04-25 15:43:01 1078

转载 Sql 执行查询顺序

2018-04-25 14:12:49 592

转载 MVC EF两种查询方法

@*@model IQueryable<EFExam.Models.Product>*@@model IQueryable<EFExam.Models.ProductViewModel>@{    Layout = null;}<!DOCTYPE html><html><head>    <meta name="viewport" ..

2018-04-25 14:08:49 5530

转载 MVC WebApi

两种web服务•SOAP风格:基于方法,产品是WebService•REST风格:基于资源,产品是WebAPI对于数据的增、删、改、查,提供相对的资源操作,按照请求的类型进行相应处理,主要包括Get(查)、Post(增)、Put(改)、Delete(删),这些都是http协议支持的请求方式在APIController中定义crud的方法,名称可以自定义,如果对应相应的资源操作,可以使用特性约束主要...

2018-04-24 22:02:43 161

转载 MVC 行为过滤器

using FilterExam.Fiter;using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.Mvc;namespace FilterExam.Controllers{    public class HelloController : Control...

2018-04-24 20:57:16 195

转载 MVC 身份验证和异常处理过滤器

两种使用方式:1自定义类继承自相应的类或接口,重写方法,作为特性使用2 在控制器类中重写方法特性方式的使用注意:如果继承自接口需要让类实现FilterAttribute,才可以作为特性使用使用方式1:作为Controller或Action的特性使用方式2:在Global中注册为全局过滤器,应用于所有的Controller的Action参数类均继承自ControllerContext,主要包含属性请...

2018-04-24 19:47:32 405

转载 MVC 校验

@model MVCFirst.Models.Person@{    Layout = null;}<!DOCTYPE html><html><head>    <meta name="viewport" content="width=device-width" />    <title>Add</title&amp

2018-04-23 22:16:24 97

转载 MVC 异步调用

@{    Layout = null;}<!DOCTYPE html><html><head>    <meta name="viewport" content="width=device-width" />    <title>Index</title>    <script src=

2018-04-23 21:53:32 286

转载 MVC 调试路由

1.添加引用RouteDebug.dll2 修改Global.asax,切记调试过后要删掉using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.Http;using System.Web.Mvc;using System.Web.Optimization;u...

2018-04-23 15:12:11 137

转载 MVC 自定义路由规则

using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.Mvc;using System.Web.Routing;namespace FirstMVC{    public class RouteConfig    {        public static...

2018-04-23 14:59:15 767

转载 MVC 自动装配

//HelloController.csusing FirstMVC.Models;using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.Mvc;namespace FirstMVC.Controllers{    public class HelloCon...

2018-04-23 14:57:18 219

转载 MVC 直接或间接继承自ActionResult的类型

•ViewResult:使用View()可以指定一个页面,也可以指定传递的模型对象,如果没有指定参数则表示返回与Action同名的页面•ContentResult:使用Content(string content)返回一个原始字符串•RedirectResult:使用Redirect(stringurl)将结果转到其它的Action•JsonResult:使用Json(object

2018-04-23 09:19:26 317

转载 MVC 创建强类型视图

•在ViewModel中创建一个类型•在Action中为ViewData.Model赋值•在View中使用“@model类型”设置14 手动创建强类型视图•在ViewModel中创建一个类型•在Action中为ViewData.Model赋值•在View中使用“@model类型”设置...

2018-04-22 21:06:07 1140

转载 MVC HtmlHelper

1专门用于MVC的链接方式:Html.Action(“Home”,“Index”),会根据路由规则生成a标记,并且在运行时可以进行有效性检查,不需要用户点击链接后才知道链接出错了2 Raw:输出3 Encode:进行Html编码4 Action:服务器端其它页面5 表单控件•类型一:Html.**(),以字符串为参数•类型二:Html.**For(),以Expression<Func<...

2018-04-22 20:44:09 97

转载 MVC Razor视图引擎

强大的@:表示使用C#代码,相当于aspx中的<%%>可以完成输出功能当遇到html标签时会认为C#代码结束,贪婪匹配后面的内容,如@a1会认为是变量a1,如@a<br>1会认为是变量a会对标签内容进行Html编码注释:@*注释内容*@注意:@变量表示输出,结尾不加分号l引入命名空间:@using命名空间;...

2018-04-22 20:42:11 167

转载 MVC 组件之间的关系

View和Controller都可以直接请求Model   但是Model不依赖View和controllerlController可以直接请求View来显示具体页面    View不依赖ControllerView可以通过另外的方式来请求Controller...

2018-04-22 19:19:32 1842 1

转载 Web应用程序和网站的区别

1项目就是一个应用程序。在VS中查看的时候,项目中建立的一般处理程序,有两个文件,网站只有一个。写个代码测试,发现在代码层次上没有2再有就是项目中的一般处理程序有命名空间,而网站中的没有。WEB网站每一个页面(ashx页面)都是一个独立的程序,一个页面出错了不会影响到另外一个页面(演示).3项目中建立完一个文件(或修改了一个文件),一定要重新生成,生成的目的就是将项目生成对应的dll文件放在bin...

2018-04-21 11:36:22 2581

转载 WebForm- CRUD

  //UserInfoList.html<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>    <title>用户列表页面</title>

2018-04-19 23:17:53 257

转载 WebForm- Get请求

<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>    <title></title><meta charset="utf-8&

2018-04-19 09:04:50 437

转载 WebForm- 用隐藏域解决Http无状态问题

<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head>    <title></title></head><body>    <form method="post" actio

2018-04-19 09:04:05 312

转载 WebForm- POST请求

<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>    <title></title><meta charset="utf-8&

2018-04-18 23:30:14 1368

转载 WebForm- FirstWeb

//html<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>    <title></title><meta charset=&qu

2018-04-18 22:52:35 256

转载 WebForm-HTTP 状态码

状态代码有三位数字组成,第一个数字定义了响应的类别,且有五种可能取值:1xx:指示信息--表示请求已接收,继续处理2xx:成功--表示请求已被成功接收、理解、接受3xx:重定向--要完成请求必须进行更进一步的操作4xx:客户端错误--请求有语法错误或请求无法实现5xx:服务器端错误--服务器未能实现合法的请求常见状态代码、状态描述、说明:200 OK      //客户端请求成功4...

2018-04-18 16:58:19 191

原创 WebForm-HTTP协议-请求报文

2018-04-18 16:55:28 385

原创 C# TCP 通讯

//接收using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.IO;using System.Linq;using System.Net;using System.Net.Sockets;using S...

2018-04-18 11:07:39 633

原创 C# 发送邮件

using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Net;using System.Net.Mail;using System.Text;using System...

2018-04-18 10:28:02 174

原创 C# WebBrowser的使用

using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Windows.F...

2018-04-18 09:31:00 3130

原创 C# WebRequest WebResponse的使用

using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.IO;using System.Linq;using System.Net;using System.Text;using System.Threa...

2018-04-18 08:55:49 772

原创 C# WebRequest WebResponse的使用

using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.IO;using System.Linq;using System.Net;using System.Text;using System.Threa...

2018-04-18 08:41:43 652

原创 C# WebClient的使用

using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.IO;using System.Linq;using System.Net;using System.Text;using System.Threa...

2018-04-18 08:36:17 2466

原创 C#基于用户和角色的验证,服务端web 客户端wpf

应用程序服务<?xml version="1.0"?><!--  For more information on how to configure your ASP.NET application, please visit  http://go.microsoft.com/fwlink/?LinkId=169433  --><configuration>   ...

2018-04-13 16:55:46 775

原创 C# 声明基于角色的安全性

using System;using System.Collections.Generic;using System.Linq;using System.Security;using System.Security.Permissions;using System.Security.Principal;using System.Text;using System.Threading;using S...

2018-04-13 10:16:39 186

原创 C# WindowsPrincipal(Windows规则)的使用

using System;using System.Collections.Generic;using System.Linq;using System.Security.Principal;using System.Text;using System.Threading;using System.Threading.Tasks;namespace WindowsPrincipal{    cla...

2018-04-13 10:07:11 843

原创 C# System.Timers.Timer的使用

using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading;using System.Threading.Tasks;namespace TimersTimer{    class Program    {        static void Ma...

2018-04-11 15:26:01 1623

原创 C# System.Threading.Timer的使用

using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading;using System.Threading.Tasks;namespace ThreadTimerExam{    class Program    {        static voi...

2018-04-11 15:14:26 9222

原创 C# Task的使用

using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading;using System.Threading.Tasks;namespace TaskExam{    class Program    {        static void Main(...

2018-04-11 15:01:11 196

Android 4高级编程(第3版)(完整书签).zip

Android 4高级编程第三版 带有完整书签,高清,很好用哦

2019-06-14

ASP.NET MVC 5高级编程 第5版(中文版带书签)

第1章入门 1.1ASP.NETMVC简介 1.1.1ASP.NETMVC如何适应ASP.NET 1.1.2MVC模式简介 1.1.3MVC在Web框架中的应用 1.1.4ASP.NETMVC5的发展历程 1.1.5ASP.NETMVC4概述 1.1.6开源发布 1.2ASP.NETMVC5概述 1.2.1OneASP.NET 1.2.2新的Web项目体验 1.2.3ASP.NETIdentity 1.2.4Bootstrap模板 1.2.5特性路由 1.2.6ASP.NET基架 1.2.7身份验证过滤器 1.2.8过滤器重写 1.3安装MVC5和创建应用程序 1.3.1ASP.NETMVC5的软件需求 1.3.2安装ASP.NETMVC5 1.3.3创建ASP.NETMVC5应用程序 1.3.4NewASP.NETProject对话框 1.4ASP.NETMVC应用程序的结构 1.4.1ASP.NETMVC和约定 1.4.2约定优于配置 1.4.3约定简化通信 1.5小结 第2章控制器 2.1控制器的角色 2.2示例应用程序:MVCMusicStore 2.3控制器基础 2.3.1简单示例:HomeController 2.3.2创建 第一个控制器 2.3.3控制器操作中的参数 2.4小结 第3章视图 3.1视图的作用 3.2视图的基础知识 3.3理解视图约定 3.4强类型视图 3.4.1ViewBag的不足 3.4.2理解ViewBag、ViewData和ViewDataDictionary 3.5视图模型 3.6添加视图 3.7Razor视图引擎 3.7.1Razor的概念 3.7.2代码表达式 3.7.3HTML编码 3.7.4代码块 3.7.5Razor语法示例 3.7.6布局 3.7.7ViewStart 3.8指定部分视图 3.9小结 第4章模型 4.1为MVCMusicStore建模 4.2为商店管理器构造基架 4.2.1基架的含义 4.2.2基架和实体框架 4.2.3执行基架模板 4.2.4执行基架代码 4.3编辑专辑 4.3.1创建编辑专辑的资源 4.3.2响应编辑时的POST请求 4.4模型绑定 4.4.1DefaultModelBinder 4.4.2显式模型绑定 4.5小结 第5章表单和HTML辅助方法 5.1表单的使用 5.1.1action和method特性 5.1.2GET方法还是POST方法 5.2HTML辅助方法 5.2.1自动编码 5.2.2辅助方法的使用 5.2.3HTML辅助方法的工作原理 5.2.4设置专辑编辑表单 5.2.5添加输入元素 5.2.6辅助方法、模型和视图数据 5.2.7强类型辅助方法 5.2.8辅助方法和模型元数据 5.2.9模板辅助方法 5.2.10辅助方法和ModelState 5.3其他输入辅助方法 5.3.1Html.Hidden 5.3.2Html.Password 5.3.3Html.RadioButton 5.3.4Html.CheckBox 5.4渲染辅助方法 5.4.1Html.ActionLink和Html.RouteLink 5.4.2URL辅助方法 5.4.3Html.Partial和Html.RenderPartial 5.4.4Html.Action和Html.RenderAction 5.5小结 第6章数据注解和验证 6.1为验证注解订单 6.1.1验证注解的使用 6.1.2自定义错误提示消息及其本地化 6.1.3注解的后台原理 6.1.4控制器操作和验证错误 6.2自定义验证逻辑 6.2.1自定义注解 6.2.2IValidatableObject 6.3显示和编辑注解 6.3.1Display 6.3.2ScaffoldColumn 6.3.3DisplayFormat 6.3.4ReadOnly 6.3.5DataType 6.3.6UIHint 6.3.7HiddenInput 6.4小结 第7章成员资格、授权和安全性 7.1安全性:无趣、但极其重要 7.2使用Authorize特性登录 7.2.1保护控制器操作 7.2.2Authorize特性在表单身份验证和AccountController控制器中的用法 7.2.3WindowsAuthentication 7.3要求角色成员使用Authorize特性 7.4扩展用户身份 7.4.1存储额外的用户资料数据 7.4.2持久化控制 7.4.3管理用户和角色 7.5通过OAuth和OpenID的外部登录 7.5.1注册外部登录提供器 7.5.2配置OpenID提供器 7.5.3配置OAuth提供器 7.5.4外部登录的安全性 7.6Web应用程序中的安全向量 7.6.1威胁:跨站脚本 7.6.2威胁:跨站请求伪造 7.6.3威胁:cookie盗窃 7.6.4威胁:重复提交 7.6.5威胁:开放重定向 7.7适当的错误报告和堆栈跟踪 7.7.1使用配置转换 7.7.2在生产环境中使用Retail部署配置 7.7.3使用专门的错误日志系统 7.8安全回顾和有用资源 7.9小结 第8章Ajax 第9章路由 第10章NuGet 第11章ASP.NETWebAPI 第12章应用AngularJS构建单页面应用程序 第13章依赖注入 第14章单元测试 第15章扩展ASP.NETMVC 第16章高级主题 第17章ASP.NETMVC实战:构建NuGet.org网站 17.11小结 附录AASP.NETMVC5.1

2018-07-09

ASP.NET 3.5动态网站开发基础教程源文件

ASP.NET 3.5动态网站开发基础教程源文件

2014-01-23

ASP.NET 3.5动态网站开发基础教程PPT

ASP.NET 3.5动态网站开发基础教程PPT

2014-01-23

21天学通C#所有源代码

21天学通C#源代码

2014-01-23

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除