类似
http://dotnet.aspx.cc/ShowDetail.aspx?id=ECD9AE16-8FF0-4A1C-9B9F-5E8B641CB1B1
http://dotnet.aspx.cc/ShowDetail.aspx?id=ECD9AE16-8FF0-4A1C-9B9F-5E8B641CB1B1
解决方案 »
- 几个JS时间处理函数
- 使用Session记录用户登录情况的问题
- 关于asp.net 主题问题
- C#数字转人民币大写问题,负数
- asp:TextBox 设为password类型后,只要点击页面上的按钮asp:TextBox中的内容就会消失,怎样才能不这样?
- 求一句SQL查询语句的写法!!!!!在线等
- 上传图片问题,加水印,急,在线等!!!!!!!
- 100分跪求解答~~~关于动网论坛和COOKIE的一个问题!
- WebBrowser打印GridView 问题
- asp.net中htmlcontrol中的file控件是用来上传文件的,可他的postfile相关的属性怎么都为空?为什么?
- 选择文件上传控件(input type=file)是否是只能选择小于4M的文件啊?
- 关于DropDownList下拉事件
在LoadRPhoto.aspx中加载图片:
private void LoadNoPicture()//加载默认照片
{
System.IO.FileStream imgFStream = new System.IO.FileStream(this.Server.MapPath(".") + "\\pic\\NoPhoto.gif",System.IO.FileMode.Open,System.IO.FileAccess.Read);//声明一个公开以文件为主的流
System.IO.BinaryReader imgBReader = new System.IO.BinaryReader(imgFStream);
System.Byte[] imgBinaryData = imgBReader.ReadBytes(System.Convert.ToInt32(imgFStream.Length));
this.Page.Response.BinaryWrite(imgBinaryData);
} private void LoadCadaverPhoto(string p_BodyId,string p_Serialer)//加载照片
{
try
{
this.OraConnData.Open();
System.Data.OracleClient.OracleCommand OraAdaLoadCadaverPhoto = new System.Data.OracleClient.OracleCommand("SELECT PHOTO FROM CASE_S_WMSTPHOTO WHERE BODYID = '"+p_BodyId+"' AND SERIALER = '"+p_Serialer+"'",this.OraConnData);
System.Data.OracleClient.OracleDataReader OraDrLoadCadaverPhoto = OraAdaLoadCadaverPhoto.ExecuteReader();
if(OraDrLoadCadaverPhoto.Read())
{
System.Web.HttpContext.Current.Response.ContentType = "images/*";
if(OraDrLoadCadaverPhoto["PHOTO"].ToString().Trim() != "")
{
this.Page.Response.BinaryWrite((byte[])OraDrLoadCadaverPhoto["PHOTO"]);
}
else
{
this.LoadNoPicture();
}
}
else
{
this.LoadNoPicture();
}
}
catch
{
this.LoadNoPicture();
}
finally
{
this.OraConnData.Close();
}
}
SqlConnection1.ConnectionString = "user id=sa;data source=wiecoffice;persist security info=False;initial catalog=wiecweb;password=" & Trim(name)
SqlCommand1.CommandText = "select * from 商品 where 编号='" & Trim(CType(int1, String)) & "'"
SqlConnection1.Open()
SqlCommand1.Connection.Open() Dim Sqldatareader1 As System.Data.SqlClient.SqlDataReader = SqlCommand1.ExecuteReader(CommandBehavior.CloseConnection)
If Sqldatareader1.Read() Then
Response.BinaryWrite(Sqldatareader1.Item("image"))
我这样写,怎么读不出来