- .NET CORE架构分层2
- C# 的注释
- IIS中301跳转与307跳转的区别
- aspx 页面 包含html页面方法
- AspNetPager的UrlRewriting 动态页面问题之修改
- C#使用JavaScriptSerializer类实现序列化与反序列化
- 单页应用和多页应用的区别
- PHP中的require-dev和require之间的区别
- 建站流程网:SEO案例剖析之二赶驴网
- SQL Server"选定的用户拥有对象,所以无法除去该用户"
邮箱:
手机:15383239821
Response.AddHeader使用实例
1.文件下载,指定默认名
Response.AddHeader("content-type","application/x-msdownload"); // 限制类型
Response.AddHeader("Content-Disposition","attachment;filename=文件名.rar");// 下载后的文件名
2.刷新页面
Response.AddHeader (“REFRESH”, ”60;URL=newpath/newpage.asp”)
这等同于客户机端<META>元素:
<META HTTP-EQUIV=”REFRESH”, “60;URL=newpath/newpage.asp”>
3.页面转向
Response.Status = “302 Object Moved”
Response.Addheader “Location”, “newpath/newpage.asp”
这等同于使用Response.Redirect方法:
Response.Redirect “newpath/newpage.asp”
4.强制浏览器显示一个用户名/口令对话框
Response.Status= “401 Unauthorized”
Response.Addheader “WWW-Authenticate”, “BASIC”
强制浏览器显示一个用户名/口令对话框,然后使用BASIC验证把它们发送回服务器(将在本书后续部分看到验证方法)。
5.如何让网页不缓冲
Response.Expires = 0
Response.ExpiresAbsolute = Now() - 1
Response.Addheader "pragma","no-cache"
Response.Addheader "cache-control","private"
Response.CacheControl = "no-cache
-
2010-07-20百度K首页的终极SEO抢救办法
-
2023-10-083种ThinkPHP中获取参数的常用方法
-
2024-02-24ElementUI核心标签以及在Vue中的使用
-
2023-07-29msi安装包安装MySQL教程(详细)
-
2019-12-18淘宝的PPC、ROI、CTR、CVR究竟是什么,以及他们之间的关系?
-
2010-07-20FCKeditor 2.6.3在ASP.NET中的配置方法
