<sessionState mode="???" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="20"/>
<%@ Page EnableSessionState="false" %>
<%@ Page EnableSessionState="false" %>
private void Page_Load(Object sender,EventArgs e)
{
if(!Page.IsPostBack)
{
....; //初始化页面的代码。这些代码第一次页面初始化时执行,当第二次回发时,
//不会再执行。提高效率。
}
}
<%@ Page EnableViewState="false"%>
<Sessionsstate timeout="10" cookieless="false" mode="Inproc" />
string test="";
for(for int i=0;i<10000;i++)
{
test = test + i;
}
string test="";
for(for int i=0;i<10000;i++)
{
test = test + i.ToString();
}
try
{}
catch
{}
finally
{}
DataSet ds = new DataSet();
SqlConnection MyConnection = new SqlConnection("server=localhost; uid=sa; pwd=; database=NorthWind");
SqlCommand myCommand = new SqlCommand(strSql,MyConnection);
SqlDataAdapter myAdapter=new SqlDataAdapter(queryStr,connectionStr);
MyConnection.Open(); //打开连接
for(int i=0;i<1000;i++) //for循环模拟取得数据前的商业逻辑操作
{
Thread.Sleep(1000);
}
myAdapter.Fill(ds);
for(int i=0;i<1000;i++) //for循环模拟取得数据后的商业逻辑操作
{
Thread.Sleep(1000);
}
MyConnection.Close(); //关闭连接
DataSet ds = new DataSet();
SqlConnection MyConnection = new SqlConnection("server=localhost; uid=sa; pwd=; database=NorthWind");
SqlCommand myCommand = new SqlCommand(strSql,MyConnection);
SqlDataAdapter myAdapter=new SqlDataAdapter(queryStr,connectionStr);
for(int i=0;i<1000;i++) //for循环模拟取得数据前的商业逻辑操作
{
Thread.Sleep(1000);
}
MyConnection.Open(); //打开连接
myAdapter.Fill(ds);
MyConnection.Close(); //关闭连接
for(int i=0;i<1000;i++) ////for循环模拟取得数据后的商业逻辑操作
{
Thread.Sleep(1000);
}
<%@ OutputCache Duration="5" VaryByParam="None"%> <%@ OutputCache Duration=60 VaryByParam=”TextBox1,TextBox2” %>
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有