摘要: 1.计数varq= frompindb.Products grouppbyp.CategoryIDintog selectnew{ g.Key, NumProducts=g.Count() };语句描述:Linq使用Group By和Count得到每个CategoryID中产品的数量。说明:先按CategoryID归类,取出CategoryID值和各个分类产品的数量。2.带条件计数varq= frompindb.Products grouppbyp.CategoryIDintog selectnew{ g.Key, NumProducts=g.Count(p=>p.Discontinue 阅读全文
posted @ 2013-01-08 18:08 IT_菜鸟 阅读(278) 评论(0) 推荐(0) 编辑
摘要: 已知有一个XML文件(bookstore.xml)如下:CodeCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--><?xml version="1.0" encoding="gb2312"?><bookstore> <book genre="fantasy" ISBN="2-3631-4"> <title>Oberon 阅读全文
posted @ 2013-01-08 11:05 IT_菜鸟 阅读(196) 评论(0) 推荐(0) 编辑
摘要: autocomplete属性可以阻止浏览器对文本框的自动补全功能.你应该遇到过在某些文本框输入过一些内容时,如果再次输入内容时,文本框会出现一个下拉框显示出以前输入过的内容.这是浏览器默认的一个功能.利用autocomplete可以关闭该功能.当你不需要文本框自动显示输入过的内容时,可以使用autocomplete="off"来关闭自动补全.autocomplete="off":关闭浏览器自动补全内容.autocomplete="on":开启浏览自动补全功能<input type="text" autocom 阅读全文
posted @ 2013-01-08 09:40 IT_菜鸟 阅读(974) 评论(0) 推荐(1) 编辑