摘要:
public List<MenuEntity> GetMenus() { List<MenuEntity> menuList = null; SqlCacheDependency sqlDep; if (HttpContext.Current.Cache["menu"] == null) { menuList = new List<MenuEntity>(); using (SqlConnection conn = ne... 阅读全文
阅读排行榜
邮件发送
2012-07-17 17:59 by Carl Xing, 213 阅读, 收藏,
摘要:
前台界面:后台代码:(不同的邮件主机可能会需要端口号)using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Net.Mail;using System.Net;using System.Threading;namespace Mail{ public partial c... 阅读全文
验证码帮助类
2013-05-07 16:55 by Carl Xing, 206 阅读, 收藏,
摘要:
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Web;using System.Drawing;using System.IO; /// <summary> /// 登陆验证码帮助类 /// </summary> public class LogonValidateCode { /// <summary> /// 比较验证码 /// </summary> /// <p... 阅读全文
文件下载
2012-05-04 12:23 by Carl Xing, 195 阅读, 收藏,
摘要:
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { using (FileStream fs = new FileStream(Server.MapPath("~/123.txt"), FileMode.OpenOrCreate)) { int streamLength = (int)fs.Length; ... 阅读全文
浙公网安备 33010602011771号