上一页 1 ··· 7 8 9 10 11 12 13 14 15 16 下一页
摘要: <script language="javascript" type="text/javascript"> function CallCSVariable() { alert("<%= Str %>"); } function CallCSMethod() { alert('<%= GetStr("this is a ") %>'); } </script> <div> <input id="Button1" ty 阅读全文
posted @ 2013-01-19 15:59 yellowshorts 阅读(374) 评论(0) 推荐(0) 编辑
摘要: if (!this.IsPostBack) { Table Table1 = new Table(); AddRow(Table1, "姓名", "专业", "所在学样", "个人网站"); AddRow(Table1, "小明", "计算机系", "吉林大学", "http://www.mingrisoft.com"); Page.Controls.Add(Table1); } public void AddRow(Table Tab 阅读全文
posted @ 2013-01-19 15:48 yellowshorts 阅读(227) 评论(0) 推荐(0) 编辑
摘要: <div> <span id="spanCounter"></span> <br /> <asp:TextBox ID="TextBox1" runat="server" Text="Sample Text" onkeyup="spanCounter.innerText = this.value.length;"></asp:TextBox> </div> 阅读全文
posted @ 2013-01-19 15:45 yellowshorts 阅读(121) 评论(0) 推荐(0) 编辑
摘要: <%--页面每隔10秒刷新一次 --%> <meta http-equiv="Refresh" content="10" /> <%--指定页面使用的字符为国标汉字码--%> <meta http-equiv="Content-Type" content="text/html;Charset=gb2312" /> <%--禁止浏览器从本地的缓存中读取页面内容--%> <meta http-equiv="Pragma" conten 阅读全文
posted @ 2013-01-19 15:43 yellowshorts 阅读(117) 评论(0) 推荐(0) 编辑
摘要: List<Person> People = new List<Person> { new Person { ID = 33, Name = "lyf"}, new Person { ID = 22, Name = "azw"} }; var query = People.Select((person, index) => new { index, person.Name }).OrderBy(itm =>itm.Name); foreach (var item in query) { ... 阅读全文
posted @ 2013-01-19 15:39 yellowshorts 阅读(1843) 评论(0) 推荐(0) 编辑
摘要: string[] Words = new string[] { "what", "is", "your", "name", "?", "my", "name", "is", "lyf","." }; var Groups = from word in Words group word by word.Length into lengthGroups //按单词长度将单词分组 orderby len 阅读全文
posted @ 2013-01-19 15:37 yellowshorts 阅读(148) 评论(0) 推荐(0) 编辑
摘要: string path = Server.MapPath("App_Data/new.xml"); XElement xe = XElement.Load(path);//导入XML文件 //用LINQ查询Person元素 IEnumerable<XElement> element = from ee in xe.Elements("Person") select ee; //计算年龄合计 decimal oldSum = element.Sum... 阅读全文
posted @ 2013-01-19 15:36 yellowshorts 阅读(140) 评论(0) 推荐(0) 编辑
摘要: //取“App_Data”的路径 string dir = Server.MapPath("~/App_Data"); //创建文件信息列表 List<FileInfo> files = new List<FileInfo>(); foreach (string file in Directory.GetFiles(dir)) { files.Add(new FileInfo(file));//将“App_Data”中的文件信息添加到files } //被查... 阅读全文
posted @ 2013-01-19 15:34 yellowshorts 阅读(150) 评论(0) 推荐(0) 编辑
摘要: //取“App_Data”的路径 string dir = Server.MapPath("~/App_Data"); //创建文件信息列表 List<FileInfo> files = new List<FileInfo>(); foreach (string file in Directory.GetFiles(dir)) { files.Add(new FileInfo(file));//将“我的文档”中的文件信息添加到files } //LINQ查询指定文件尺寸的文... 阅读全文
posted @ 2013-01-19 15:29 yellowshorts 阅读(154) 评论(0) 推荐(0) 编辑
摘要: //取“App_Data”的路径 string dir = Server.MapPath("~/App_Data"); //创建文件信息列表 List<FileInfo> files = new List<FileInfo>(); foreach (string file in Directory.GetFiles(dir)) { files.Add(new FileInfo(file));//将“我的文档”中的文件信息添加到files } //LINQ查询符合指定条件的文件 ... 阅读全文
posted @ 2013-01-19 15:27 yellowshorts 阅读(179) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 14 15 16 下一页