怎样读取sql数据库里的图片显示在网页上图片存进sql数据库里的是一个相对地址 type是image最好用C#.net 代码实现
解决方案 »
- silverlight 程序中为什么button控件中的image控件不能显示图片
- asp.net 网站发布时的问题,困扰nnn久了,哪位高手可以帮帮忙
- GridView--------选择问题
- 在asp.net 2.0中,Configuration.ConfigurationSettings竟然提示CS0117: “System.Configuration.Configuration”并不包含“Configuratio
- 命名空间问题!
- 如何在类库项目中设置调试断点?
- DropDownList空件怎么用
- 求救 ,关于二进制数据转换,等待!!
- .NET,让我欢喜让我忧!
- ajax for .net 2.0
- 关闭按钮
- asp.net 页面跳转
int Id=int.Parse(Request.QueryString["id"]);
using(SqlConnection conn=new SqlConnection())
{
conn.ConnectionString="";
string strSql="select * from Tb where Id='"+Id+"'";
SqlCommand cmd=new SqlCommand(strSql,conn) ;
conn.Open();
SqlDataReader reader=cmd.ExecuteReader();
if(reader.Read())
{
Response.ContentType = "application/octet-stream";
Response.BinaryWrite((Byte[])reader["Photo"]);
}
Response.End();
conn.Close();
}
指定的参数已超出有效值的范围。
参数名: offset