2012年5月3日
摘要: XmlDocument xd = new XmlDocument(); string xmlPath = Server.MapPath("default_menu.xml"); string xmlcon = string.Empty; if (File.Exists(xmlPath)) { StreamReader sr = File.OpenText(xmlPath); xmlcon = sr.ReadToEnd(); } xd.LoadXml(xmlcon); XmlNode xn = xd.SelectSingleNode("Menu"); st 阅读全文
posted @ 2012-05-03 11:12 李菲菲 阅读(97) 评论(0) 推荐(0) 编辑
摘要: using System;using System.IO;using System.Security.Cryptography;using System.Text;using System.Web.Script.Serialization;using System.Xml;using System.Xml.Serialization;using System.Data;using System.Collections.Generic;using System.ComponentModel;using System.Linq;using System.Linq.Expressions;using 阅读全文
posted @ 2012-05-03 11:07 李菲菲 阅读(131) 评论(0) 推荐(0) 编辑
  2012年4月5日
摘要: function jsonToString(obj){ var THIS = this; switch(typeof(obj)){ case 'string': return '"' + obj.replace(/(["\\])/g, '\\$1') + '"'; case 'array': return '[' + obj.map(THIS.jsonToString).join(',') + ']'; case 'object& 阅读全文
posted @ 2012-04-05 13:30 李菲菲 阅读(243) 评论(0) 推荐(0) 编辑
  2012年3月31日
摘要: public class SortHelper<T> where T : IComparable{ public void BubbleSort(T[] array) { for (int i = 0; i < array.Length; i++) { for (int j = i + 1; j < array.Length; j++) { if (array[i].CompareTo(array[j]) < 0) { T temp = array[i]; array[i] = array[j]; array[j] = temp; } } } }}protecte 阅读全文
posted @ 2012-03-31 15:02 李菲菲 阅读(183) 评论(0) 推荐(0) 编辑
  2012年3月30日
摘要: 创建新表DataTable dt = new DataTable(); DataRow dr = dt.NewRow(); Type t1 = typeof(UserTable); PropertyInfo[] pis = t1.GetProperties(); foreach (var item in pis) { dt.Columns.Add(item.Name); dr[item.Name] = ((TextBox)this.FindControl(item.Name)).Text; } dt.Rows.Add(dr); UserTable usertb = new UserTable. 阅读全文
posted @ 2012-03-30 14:47 李菲菲 阅读(178) 评论(0) 推荐(0) 编辑
摘要: .NET 2.0中泛型的出现是一个令人激动的特征。但是,什么是泛型?你需要它们吗?你会在自己的应用软件中使用它们?在本文中,我们将回答这些问题并细致地分析泛型的使用,能力及其局限性。前言 .NET 2.0中泛型的出现是一个令人激动的特征。但是,什么是泛型?你需要它们吗?你会在自己的应用软件中使用它们?在本文中,我们将回答这些问题并细致地分析泛型的使用,能力及其局限性。类型安全 .NET中的许多语言如C#,C++和VB.NET(选项strict为on)都是强类型语言。作为一个程序员,当你使用这些语言时,总会期望编译器进行类型安全的检查。例如,如果你把对一个Book类型的引用转换成一个Vehi.. 阅读全文
posted @ 2012-03-30 14:45 李菲菲 阅读(113) 评论(0) 推荐(0) 编辑
摘要: http://www.cnblogs.com/wangzhexiaoyan/archive/2010/10/23/1859538.htmlResponse.Cookies["name"].Value = name;写入cookiesTextBox3.Text = Request.Cookies["name"].Value;读取cookiesResponse.Cookies["name"].Expires = DateTime.Now;清空cookiescookie 是一小段文本信息,伴随用户请求,在web服务器和浏览器之间传递。用户每 阅读全文
posted @ 2012-03-30 10:05 李菲菲 阅读(124) 评论(0) 推荐(0) 编辑
  2011年12月27日
摘要: /*-----html----*/<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default3.aspx.cs" Inherits="test_Default3" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt 阅读全文
posted @ 2011-12-27 11:33 李菲菲 阅读(819) 评论(0) 推荐(0) 编辑
  2011年11月21日
摘要: public class WebSiteThumbnail { Bitmap m_Bitmap; string m_Url; int m_BrowserWidth, m_BrowserHeight, m_ThumbnailWidth, m_ThumbnailHeight; public WebSiteThumbnail(string Url, int BrowserWidth, int BrowserHeight, int ThumbnailWidth, int ThumbnailHeight) { m_Url = Url; m_BrowserHeight = BrowserHeight; . 阅读全文
posted @ 2011-11-21 16:56 李菲菲 阅读(845) 评论(0) 推荐(0) 编辑
  2011年11月8日
摘要: function checkVote(PlayersId, ipname) { alert("投票暂未开通!"); return false; //VoteService.EditPlayersVote(PlayersId, CallBack); // Cookie(ipname, PlayersId);}function CallBack(result) { if (result == "0") { alert("投票失败!"); location.href = "Vote.aspx"; } else { ale 阅读全文
posted @ 2011-11-08 15:19 李菲菲 阅读(136) 评论(0) 推荐(0) 编辑