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

推荐订阅源

IT之家
IT之家
Microsoft Azure Blog
Microsoft Azure Blog
人人都是产品经理
人人都是产品经理
博客园 - 聂微东
博客园_首页
阮一峰的网络日志
阮一峰的网络日志
V
V2EX
小众软件
小众软件
F
Fortinet All Blogs
Microsoft Security Blog
Microsoft Security Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
H
Hackread – Cybersecurity News, Data Breaches, AI and More
量子位
Google DeepMind News
Google DeepMind News
Jina AI
Jina AI
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
aimingoo的专栏
aimingoo的专栏
B
Blog RSS Feed
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
宝玉的分享
宝玉的分享
有赞技术团队
有赞技术团队
J
Java Code Geeks
WordPress大学
WordPress大学
The Cloudflare Blog

博客园 - rosanshao

使用sc 命令写脚本 添加和删除服务 简单应用 Win 10激活 couchbase map reduce StartWith 测试 笔记,转 Couchbase II( View And Index) Couchbase I SqlIO优化 死锁检测 MemCached 安装笔记 Asp.Net异步编程-使用了异步,性能就提升了吗? Autofac Mvc Webapi注入笔记 Sql Server 2005/2008 SqlCacheDependency查询通知的使用总结 WCF .NET REST调用方式 WCF HelpPage 和自动根据头返回JSON XML .net 4.0 新特性 Linq 并行化处理 IIS 假死状态处理 gmap jQuery插件开发
StatusCode - rosanshao - 博客园
rosanshao · 2009-02-22 · via 博客园 - rosanshao
  1.   
  2. Response.StatusCode = 302;   
  3. Response.StatusDescription = "Found";   
  4.   
  5. Response.RedirectLocation = "Login.aspx";   
  6.   
  7. Response.End()  

The Location HTTP header can alternatively be set using the Response.AppendHeader(name, value) method. That is, you could replace the Response.RedirectLocation property assignment in the code above with the following line of code:

  1.   
  2. Response.AppendHeader("Location""Login.aspx");  

The following code shows how to issue a 301 Moved Permanently redirect:

  1.   
  2. Response.StatusCode = 301;   
  3. Response.StatusDescription = "Moved Permanently";   
  4.   
  5. Response.RedirectLocation = "NewPageUrl.aspx";   
  6.   
  7. Response.End()