04 2013 档案
摘要:.NET Page 事件的执行顺序using System;using System.Data;using System.Configuration;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;public partial class _Default : Page { protected vo...
阅读全文
摘要:自定义 ASP.NET UpdatePanel 控件的错误处理.NET Framework 4 其他版本 此主题尚未评级 - 评价此主题如果在 UpdatePanel 控件中更新部分页时发生错误,则默认行为是显示带有错误消息的浏览器消息框。 本教程将向您演示如何自定义向用户显示错误的方式以及如何自定义错误消息。系统必备若要在您自己的开发环境中实现这些过程,您需要:Microsoft Visual Studio 2005 或 Microsoft Visual Web Developer 速成版。一个支持 AJAX 的 ASP.NET 网站。在服务器代码中自定义错误处理首先,您将通过使用页面中的服
阅读全文
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using System.Data;using CRM.BusinessLogic;using CRM.BusinessLogic.ManageTopDB;using CRM.Common.Utils;using CRM.BusinessLogic.ManageContract;using CRM.BusinessLogic.Man
阅读全文
摘要:mGroupPriceStandards.Skip(mStart * mLimt).Take(mLimt).ToList<PriceStandard>();在分页的时候必须先 Skip(跳过n条记录),然后再 Take(取n条记录),否则分页会出现错误,导致数据取不出来或取出来的数据不是预期要获取的数据。
阅读全文
摘要:Reapter 控件 要先绑定数据后才能取到 Reapter里面的控件
阅读全文
摘要:DataTable dt = GetKeywordsStatistic(nick, campaign_id, adgroup_id, beginTime, endTime); DataRow dr = dt.Select(string.Format("keyword_id = {0}", Convert.ToInt64(EnumKeywordId.NoSearch))).SingleOrDefault(); DataTable dtRes = dt.Clone(); //复制结构 DataTable dtRes = dt.Cop...
阅读全文
摘要:使用LINQ to Entities一不小心就会碰上类似的错误:引用内容。LINQ to Entities 不识别方法“XX”,因此该方法无法转换为存储表达式总结了下,出现这种错误情形大体分为两种,下边分别举例并说下解决方法。情形一报错代码:复制内容到剪贴板程序代码string age = "20";var query = from item in context.Peoplewhere item.Age == int.Parse(age)select item;这边age是一个外部值,试图中LINQ to Entities中类型转化,不支持,所以报错,只需在LINQ to
阅读全文
摘要:private static Regex regex = new Regex("<(\\w+?)[ >]", RegexOptions.Compiled); private string GetRootElement(string body){ Match match = regex.Match(body); if (match.Success) { return match.Groups[1].ToString(); } else { throw new TopExcept...
阅读全文
摘要:public static string SignTopRequest(IDictionary<string, string> parameters, string secret, bool qhs) { // 第一步:把字典按Key的字母顺序排序 IDictionary<string, string> sortedParams = new SortedDictionary<string, string>(parameters); IEnumerator<KeyValuePair<string, string>> ...
阅读全文
摘要://是将实体对象转化为xml文件的过程using System;using System.IO;using System.Xml.Serialization;// This is the class that will be serialized.public class OrderedItem{ public string ItemName; public string Description; public decimal UnitPrice; public int Quantity; public decimal LineTotal; // A custom me...
阅读全文
摘要://是将xml文件转化为实体对象的过程using System;using System.IO;using System.Xml.Serialization;// This is the class that will be deserialized.public class OrderedItem{ [XmlElement(Namespace = "http://www.cpandl.com")] public string ItemName; [XmlElement(Namespace = "http://www.cpandl.com")] publ
阅读全文

浙公网安备 33010602011771号