Application、Session、Server 状态管理
2006-10-18 23:32
666 查看
Application 可以存放任何对象,包括数组.
以下是Application 存放数组的例子
前台页面代码:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Application.aspx.cs" Inherits="ApplicationSessionServer_Application" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>无标题页</title>
</head>
<body>
<form id="form1" runat="server">
<div>
=============================<br />
Application 可以存放任何对象,包括数组.<br />
以下是Application 存放数组的例子<br />
<br />
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="存储数组" />
<asp:Button ID="Button2" runat="server" OnClick="Button2_Click" Text="读取数组" /><br />
<br />
<asp:ListBox ID="ListBox1" runat="server" Height="145px" Width="158px"></asp:ListBox></div>
</form>
</body>
</html>
后台代码CS:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class ApplicationSessionServer_Application : System.Web.UI.Page
以下是Application 存放数组的例子
前台页面代码:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Application.aspx.cs" Inherits="ApplicationSessionServer_Application" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>无标题页</title>
</head>
<body>
<form id="form1" runat="server">
<div>
=============================<br />
Application 可以存放任何对象,包括数组.<br />
以下是Application 存放数组的例子<br />
<br />
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="存储数组" />
<asp:Button ID="Button2" runat="server" OnClick="Button2_Click" Text="读取数组" /><br />
<br />
<asp:ListBox ID="ListBox1" runat="server" Height="145px" Width="158px"></asp:ListBox></div>
</form>
</body>
</html>
后台代码CS:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class ApplicationSessionServer_Application : System.Web.UI.Page
相关文章推荐
- 【C#.NET】ASP.NET状态管理 APPlication,Session,Cookie和ViewStat用法
- 个人理解session、application、cookie等状态管理的含义
- 转载ASP.NET 状态管理Application,Session,Cookie和ViewState用法
- 状态管理Application,和Session以及Cookie
- ASP.NET状态管理 APPlication,Session,Cookie和ViewStat用法
- ASP.NET状态管理 APPlication,Session,Cookie和ViewState等对象用法和区别
- WebForm总结Day03_状态管理cookie_session_application
- C#状态管理(Application、Session、Cookie)
- [Asp.Net]状态管理(Session、Application、Cache)
- ASP.NET状态管理 APPlication,Session,Cookie和ViewStat用法
- 状态管理Application和Session、Cache以及Cookie
- ASP.NET状态管理 APPlication,Session,Cookie和ViewStat用法
- ASP.NET状态管理 APPlication,Session,Cookie和ViewStat用法
- ASP.NET状态管理 APPlication,Session,Cookie和ViewState等对象用法和区别
- 第二十四天:session服务器端的状态管理技术
- Jsp状态管理(Cookie和Session的对比)
- asp.net状态管理学习二:session
- Application对象、Session对象、Cookie对象、Server对象初步认识
- .net知识系列之二:(net内置对象request,reponse,server,session,cookie,application,viewstate)
- JavaWeb状态与会话管理Session