- 博客(5)
- 收藏
- 关注
原创 ASP.NET 文件下载
byte[] bData = {1,2,3}; Response.Buffer = true; Response.Clear(); Response.ContentType = "application/octet-stream"; Response.AddHeader("Content-Disposition","attac
2007-10-10 12:24:00
409
原创 ASP.NET 将文件转换为byte数组
using System.IO; private byte[] FillPlanarGraph(FileUpload fileUpload) { //得到提交的文件 Stream fileDataStream = fileUpload.PostedFile.InputStream; //得到文件大小 int file
2007-10-10 11:24:00
1777
原创 ASP.NET 显示图片
//显示图片函数 public void ShowImage(string ProductID) { string strSql = "SELECT Preview_Image FROM Product WHERE Product_ID =" + ProductID; DataBase db = new DataBase(); Data
2007-10-10 11:04:00
1613
原创 ASP.NET 身份验证票
using System.Web.Security;1.创建验证票据 //1) 创建一个验证票据 FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(1, Account.Text, DateTime.Now, DateTime.Now.AddMinut
2007-10-10 10:41:00
898
原创 ASP.NET中获取用户真实IP地址
string sLoginIP = ""; if (Request.ServerVariables["HTTP_VIA"] != null) { sLoginIP = Request.ServerVariables["HTTP_X_FORWARDED_FOR"].ToString(); } else
2007-10-10 10:11:00
556
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人