把图像文件上传到数据库,并从数据库读出
采用参数
上传图片到数据库:
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.IO;
namespace myUpLoad
{
/// <summary>
/// img2sql 的摘要说明。
/// </summary>
public class img2sql : System.Web.UI.Page
{
protected System.Web.UI.WebControls.TextBox imgTitleTextBox;
protected System.Web.UI.HtmlControls.HtmlInputFile upLoadImg;
protected System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator1;
pr
保存在数据中image字段的图片文件显示出来
最新推荐文章于 2023-05-16 17:18:22 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)