ASP.NET禁用URL缓存
在一个项目开发中,showdialog弹出对话框时,我之前修改过的数据不会及时更新!
使用禁用URL缓存的方法,解决这个问题
在asp.net页面的后台
if (!IsPostBack)
{
Response.Buffer = true;
Response.ExpiresAbsolute = DateTime.Now.AddDays(-1);
Response.Expires = 0;
Response.CacheControl = "no-cache";
}
相关文档:
1. 打开新的窗口并传送参数:
传送参数:
response.write("<script>window.open(’*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"’)</script>")
接收参数:
string a = Request.QueryString("id");
string b = Request.QueryString("id1");
2.为按钮添加对话框
Button1 ......
在asp.net里怎么跟据用户权限来生成树形菜单
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
......
ASP.NET如何连接Access或SQL Server数据库
首先看一个例子代码片断:
程序代码:
--------------------------------------------------------------------------------
using System.Data;
using System.Data.OleDb;
......
string strConnection="Provider=Microsoft.Jet.OleDb.4.0;";
strConnection+ ......
asax文件:
<%@ Control Language="c#" AutoEventWireup="false" Codebehind="counter.ascx.cs" Inherits="JiAnWeb.counter" TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
<LINK href="css.css" rel="stylesheet">
<FONT face="宋体">
<TABLE id="table_coun ......