易截截图软件、单文件、免安装、纯绿色、仅160KB

C#清除页面缓存

C#清除页面缓存
    private void SetPageNoCache()
        {
            Response.Buffer = true;
            Response.ExpiresAbsolute = System.DateTime.Now.AddSeconds(-1);
            Response.Expires = 0;
            Response.CacheControl = "no-cache";
            Response.AddHeader("Pragma", "No-Cache");
        }
    (1)   Response.Buffer = true;
            Response.ExpiresAbsolute = System.DateTime.Now.AddSeconds(-1);
            Response.Expires = 0;
            Response.CacheControl = "no-cache";
            Response.AddHeader("Pragma", "No-Cache");
    (2) HTML方法
        <meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Expires" content="0">
    (3) 重新调用原页面的时候在给页面传一个参数:    href="****.aspx?random()"


相关文档:

C# 使用PlaySound在移动设备上播放声音

使用 PlaySound 在移动设备上播放声音文件。此代码使用 System.Runtime.InteropServices
调用 Compact Framework 的 CoreDll.DLL 的 PlaySound 方法
关于播放实现:
        //播放标志
        private enum Flags
        {
 &n ......

c# enmu 枚举小结(1)

 
枚举
  枚举类型声明为一组相关的符号常数定义了一个类型名称。枚举用于“多项选择”场合,就是程序运行时从编译时已经设定的固定数目的“选择”中做出决定。
  枚举类型(也称为枚举)为定义一组可以赋给变量的命名整数常量提供了一种有效的方法。例如,假设您必须定义一个变量,该变量 ......

C#入门

变量、常量及表达式变量和常量变量(静态、非静态、数组元素、值参数、引用参数、输出参数、局部变量)静态(static) 如 public static int x;  一旦静态变量所属的类被装载,直到包含该类的程序运行结束时它一直存在。非静态:不带有static修饰符声明的变量称为实例变量,如int a ;常量(attributes constnt-modifiers CO ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号