随笔分类 -  asp.net mvc

上一页 1 ··· 7 8 9 10 11 12 下一页

[转]Displaying standard DataTables in MVC
摘要:本文转自:http://stackoverflow.com/questions/2243898/displaying-standard-datatables-in-mvcController action:public ActionResult Index(){ ViewData["Message"] = "Welcome to ASP.NET MVC!"; DataTable dt = new DataTable("MyTable"); dt.Columns.Add(new DataColumn("Col1", 阅读全文

posted @ 2014-02-20 18:06 freeliver54 阅读(279) 评论(0) 推荐(0)

.net mvc sample 参考网址
摘要:http://www.asp.net/mvc/sampleshttp://www.asp.net/mvc/tutorials/mvc-music-store/mvc-music-store-part-1http://code.msdn.microsoft.com/MVC-4-Open-Framewo... 阅读全文

posted @ 2013-10-11 09:03 freeliver54 阅读(225) 评论(0) 推荐(0)

[转]MVC自定义数据验证(两个时间的比较)
摘要:本文转自:http://www.cnblogs.com/zhangliangzlee/archive/2012/07/26/2610071.htmlModel:public class ModelDateTime { private const string strErrorNotNull = "*必填项"; [DisplayName("开始时间")] [Required(ErrorMessage = strErrorNotNull)] public DateTime StartDate { get; set; } [... 阅读全文

posted @ 2013-07-23 14:02 freeliver54 阅读(434) 评论(5) 推荐(0)

[转]关于ASP.NET(C#)程序中TEXTBOX下动态DIV跟随[AJAX应用]
摘要:本文转自:http://blog.csdn.net/lolenboy/article/details/1665814说明:环境:ASPNET(c#),SQL2K事例:TEXTBOX下跟随DIV,在TEXTBOX中输入内容,DIV上就显示出相应的查询结果[AJAX],类似于股票输入查询。 页面:一个显示页面(FilialeList);一个后台处理中间文件,一个数据库操作文件,JS操作文件。显示页面FilialeList:关键代码 :调用JS文件//当DIV显示后,点击页面其他地方,DIV隐藏。//输入的代码框和相应的DIV的HTML,注意中间文件(PubGetTxtCode.aspx') 阅读全文

posted @ 2013-07-09 17:58 freeliver54 阅读(872) 评论(0) 推荐(0)

[转]Asp.Net MVC 扩展联想控件
摘要:本文转自:http://www.cnblogs.com/bright-lin/archive/2013/02/06/MVC_SuggestBox.html在web中,为改善用户体验,我们常会将一些文本输入框做成智能联想,以让用户更快更准确的输入内容。大概是这样的:当用户开始在文本框输入时,客户端脚本ajax向服务端发起请求,服务端从数据库读取返回数据,客户端解析数据附加在文本框的下拉div中供用户选择参考。在MVC中我们可以通过扩展HtmlHelper来封装自己写的控件,以便在整个项目中像使用 Html.TextBox("") 一样来使用自定义控件。扩展代码如下View C 阅读全文

posted @ 2013-07-09 14:52 freeliver54 阅读(320) 评论(0) 推荐(0)

[转]ASP.NET MVC Select List Example
摘要:本文转自:http://www.aspnetmvcninja.com/views/asp-net-mvc-select-list-exampleSelect lists are a great way to allow users to select multiple options from a long list of possible values. But how do you implement a select list in ASP.NET MVC? Luckily ASP.NET MVC does most of the heavy lifting for you. For t 阅读全文

posted @ 2013-07-05 18:45 freeliver54 阅读(2331) 评论(4) 推荐(0)

[引]ASP.NET MVC 4 Content Map
摘要:本文转自:http://msdn.microsoft.com/en-us/library/gg416514(v=vs.108).aspxThe Model-View-Controller (MVC) pattern is an architectural design principle that separates the components of a Web application. This separation gives you more control over the individual parts of the application, which lets you mor 阅读全文

posted @ 2013-07-04 10:09 freeliver54 阅读(711) 评论(0) 推荐(0)

[转]ASP.NET MVC 2: Model Validation
摘要:本文转自:http://weblogs.asp.net/scottgu/archive/2010/01/15/asp-net-mvc-2-model-validation.aspx?CommentPosted=true[In addition to blogging, I am also now using Twitter for quick updates and to share links. Follow me at: twitter.com/scottgu]This is the second in a series of blog posts I’m doing on the upc 阅读全文

posted @ 2013-07-04 10:04 freeliver54 阅读(753) 评论(1) 推荐(0)

[转]ASP.NET MVC中你必须知道的13个扩展点
摘要:本文转自:http://www.cnblogs.com/ejiyuan/archive/2010/03/09/1681442.htmlScottGu在其最新的博文中推荐了Simone Chiaretta的文章13 ASP.NET MVC extensibility points you have to know,该文章为我们简单介绍了ASP.NET MVC中的13个扩展点。Keyvan Nayyeri(与Simone合著了Beginning ASP.NET MVC 1.0一书)又陆续发表了一些文章,对这13个扩展点分别进行深入的讨论。我将在以后的随笔中对这些文章逐一进行翻译,希望能对大家有所帮 阅读全文

posted @ 2013-07-04 09:47 freeliver54 阅读(285) 评论(0) 推荐(0)

[转]Best way to sort a DropDownList in MVC3 / Razor using helper method
摘要:本文转自:http://stackoverflow.com/questions/7223185/best-way-to-sort-a-dropdownlist-in-mvc3-razor-using-helper-methodThe first and most important part of your code would be to get rid of any ViewBag/ViewData (which I personally consider as cancer for MVC applications) and use view models and strongly ty 阅读全文

posted @ 2013-07-04 09:42 freeliver54 阅读(378) 评论(1) 推荐(0)

[转]Creating Unit Tests for ASP.NET MVC Applications (C#)
摘要:本文转自:http://www.asp.net/mvc/tutorials/older-versions/unit-testing/creating-unit-tests-for-asp-net-mvc-applications-csThe goal of this tutorial is to demonstrate how you can write unit tests for the controllers in your ASP.NET MVC applications. We discuss how to build three different types of unit te 阅读全文

posted @ 2013-06-17 16:45 freeliver54 阅读(335) 评论(0) 推荐(0)

[转]如何在.NET MVC中使用jQuery并返回JSON数据
摘要:本文转自:http://blog.sina.com.cn/s/blog_48e42dc90100xp1p.html二、开始实践 - jQuery端假设我们要从服务器端获取一个文章列表,并把文章条目显示在页面中,而加载的过程要用ajax实现,即实现异步加载。那么我们先来完成jquery向服务器端发出ajax请求,并根据服务器响应来重组DOM从而实现文章在页面上显示。这里,和.NET MVC没有多大关系。具体的jquery代码如下:123456789101112$.ajax({ url: '/cgi/getArtical', //请求的某个action的地址 datatype: & 阅读全文

posted @ 2013-06-17 14:01 freeliver54 阅读(480) 评论(0) 推荐(0)

[转]Asp.net MVC 中Controller返回值类型ActionResult
摘要:本文转自:http://blog.csdn.net/pasic/article/details/7110134Asp.net MVC中Controller返回值类型在mvc中所有的controller类都必须使用"Controller"后缀来命名 并且对Action也有一定的要求:必须是一个public方法必须是实例方法没有标志NonActionAttribute特性的(NoAction)不能被重载必须返回ActionResult类型如:[csharp] view plaincopyprint?publicclass MyController : Controller { 阅读全文

posted @ 2013-06-06 15:59 freeliver54 阅读(7018) 评论(0) 推荐(0)

[转]MVC中如何使用RDLC报表
摘要:本文转自:http://www.cnblogs.com/BlueWoods/archive/2009/04/27/1444311.html在用MVC开发项目的时候遇到了一个问题,如何运用RDLC报表?首先想到的是在Controller返回DataSet,然后在View绑定值,但是遇到一个异常:...控件是只读的.但是我们在IIS6.0里面配置MVC的时候,发现mvc解析的dll和SASPx是一样的,所以View的生命周期也是ASPX一样,又在网上查了查,找到了一个很好的解决办法,就是在View写通过<script>funciton Page_Load(Object sender,E 阅读全文

posted @ 2013-06-06 11:52 freeliver54 阅读(347) 评论(0) 推荐(0)

[转]在Asp.net MVC中使用Rdlc输出文件
摘要:本文转自:http://blog.csdn.net/ycz815/article/details/6934653The following post shows you how to render an RDLC (Client Report Definition File) in a MVC project. For this tutorial, I am using VS 2008 with MVC 2 Beta. I will also be using the priceless Northwind database and the report will contain a list 阅读全文

posted @ 2013-06-05 11:43 freeliver54 阅读(3192) 评论(0) 推荐(0)

[转]MVC 3.0 在各个版本IIS中的部署
摘要:本文转自:http://www.cnblogs.com/xiongpq/archive/2011/05/25/2057445.html概述:最近在做一个MVC 3的项目,在部署服务器时破费了一番功夫,特将过程整理下来,希望可以帮到大家!本文主要介绍在IIS5.1、IIS6.0、IIS7.5中安装配置MVC 3的具体办法!正文:IIS5.11. 安装Microsoft .net FrameWork 4.0安装包;2. 安装ASP.NET MVC 3;3. 在IIS中发布网站,创建虚拟目录,ASP.NET版本选择4.0.30196;4. 添加MVC的解析:右击IIS中的虚拟目录选择“属性”-“虚拟 阅读全文

posted @ 2013-05-23 09:34 freeliver54 阅读(362) 评论(0) 推荐(0)

[转]ASP.NET MVC验证码
摘要:本文转自:http://www.rczjp.cn/ArticleShow.aspx?ID=549改编以下原来的GOOGLE验证码,由于是MVC,故返回类型是FileContentResult using System;using System.Drawing;using System.Web.Mvc... 阅读全文

posted @ 2013-05-17 08:31 freeliver54 阅读(3694) 评论(1) 推荐(0)

[转]Asp.NET MVC3 + Ajax 实现多文件上传
摘要:本文转自:http://hi.baidu.com/softworm/item/ed0aa753df00373094eb05cfHTML123456<form id="form1" name="form1"> <input type="file" name="fileToUpload" id="fileToUpload" multiple="multiple" /> <progress id="progressBar" valu 阅读全文

posted @ 2013-05-15 13:42 freeliver54 阅读(4556) 评论(1) 推荐(1)

[转]asp.net mvc3 简单的文件上传下载
摘要:本文转自:http://www.cnblogs.com/kaixing/archive/2011/11/10/2244634.htmlweb.config配置 <add name="连接字符串" connectionString="data source=服务器名;Initial Catalog=数据库;Persist Security Info=True;User ID=用户名;Password=密码" providerName="System.Data.SqlClient" /> 建立数据库、表就省略了·&# 阅读全文

posted @ 2013-05-15 13:39 freeliver54 阅读(6050) 评论(0) 推荐(0)

[转]使用jQuery.ajax傳送物件陣列給ASP.NET MVC
摘要:本文转自:http://blog.darkthread.net/post-2012-06-23-post-array-to-mvc-with-jquery-ajax.aspx在ASP.NET MVC裡,我們可以用物件集合當成Action的傳入參數,例如以下範例:排版顯示純文字複製文字using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.Mvc; namespace MvcMobileLab.Controllers{ public class Aja... 阅读全文

posted @ 2013-05-15 12:46 freeliver54 阅读(549) 评论(0) 推荐(0)

上一页 1 ··· 7 8 9 10 11 12 下一页

导航