06 2014 档案
摘要:JSONP可以帮我们解决跨域访问的问题。JSONP is JSON With Padding. 这里我们将不再解释其原理。我们来看在ASP.NET MVC 3 如何实现。首先我们需要定义一个JsonpResult. 代码像这样, 直接继承自JsonResult, override了ExecuteRe...
阅读全文
摘要:注:result.Columns.Add(pi.Name, pi.PropertyType); 可能会出现 DataSet 不支持 System.Nullable的错误。 需改成:result.Columns.Add(pi.Name);命名空间:using System.Reflection; //...
阅读全文
摘要:function GetAll() { location.replace(location.href); //用这个方法可以刷新ie页面不会出现。 }
阅读全文