摘要: using System.Threading;//引入命名空间public partial class Form3 : Form { public Form3() { InitializeComponent(); } // 第一种方法: delegate void MyDel(int i);//此处... 阅读全文
posted @ 2012-07-20 15:12 cbwbin 阅读(2603) 评论(2) 推荐(2) 编辑
摘要: protected void btnseach_Click(object sender, EventArgs e) { string name = this.name.Text.Trim(); string address = this.address.Text.Trim(); string gender = this.gender.Text.Trim(); string sql = "select * from UserInfo "; string wh = "where"; StringBuilder sb = new StringBuilder() 阅读全文
posted @ 2012-07-20 15:03 cbwbin 阅读(563) 评论(0) 推荐(0) 编辑
摘要: 此方法用于把对象序列化成Json格式的数据protected void Page_Load(object sender, EventArgs e) { string strcon = "Data Source=.;Initial Catalog=Test2;User ID=sa;pwd=sasa"; string sql = "select OperatorID,OperatorName from tblOperator"; DataTable dt = new DataTable(); using (SqlDataAdapter adapter = n 阅读全文
posted @ 2012-07-20 14:59 cbwbin 阅读(342) 评论(0) 推荐(0) 编辑
摘要: protected void saveimage_Click(object sender, EventArgs e) { #region 把图片以二进制的形式存入数据库 Stream imageStream; string path = fileupload.PostedFile.FileName;//文件名 int size = fileupload.PostedFile.ContentLength;//文件大小 string type = fileupload.PostedFile.ContentType;//文件类型 imageStream = fileupload.PostedFile 阅读全文
posted @ 2012-07-20 14:51 cbwbin 阅读(1125) 评论(0) 推荐(0) 编辑
摘要: 有关MD5:public string GetMD5(string pwd) { return System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(pwd, "md5"); }传入一个字符串,返回一个加密后的字符字符串 阅读全文
posted @ 2012-07-20 14:48 cbwbin 阅读(132) 评论(0) 推荐(0) 编辑