`
suizhikuo
  • 浏览: 27167 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论
文章列表
SQL模糊查询,使用like比较字,加上SQL里的通配符,请参考以下: 1、LIKE'Mc%' 将搜索以字母 Mc 开头的所有字符串(如 McBadden)。 2、LIKE'%inger' 将搜索以字母 inger 结尾的所有字符串(如 Ringer、Stringer)。 3、LIKE'%en%' 将搜索在任何位置包含字母 en 的所有字符串(如 Bennet、Green、McBadden)。 4、LIKE'_heryl' 将搜索以字母 heryl 结尾的所有六个字母的名称(如 Cheryl、Sheryl)。 5、LIKE'[CK]ars[eo]n' 将搜索下列字符串:Ca ...
SQL省市区三级表 -- 表的结构 areaDROP TABLE area;CREATE TABLE area ( id int NOT NULL , areaID int NOT NULL, area varchar(200) NOT NULL, fatherID int NOT NULL, PRIMARY KEY (id) ) DROP TABLE city;CREATE TABLE city ( id int NOT NULL , cityID int NOT NULL, city varchar(200) NOT NULL, fatherID int NOT NULL, PRI ...
SQL省市区三级表 -- 表的结构 areaDROP TABLE area;CREATE TABLE area ( id int NOT NULL , areaID int NOT NULL, area varchar(200) NOT NULL, fatherID int NOT NULL, PRIMARY KEY (id) ) DROP TABLE city;CREATE TABLE city ( id int NOT NULL , cityID int NOT NULL, city varchar(200) NOT NULL, fatherID int NOT NULL, PRI ...
Implementing Edit, Details, and Delete Views Open the Movie controller and add the following Details method: public ActionResult Details(int id) { Movie movie = db.Movies.Find(id); if(movie == null) return RedirectToAction("Index"); return View("Details", movie); ...
Implementing Edit, Details, and Delete Views Open the Movie controller and add the following Details method: public ActionResult Details(int id) { Movie movie = db.Movies.Find(id); if(movie == null) return RedirectToAction("Index"); return View("Details", movie); ...
Adding a New Field to the Movie Model and Table In this section you'll see how easy it is to evolve the schema of our database by simply adding another field to the Movie class. Open the Movie class and add a Rating property (column) that has a StringLength attribute applied to it: [StringLength(5) ...
Adding a New Field to the Movie Model and Table In this section you'll see how easy it is to evolve the schema of our database by simply adding another field to the Movie class. Open the Movie class and add a Rating property (column) that has a StringLength attribute applied to it: [StringLength(5) ...
Adding Validation to the Model In this section we're going to implement the support necessary to enable input validation in the application. We'll ensure that database content is correct and provide helpful error messages to end users when they try to enter movie data that isn't valid. We'll begin b ...
Adding Validation to the Model In this section we're going to implement the support necessary to enable input validation in the application. We'll ensure that database content is correct and provide helpful error messages to end users when they try to enter movie data that isn't valid. We'll begin b ...
Accessing your Model's Data from a Controller In this section, you'll create a new MoviesController class and write code that retrieves the movie data and displays it in the browser using a view template. Right-click the Controllers folder and make a new MoviesController class. This creates a n ...
Entity Framework Code-First Development The Entity Framework version 4 supports a development paradigm called code-first. Code-first allows you to create model object by writing simple classes (also known as POCO, from "plain-old CLR objects") and have the database created on the fly from ...
Adding a View In this section we're going to modify the HelloWorldController class to use a view template file to cleanly encapsulate the process of generating HTML responses to a client. Let's start by using a view template with the Index method in the HelloWorldController class. Currently the Ind ...
Adding a Controller MVC stands for model-view-controller. MVC is a pattern for developing applications such that each part has a separate responsibility: Model: The data for your application. Views: The template files your application will use to dynamically generate HTML responses. Controller ...
This tutorial will teach you the basics of building an ASP.NET MVC Web application using Microsoft Visual Web Developer Express, which is a free version of Microsoft Visual Studio. Before you start, make sure you have the prerequisites listed above installed using the Web Platform Installer. You'l ...
XMLHttpRequest 对象  XMLHttpRequest可以提供不重新加载页面的情况下更新网页,在页面一加载后在服务器端请求数据,在页面加载后在服务器端接受数据,在后台向服务器发送数据。   XMLHttpRequest 对象提供了对 HTTP 协议的完全的访问,包括做出 POST 和 HEAD 请求以及普通的 GET 请求的能力。XMLHttpRequest 可以同步或异步地返回 Web 服务器的响应,并且能够以文本或者一个 DOM 文档的形式返回内容。   尽管名为 XMLHttpRequest,它并不限于和 XML 文档一起使用:它可以接收任何形式的文本文档。   X ...
Global site tag (gtag.js) - Google Analytics