摘要: SELECT 语句的处理顺序FROMONJOINWHEREGROUP BYWITH CUBE 或 WITH ROLLUPHAVINGSELECTDISTINCTORDER BYTOP 阅读全文
posted @ 2012-01-11 16:30 qqhepp 阅读(140) 评论(0) 推荐(0) 编辑
摘要: C#中的new关键字可用做运算符,修饰符或约束。 1. new作运算符时有两种用法,创建对象和调用构造函数。例如:C#中的new关键字可用做运算符,修饰符或约束。1. new作运算符时有两种用法,创建对象和调用构造函数。例如:1 Class1 obj=new Class1();也可用于创建匿名类型的实例:1 var query = from cust in customer2 select new {Name=cust.Name,Address=cust.PrimaryAddress};也可用于调用值类型的默认构造函数:1 int i= new int();上一句等同于 int i=0;因为0 阅读全文
posted @ 2011-08-18 14:45 qqhepp 阅读(573) 评论(0) 推荐(0) 编辑
摘要: 在百度知道里看到的提问和答案c#中关于static的问题,为什么下面的代码得出Y的值为3, x的值为1using System ;class A{ public static int x; static A() { x=B.y+1; }}class B{ public static int y=A.x+1; static B() { y=y+1; } static void Main() { Console.WriteLine("x={0},y={1}",A.x,B.y); //Console.ReadLine(); }}答案namespace StaticTest{ cl 阅读全文
posted @ 2011-08-15 12:45 qqhepp 阅读(215) 评论(0) 推荐(0) 编辑
摘要: 页面弹出对话框第二次弹出时不会重新加载数据,像是取的浏览器缓存中的数据,所以数据可能有问题,不是最新的,所以在调用弹出页面的URL后面加个随机的参数,这个IE就会认为这是个新页,(页面URL?Random=随机数),就会重新去取数据。 阅读全文
posted @ 2011-06-17 14:17 qqhepp 阅读(522) 评论(0) 推荐(0) 编辑
摘要: <asp:textbox>标签是只读的时候,在查询页面,点击查询后,新页面不会记录textbox之前的值,因为只读的文本框的值不会存入到viewstate中,解决方法是,使用html的服务器端的<input>标签,在后台中给该标签添加只读的属性,this.ID.Attributes["ReadOnly"] = "true"。 阅读全文
posted @ 2011-06-02 17:30 qqhepp 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 用ResolveClientUrl比如你的图片放在应用程序根目录下的images里面,名为a.gif<img src='<%=ResolveClientUrl("~/images/a.gif")%>'/>~代表应用程序根目录 阅读全文
posted @ 2011-05-11 17:21 qqhepp 阅读(153) 评论(0) 推荐(0) 编辑
摘要: create table tb(time datetime)insert into tb select '2010-10-25 22:10:30' union all select '2010-11-03 15:20:00' union all select '2010-12-15 11:11:11'goselect * from tb a where abs(datediff(s,getdate(),time))=(select min(abs(datediff(s,getdate(),time))) from tb)godrop table 阅读全文
posted @ 2011-05-11 11:30 qqhepp 阅读(320) 评论(0) 推荐(0) 编辑
摘要: var positionWin = new parent.window.Ext.Window({ id:"positionWin", width: 600, modal:true, height: 400, title: record.data.PP_Name, layout: 'fit', y:50, closeAction: 'close', maximizable: true, minimizable: false, maximized: false, autoLoad: { url: "/Out.aspx?PS_ID=&qu 阅读全文
posted @ 2011-03-31 16:56 qqhepp 阅读(721) 评论(0) 推荐(0) 编辑
摘要: 语法: text-overflow : clip | ellipsis 参数: clip : 不显示省略标记(...),而是简单的裁切 ellipsis : 当对象内文本溢出时显示省略标记(...) 说明: 设置或检索是否使用一个省略标记(...)标示对象内文本的溢出。 对应的脚本特性为textOverflow。请参阅我编写的其他书目。 示例: div { text-overflow : clip; } 看起来不错,我们测试一下 <div style="width:100px;height:20px;text-overflow:ellipsis; ">a b c 阅读全文
posted @ 2011-03-31 16:51 qqhepp 阅读(338) 评论(0) 推荐(0) 编辑
摘要: 一.页面的后退、刷新、前进 history.go(-1) ;//后退一页 history.go(+1);//前进一页 history.go(-0);//刷新二.保护网页源代码 function clear() { Source=document.body.innerHTML; //获取当前文档的原有内容 document.open(); //打开文档 document.write(""); document.close(); document.Title="看不到源代码"; document.body.innerHTML=Source; //重新写入旧内 阅读全文
posted @ 2011-03-31 16:50 qqhepp 阅读(208) 评论(0) 推荐(0) 编辑