12 2016 档案
摘要:一、查看MVC版本,决定你有没有必要看这篇文章 打开web.config,看到以下内容 二、添加Controller Controller文件夹 右击-添加-Web API控制器(v2.1),建好后,系统自动创建以下文件: App_Start/WebApiConfig.cs(没有请添加) 三、修改G
阅读全文
posted @ 2016-12-24 10:31
如果声音记得
摘要:using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.IO; using System.Li
阅读全文
posted @ 2016-12-17 11:28
如果声音记得
摘要: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; u...
阅读全文
posted @ 2016-12-17 11:27
如果声音记得
摘要:一、 Controller向View传递数据 1. 使用ViewData传递数据 我们在Controller中定义如下: [csharp] view plain copy print? ViewData[“Message_ViewData”] = “ Hello ViewData!”; [cshar
阅读全文
posted @ 2016-12-17 10:39
如果声音记得
摘要:第一步: 在mysql安装目录中找到my.ini将: #sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" 改为:(如果没有则可直接设置) sql-mode="NO_AUTO_CREATE_USER,NO
阅读全文
摘要:Partial 和RenderPartial:这两个的性质都是一样, 只指把一个个View给镶入进来, 只是回传值有点不一样Partial 回传的一个Object (MvcHtmlString), 回传一个String 把一堆Html给回传出来, 然后写进到主页面上 Partial 和RenderP
阅读全文
摘要:A)什么是RenderBody 根据MSDN的解释(http://msdn.microsoft.com/query/dev10.query?appId=Dev10IDEF1&l=EN-US&k=k(SYSTEM.WEB.WEBPAGES.WEBPAGEBASE.RENDERBODY);k(Targe
阅读全文
摘要:在ASP.NET MVC中,经常会在Controller与View之间传递数据,因此,熟练、灵活的掌握这两层之间的数据传递方法就非常重要。本文从两个方面进行探讨: 一、 Controller向View传递数据 1. 使用ViewData传递数据 我们在Controller中定义如下: [csharp
阅读全文
posted @ 2016-12-03 11:17
如果声音记得
摘要:1、Html.ActionLink("linkText","actionName") 第一个参数:要显示的文本,第二个参数:视图名 例如:<%=Html.ActionLink("跳转到About页面", "About");%> → <a href="/Home/About">跳转到About页面</
阅读全文
posted @ 2016-12-03 11:15
如果声音记得
摘要:修改mysql的root密码后,出现Host 'localhost' is not allowed to connect to this MySQL server 错误。 解决办法: C:\Program Files\MySQL\MySQL Server 5.5\my.ini 在[mysqld]下加
阅读全文

浙公网安备 33010602011771号