zoukankan
html css js c++ java
从数据库内取图片并在页面上显示
1、设置一个新的Web页面,并写入如下代码:
protected
void
Page_Load(
object
sender, EventArgs e)
{
if
(
!
Page.IsPostBack)
{
int
selectID
=
Convert.ToInt32(Request.QueryString[
"
origid
"
].Trim());
int
pindex
=
Convert.ToInt32(Request.QueryString[
"
pindex
"
].Trim());
byte
[] rbyte
=
new
OracleDAL.PicInfo().getPicByOrigAndIndex(selectID, pindex);
Response.ContentType
=
"
image/JPEG
"
;
Response.BinaryWrite(rbyte);
}
}
2、在新的页面中调用:
image1.ImageUrl
=
"
../readImage/getWantedPic.aspx?origid=
"
+
origid.ToString()
+
"
&pindex=
"
+
i.ToString();
根据在其它方式开发时的经验,应该是从库内直接取到Byte[],可以直接在页面上显示的。只是在Asp.net中好象不合适,哪位知道告诉一下,先谢了
查看全文
相关阅读:
【ZOJ3195】Design the City-LCA算法
【ZOJ3195】Design the City-LCA算法
【POJ1330】Nearest Common Ancestors-LCA算法
【POJ1330】Nearest Common Ancestors-LCA算法
【POJ3237】Tree-树链剖分
【POJ3237】Tree-树链剖分
【SPOJ375】Query on a tree-树链剖分
perl 回调必须是函数引用
运行复制的ZooKeeper 部署
运行复制的ZooKeeper 部署
原文地址:https://www.cnblogs.com/wjhx/p/759691.html
最新文章
go html ecmascript
Package template (html/template) ... Types HTML, JS, URL, and others from content.go can carry safe content that is exempted from escaping. ... (*Template) Funcs ..
9.5 自定义包和可见性 go mod
ECMAscript 没有对该方法进行标准化,因此反对使用它。 es 日期格式化
require
t
tmp
tmp
并发安全 sync.Map
csslint
热门文章
src/github.com/mongodb/mongo-go-driver/mongo/cursor.go 游标的简洁实用
r testifying that your code will behave as you intend.
bson
requests 中文乱码
js 数据获取
Create a /etc/yum.repos.d/mongodb-org-4.0.repo
LeastRecentlyUsed
【BZOJ1984】月下“毛景树”-树链剖分
【POJ2823】Sliding Window-单调队列
【POJ2823】Sliding Window-单调队列
Copyright © 2011-2022 走看看