惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 【当耐特】
小众软件
小众软件
S
SegmentFault 最新的问题
GbyAI
GbyAI
量子位
爱范儿
爱范儿
L
LangChain Blog
Vercel News
Vercel News
A
About on SuperTechFans
腾讯CDC
博客园_首页
酷 壳 – CoolShell
酷 壳 – CoolShell
月光博客
月光博客
博客园 - 聂微东
Stack Overflow Blog
Stack Overflow Blog
H
Help Net Security
U
Unit 42
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
V
V2EX
V
Visual Studio Blog
美团技术团队
D
DataBreaches.Net
The GitHub Blog
The GitHub Blog
N
Netflix TechBlog - Medium

博客园 - 闫磊博客

C#获取当前时间的各种格式 ArcEngine这本书怎么样 asp.net 中Session和Application使用 ASP.NET页面间的传值的几种方法 ArcGIS Engine开发-TOCControl中实现图层的拖动 C# 获取局域网内IP的MAC Delphi中MediaPlayer控件的使用 arcgis中数字模糊查询 - 闫磊博客 - 博客园 1:25万地形数据库数据说明 国土资源部2009.12.31 关于县(市)级土地调查数据库建库软件数据更新功能测试结果(第一批)的公告 arcgis python 列举所有dataset ListDatasets - 闫磊博客 arcgis python 列举所有栅格ListRasters - 闫磊博客 arcgis python 获得消息的个数 - 闫磊博客 arcgis python 获得参数个数 arcgis python 数据更新 - 闫磊博客 ColorRamp对象 生成色带 C#如何将dataGridView内容载入DataSet中 python 例子生成随机数,读文件 python获得当前目录下文件,并写到name.txt
asp.net学习日志 - 闫磊博客 - 博客园
闫磊博客 · 2010-02-24 · via 博客园 - 闫磊博客

1、页面切换

Response.Redirect("Dir.aspx"); ///重定向到Dir.aspx页面  

2、将图片输出到页面,

 protected void Page_Load(object sender,EventArgs e)
 {  
  ///指定被输出图像的地址
  string path = Request.MapPath("~/Images/xpbz0075.jpg");
  ///创建文件流,以读取图像
  FileStream fs = new FileStream(path,FileMode.Open,FileAccess.Read);
  ///定义保存图像数据的二进制数组
  byte[] imageData = new byte[(int)fs.Length];
  ///读取文件的二进制数据
  fs.Read(imageData,0,(int)fs.Length);
  ///输出图像的二进制数据
  Response.BinaryWrite(imageData);
  ///设置页面的输出格式,【注意】:在此只能输出jpg图片
  Response.ContentType = "image/pjpeg";
  Response.End();   ///中止页面的其他输出
 } 

3、asp.net 获取当前URL的正确方法

  url =HttpContext.Current.Request.Url.PathAndQuery + "?name=" + TextBox1.Text + "&email=" + TextBox2.Text;
        Response.Redirect(url);