上一页 1 2 3 4 5 6 7 8 ··· 16 下一页
  2020年2月4日
摘要: 1.委托(delegate)调用静态方法 委托类似于C++中的函数指针。 某方法仅仅在执行的时候才能确定是否被调用。 是实现事件和回调函数的基础。 面向对象,安全性高. using System; using System.IO; namespace IO { class Program { // 阅读全文
posted @ 2020-02-04 17:41 Tanqurey 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 1. c# 索引器(indexer) using System; using System.IO; namespace IO { class Program { private string[] nameList = new string[10]; static void Main(string[] 阅读全文
posted @ 2020-02-04 15:14 Tanqurey 阅读(90) 评论(0) 推荐(0) 编辑
  2020年2月2日
摘要: 1. 讲解ASP.net MVC的I/O操作 新建一个控制台程序,输入代码如下 using System; using System.IO; namespace IO { class Program { static void Main(string[] args) { // 判断文件是否存在 Co 阅读全文
posted @ 2020-02-02 17:17 Tanqurey 阅读(158) 评论(0) 推荐(0) 编辑
  2020年1月30日
摘要: 1.校验机制 我们可以在Model中使用属性进行校验 using System; using System.ComponentModel.DataAnnotations; using System.Data.Entity; namespace MvcMovie.Models { public cla 阅读全文
posted @ 2020-01-30 21:53 Tanqurey 阅读(154) 评论(0) 推荐(0) 编辑
  2020年1月29日
摘要: 1. 添加搜索功能 如何实现url添加查询字符串实现查询指定项目的功能? 来到MovisController,修改Index方法如下 public ActionResult Index(string queryString) { var movies = from m in db.Movies se 阅读全文
posted @ 2020-01-29 12:39 Tanqurey 阅读(134) 评论(0) 推荐(0) 编辑
  2020年1月28日
摘要: 1. 从页面到action 讲述controller与View之间的具体运作关系 在上次添加的名为Movie的Model内添加 下面我们尝试为该model内的属性添加attribute 具体修改如下: using System; using System.ComponentModel.DataAnn 阅读全文
posted @ 2020-01-28 10:36 Tanqurey 阅读(171) 评论(0) 推荐(0) 编辑
  2020年1月18日
摘要: 1.添加model model 的作用是什么? 处理项目的数据模型,与数据库交互 .net推荐的处理数据的方式:使用 idd framework 1)新建model 右键models文件夹,选择添加,选择类,命名好后就生成一个类。 之后为其添加一些属性,举例如下: Movie数据类型 using S 阅读全文
posted @ 2020-01-18 17:36 Tanqurey 阅读(110) 评论(0) 推荐(0) 编辑
  2020年1月16日
摘要: 1. 添加View 1)在添加完Controller生成的View目录右键新建,添加名称,选择模板, 下边可以选择一个Layout布局页,选择shared共享的布局 2) 在之前的路由中为我们直接返回的是字符串,这次把类型改回为原来的 ActionResult,并返回View()方法,View方法会 阅读全文
posted @ 2020-01-16 19:04 Tanqurey 阅读(100) 评论(0) 推荐(0) 编辑
  2020年1月13日
摘要: 1.Controller 1) 添加: 在Controller目录右键进行添加,出现很多模式供选择,选择空的Controller,命名后新建。新建后Views 目录将同步生成相应名称的视图文件目录 均继承于Controller类 控制器内的方法默认返回ActionResultl类型,可自行修改 修改 阅读全文
posted @ 2020-01-13 22:41 Tanqurey 阅读(104) 评论(0) 推荐(0) 编辑
摘要: 1.asp.net 1)简介: asp.net是一个web框架,用于构建网站或网络应用 2)功能 创建网站,web api, 2.asp.net webform 1) 简介 基于控件和事件驱动,基于模块的开发方式。 入门简单。过渡平滑 快速开发 缺陷:代码架构不利于维护,不利于单元测试 重用性差 3 阅读全文
posted @ 2020-01-13 10:49 Tanqurey 阅读(192) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 16 下一页