从数据集中获取的ImageUrl可以帮助我 [英] takes the ImageUrl which is obtained from the dataset can help my
本文介绍了从数据集中获取的ImageUrl可以帮助我的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
{
SqlConnection con = new SqlConnection();
SqlCommand cmd = new SqlCommand();
private SqlDbType sq;
protected void Page_Load(object sender, EventArgs e)
{
if ("progimg "== "cmd")
{
string filename = " progimg".ToString();
if (filename != "")
{
string path = MapPath(filename);
byte[] bts = System.IO.File.ReadAllBytes(path);
Response.Clear();
Response.ClearHeaders();
Response.AddHeader("Content-Type", "Application/octet-stream");
Response.AddHeader("Content-Length", bts.Length.ToString());
Response.AddHeader("Content-Disposition", "attachment; filename=" + filename);
Response.BinaryWrite(bts);
Response.Flush();
Response.End();
}
}
添加了代码块[/ edit]
[edit]Code block added[/edit]
推荐答案
你能告诉我你想要做什么吗?
can you tell me what exactly you want to do??
这篇关于从数据集中获取的ImageUrl可以帮助我的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文