01 2012 档案
摘要:使用I/O流操作文本文件 string p = Server.MapPath("") + "//1.txt"; //操作文件的路径 using (StreamWriter sw = new StreamWriter(p, true)) //写入 { for (int i = 0; i < 10; i++) { ...
阅读全文
摘要:添加数据 DataClasses1DataContext datacontent; string str = ConfigurationManager.AppSettings["SQLString"].ToString(); datacontent = new DataClasses1DataContext(str);...
阅读全文
摘要:简单查询 1.首先 ,新建一个LinqToSql类文件.把需要查询的表,拖入类文件的设计界面.接下来就可以使用它了. 2.页面拖一个GridView <asp:GridView ID="GridView1" runat="server"> </asp:GridView> 表信息: 3.后台代码 //实例化Linq链接...
阅读全文
摘要:创建隐形局部变量查询数组并输出 string[] w = { "a", "b", "c" }; var word = from words in w select new { Upper = words.ToUpper(), Lower = words.ToLower() }; foreach (var item in word) { Resp...
阅读全文
摘要:ArrayList使用 新建一个控制台应用程序 static void Main(string[] args) { int[] arr = { 1, 2, 3, 4, 5, 6 }; ArrayList arrlist = new ArrayList(arr);//初始化 ...
阅读全文
摘要:首先引用JQ文件,下面是所有代码; 主页面代码: 数据库数据: 脚本文件: function addli(object) { var text = object.innerText; var url = object.id; var html = "<div class=\"r_right_nav_div\" ondblclick=\...
阅读全文
浙公网安备 33010602011771号