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

推荐订阅源

有赞技术团队
有赞技术团队
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
IT之家
IT之家
博客园 - 【当耐特】
罗磊的独立博客
Stack Overflow Blog
Stack Overflow Blog
MyScale Blog
MyScale Blog
WordPress大学
WordPress大学
The GitHub Blog
The GitHub Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Hugging Face - Blog
Hugging Face - Blog
I
InfoQ
B
Blog RSS Feed
腾讯CDC
云风的 BLOG
云风的 BLOG
N
Netflix TechBlog - Medium
Apple Machine Learning Research
Apple Machine Learning Research
GbyAI
GbyAI
雷峰网
雷峰网
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
D
DataBreaches.Net
The Cloudflare Blog
V
V2EX
S
SegmentFault 最新的问题

博客园 - 闫磊博客

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);