摘要: 默认情况下,ASP.NET 不允许任何 STA COM 组件在页面内运行。若要运行它们,必须在 .aspx 文件内将 ASPCompat=true 属性包含在 @ Page 指令中。这样就将执行用的线程池切换到 STA 线程池,而且使 HttpContext 和其他内置对象可用于 COM 对象。前者也是一种性能优化,因为它避免了将多线程单元 (MTA) 封送到 STA 线程的任何调用。 使用 STA COM 组件可能大大损害性能,应尽量避免。若必须使用 STA COM 组件,如在任何 interop 方案中,则应在执行期间进行大量调用并在每次调用期间发送尽可能多的信息。另外,小心不要在构造.. 阅读全文
posted @ 2013-10-28 11:17 Follow-your-heart 阅读(413) 评论(0) 推荐(0) 编辑
摘要: Jquery选择多个Class属性: $('.className1,.className2,.className4,.className5') 阅读全文
posted @ 2013-10-21 12:00 Follow-your-heart 阅读(265) 评论(0) 推荐(0) 编辑
摘要: var tabs_Count=document.getElementById("tabs-panels").getElementsByTagName("div").length; var genTab_PanelID=null; for(var i=0;i<tabs_Count;i++) { genTab_PanelID=document.getElementById("tabs-panels").getElementsByTagName("div")[i].id; ... 阅读全文
posted @ 2013-10-18 10:01 Follow-your-heart 阅读(658) 评论(0) 推荐(0) 编辑
摘要: parent.document.getElementById("ctl00_ContentPlaceHolder1_txt_name").value="";ASP.NET获取ID总结:1、用户控件中的服务器控件:这个时候Javascript捕获控件ID的时候要加上用户控件的名称,例如:服务器控件名:txtName;用户控件名:RegisterUser;那么Javascript得到控件ID的方式应该是:varid=document.getElementById("RegisterUser1_txt_name");2、页面中存在母版页:( 阅读全文
posted @ 2013-09-18 15:44 Follow-your-heart 阅读(390) 评论(0) 推荐(0) 编辑
摘要: 把你目前查到结果集定义为一个临时表 tempTable下面是如何查 SELECT * FROM tempTable where 关键字=‘’举例select book_num,book_name,book_type from(select * from bookinfo ) as temptable where book_num=2 阅读全文
posted @ 2013-08-21 10:37 Follow-your-heart 阅读(948) 评论(0) 推荐(0) 编辑
摘要: DateTime dt = DateTime.Now; int weeknow = Convert.ToInt32(DateTime.Now.DayOfWeek); int dayspan = (-1) * weeknow + 1; DateTime dt2 = dt.AddMonths(1); //获取本周第一天 this.Label1.Text = DateTime.Now.AddDays(dayspan).ToString("yyyy-MM-dd"); //本月第一天 thi... 阅读全文
posted @ 2013-07-30 10:58 Follow-your-heart 阅读(718) 评论(0) 推荐(0) 编辑
摘要: 前台js方法(写在head标签之内)1 后台方法。我选用的是一个LinkButtonprotected void LinkButton2_Click(object sender, EventArgs e) { int count = 0; for (int i = 0; i <= GridView1.Rows.Count - 1; i++) { CheckBox cbox = (CheckBox)GridView1.Rows[i].FindControl("cbSelect"); if... 阅读全文
posted @ 2013-07-24 09:00 Follow-your-heart 阅读(533) 评论(0) 推荐(0) 编辑
摘要: IComparable:一种特定于类型的通用比较方法,值类型或类通过实现此方法对特认定进行排序。IComparable的作用是提供了一种比较两个对象的特定类型的方法。这是必需的如果您想要为对象提供任何排序功能。视为IComparable提供您的对象的默认排序次序。例如对于如果您有一个您的类型的对象的数组,并在该数组上调用Sort方法IComparable在排序过程中提供对象的比较。实现IComparable接口时, 必须实现CompareTo方法此接口由具有可排序值的类型实现。它要求实现类型定义单个方法CompareTo,该方法指示当前实例在排序顺序中的位置是位于同一类型的另一个对象之前、之. 阅读全文
posted @ 2013-07-18 14:12 Follow-your-heart 阅读(360) 评论(0) 推荐(0) 编辑
摘要: C#中类型Type有个GetMethod方法,调用该方法可获取指定方法名的方法信息实例。使用时,其参数一般为2个,一个是方法名称字符串(可设置条件忽略大小写),另外一个参数为搜索方法的条件枚举。该方法返回的是MethodInfo类型的实例,获取到了这个实例之后,我们就可以调用并执行该方法了。MethodInfo method = type.GetMethod( funcName , BindingFlags.IgnoreCase | BindingFlags.Static | BindingFlags.Public );这里要注意,搜索条件枚举,即第2个参数,要包含BindingFlags.P 阅读全文
posted @ 2013-07-18 14:06 Follow-your-heart 阅读(3587) 评论(0) 推荐(0) 编辑
摘要: 无标题页 --%> 从 至 阅读全文
posted @ 2013-07-17 16:50 Follow-your-heart 阅读(478) 评论(0) 推荐(0) 编辑