自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

SalmonellaVaccine的专栏

不走弯路,也就错过了风景。无论如何,感谢经历。

  • 博客(60)
  • 收藏
  • 关注

转载 Returning unescaped Json in MVC with Json.Net

The object is already serialized by Json.NET, and when you pass it to Json() it gets encoded twice. If you must use Json.NET instead of the built in encoder, then the ideal way to handle this would be

2014-06-28 02:45:05 1027

转载 FadeIn and FadeOut

http://stackoverflow.com/questions/10942098/simple-fadein-and-visibility-in-jquery

2014-06-28 02:39:32 558

原创 C# WebAPI with HttpWebRequest, HttpWebResponse and HttpContext Example

Send HttpWebRequest from the client to the server:private string SendDatawithJson(Job job) { string jsonString = JsonConvert.SerializeObject(job); //url get it from c

2014-06-28 02:08:15 1950

转载 Parse Json Array String to C# Object Array

http://stackoverflow.com/questions/9586585/convert-json-to-a-c-sharp-arrayjust take the string and use the JavaScriptSerializer to deserialize it into a native object. For example, having this j

2014-06-28 01:53:34 1362

转载 HttpWebRequest GET in C#

HttpWebRequest myHttpWebRequest = null; //Declare an HTTP-specific implementation of the WebRequest class. HttpWebResponse myHttpWebResponse = null; //Declare an HTTP-specific implem

2014-06-27 23:44:01 563

转载 Entity Framework Code First - Stop autoincrement and use my Primary Key

http://social.msdn.microsoft.com/Forums/en-US/648f9f5f-b844-48cb-85c3-74c8f2ee87cc/entity-framework-code-first-stop-autoincrement-and-use-my-primary-keyAdd the following attribute to the Primary K

2014-06-27 01:23:18 846

转载 Using CSS for Image Borders

http://css-tricks.com/using-css-for-image-borders/The following is a Guest Post written by Volkan Görgülü. Thanks Volkan!The picture used in this article, The Solitude of the Fisherman,

2014-06-27 00:46:08 652

转载 HTML Select Tag Operations

http://stackoverflow.com/questions/208421/render-partial-from-different-folder-not-shared selected disabled>Choose one value="sydney">Sydney value="melbourne">Melbourne v

2014-06-26 00:20:55 631

转载 Render partial from different folder (not shared)

http://stackoverflow.com/questions/208421/render-partial-from-different-folder-not-sharedJust include the path to the view, with the file extension.Razor:@Html.Partial("~/Views/AnotherFo

2014-06-26 00:16:36 599

转载 XHTML和HTML的区别

http://blog.csdn.net/linux_dd/article/details/54049301.所有的标记都必须要有一个相应的结束标记   以前在HTML中,你可以打开许多标签,例如和而不一定写对应的   和来关闭它们。但在XHTML中这是不合法的。XHTML要求有严谨的结构,所有标签必须关闭。如果是单独不成对的标签,   在标签最后加一个"/"来关闭

2014-06-26 00:13:41 459

转载 Provisioning a SQL Server Virtual Machine on Azure

http://azure.microsoft.com/en-us/documentation/articles/virtual-machines-provision-sql-server/The Azure virtual machine gallery includes several images that contain Microsoft SQL Server. You c

2014-06-26 00:11:02 984

转载 HOW? Controller return nothing/current view

http://stackoverflow.com/questions/579390/how-controller-return-nothing-current-viewYou can return an EmptyResult if you want it to do nothing...return new EmptyResult();If you're using

2014-06-25 05:11:58 457

转载 Can a DateTime be null?

http://stackoverflow.com/questions/3635678/can-a-datetime-be-nullDateTime? myDate = null;The question mark will give you a nullable type. The one that can either be set to its native value

2014-06-25 05:10:19 515

转载 Can I have fixed typed ArrayList in C#, just like C++?

http://stackoverflow.com/questions/2360747/can-i-have-fixed-typed-arraylist-in-c-just-like-cYou could use a List. The List class takes advantage of generics to make a strongly typed collec

2014-06-25 05:07:36 557

转载 Lambda Expression of Select * from TableName

The lambda expression isn't needed:var res = db.StudentDatas;You could use one but it would be rather pointless:var res = db.StudentDatas.Select(s => s);

2014-06-25 05:07:05 586

转载 Can we call the Method of a controller from another controller in asp.net MVC?

http://stackoverflow.com/questions/2910948/can-we-call-the-method-of-a-controller-from-another-controller-in-asp-net-mvcpublic class ThisController { public ActionResult Index() { var othe

2014-06-25 05:05:59 653

转载 Sending E-mail using C#

http://stackoverflow.com/questions/449887/sending-e-mail-using-c-sharpusing System.Net;using System.Net.Mail;using System.Net.Mime;...try{ SmtpClient mySmtpClient = new SmtpClient("my.

2014-06-25 05:05:12 1181

转载 How to make two <div>…</div> in the same row?

display:inline-block;

2014-06-25 05:04:29 529

转载 http://www.cnblogs.com/pato/archive/2011/08/15/2139705.html

http://www.cnblogs.com/pato/archive/2011/08/15/2139705.htmlEnum为枚举提供基类,其基础类型可以是除 Char 外的任何整型。如果没有显式声明基础类型,则使用 Int32。编程语言通常提供语法来声明由一组已命名的常数和它们的值组成的枚举。注意:枚举类型的基类型是除 Char 外的任何整型,所以枚举类型的值是整型

2014-06-25 03:22:31 988

转载 C#发送邮件三种方法,Localhost,SMTP,SSL-SMTP

http://yeak2001.iteye.com/blog/859770通过.Net FrameWork 2.0下提供的“System.Net.Mail”可以轻松的实现,本文列举了3种途径来发送: 1.通过Localhost; 2.通过普通SMTP; 3.通过SSL的SMTP; 下面一个一个来说: 1.通过LocalHost C#代码  

2014-06-25 03:20:12 1403

转载 JQuery UI Datepicker

1. Set Date Formathttp://stackoverflow.com/questions/1328025/jquery-ui-datepicker-change-date-format$( ".selector" ).datepicker({ dateFormat: 'yy-mm-dd' });2.

2014-06-20 01:02:24 511

转载 If statement inside div tag with Razor MVC3

http://stackoverflow.com/questions/6356234/if-statement-inside-div-tag-with-razor-mvc3div class='eventDay @(e.Value.Count>

2014-06-20 00:40:34 628

转载 select all child elements in CSS

http://stackoverflow.com/questions/4910077/select-all-child-elementsdiv.dropdown *

2014-06-20 00:31:00 555

转载 How to pass javascript complex object to ASP.NET Web Api and MVC

ASP.NET Web API is one of the most powerful recent addition to ASP.NET framework. Sometimes, you have to post a form data using jQuery-JSON to Web API or MVC method, which have so many input fields. P

2014-06-17 03:09:23 1060

转载 jQuery ajax请求错误返回status 0和错误error的问题

http://www.cnblogs.com/Mainz/p/3506956.html上周发现一个jQuery ajax请求错误返回status 0和错误error的问题,responseText是"error",状态码是0而不是200:$.ajax({ type: "POST", beforeSend: function(xhr

2014-06-17 00:01:59 1752

转载 LINQ Where with AND OR condition

http://stackoverflow.com/questions/1719488/linq-where-with-and-or-conditionfrom item in db.vw_Dropship_OrderItems where (listStatus != null ? listStatus.Contains(item.StatusCode) : true) &&

2014-06-13 23:27:20 552

转载 Customizing Routes in ASP.NET MVC

http://www.codeproject.com/Articles/641783/Customizing-Routes-in-ASP-NET-MVCRouting is one of the primary aspects of the MVC framework which makes MVC what it is. While that is possibly over-sim

2014-06-13 01:08:25 810

转载 Func<T1, T2, TResult> 泛型委托

http://zhidao.baidu.com/question/202155648.html委托 可以定义自己的类型参数。引用泛型委托的代码可以指定类型参数以创建已关闭的构造类型,就像实例化泛型类或调用泛型方法一样.封装一个具有两个参数并返回 TResult 参数指定的类型值的方法。public delegate TResult Func(T1 arg1,T2 arg2) ;

2014-06-13 01:06:03 560

转载 LINQ to SQL语句之Join

http://tech.ddvip.com/2008-10/122386953877206.htmlJoin操作符  适用场景:在我们表关系中有一对一关系,一对多关系,多对多关系等。对各个表之间的关系,就用这些实现对多个表的操作。  说明:在Join操作中,分别为Join(Join查询), SelectMany(Select一对多选择)和GroupJoin(分组Jo

2014-06-13 01:05:14 503

转载 DefaultIfEmpty and Left Outer Join

http://www.xmaspx.com/u/guitarpark/Blog.aspx/t-19 DefaultIfEmpty函数:若指定数据源为空的时候,返回一个默认值,此函数延时加载。例:int[] ints = { 1, 2, 3, 4, 5, 6 }; var result = ints.DefaultIfEmpty(); fore

2014-06-13 01:00:32 882

原创 Join and Query in Linq

public IQueryable Load(int jobId, bool isCurrJob) { var JobStatus = from job in dbContext.Jobs join status in dbContext.Statuses

2014-06-13 00:57:05 602

转载 Add id to <td>/<tr> in Razor

@foreach (var item in Model) { @item.id @item.name

2014-06-12 01:04:17 517

转载 Remove the default value from numeric textbox in MVC4

http://stackoverflow.com/questions/15646074/remove-default-0-from-numeric-textboxChange model property type to nullable: public int? RackNumber {get;set;}

2014-06-11 02:59:41 427

转载 Get date without time in C#

http://stackoverflow.com/questions/6817266/get-current-date-only-in-c-sharp

2014-06-11 02:18:46 558

转载 Add multiple models in one view in MVC4

http://forums.asp.net/t/1811419.aspx?2+Models+1+View+Or+multiple+Models+

2014-06-11 02:02:46 690

转载 Running a function on multiple elements using Jquery .each()

http://stackoverflow.com/questions/1241509/running-a-function-on-multiple-elements-using-jquery

2014-06-11 01:10:22 533

转载 Passing multiple POST parameters to Web API Controller Methods

http://weblog.west-wind.com/posts/2012/May/08/Passing-multiple-POST-parameters-to-Web-API-Controller-MethodsASP.NET Web API introduces a new API for creating REST APIs and making AJAX callbacks

2014-06-10 23:30:25 1270

转载 jQuery Ajax GET and POST calls to Controller's Method in MVC

http://www.itorian.com/2013/02/jquery-ajax-get-and-post-calls-to.htmlIn this blog post I am going to cover some really interesting stuff which is very useful today in web application developments. Y

2014-06-10 23:29:38 1036

转载 Getting index value on razor foreach

http://stackoverflow.com/questions/10326406/getting-index-value-on-razor-foreach @{int i = 0;} @foreach(var myItem in Model.Members) { @ispan> i++; }

2014-06-10 23:28:11 707

转载 ASP.NET MVC4 菜鸟项目之路(一)改造示例代码扩展用户信息管理

模板创建示例项目MVC的基础内容我就不说了,入门建议看看官方的MvcMovie示例。提供个链接(共9篇):http://www.cnblogs.com/powertoolsteam/archive/2012/11/01/2749906.html      打开VS2012,【新建项目】,选择【ASP.NET MVC 4 Web应用程序】,名称叫MyMvc(这随便取,但常规是

2014-06-10 23:26:55 2239

空空如也

空空如也

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

TA关注的人

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