if you mean a web app (or virtual directory), you can certainly use an Application variable in global.asax Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
Application("YourVar") = "YourValue"
End Sub
otherwise, you have to resort to database or registry or some common file and have a common function to read/write to them
Application("YourVar") = "YourValue"
End Sub
otherwise, you have to resort to database or registry or some common file and have a common function to read/write to them
解决方案 »
- 关于LinkButton获取Datalist中其中一行的ID问题,很简单但是很无奈, 求救~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- vs2008 新建项目就会自动退出
- 请教<object>问题
- 看看这个怎么实现!
- 一小段代码,大家帮我看看哪的错?想往DataSet中添加多个DataTable
- ASP.NET Web应用程序和ASP.NET Web服务有什么不同呀
- 北京公司借CSDN招人。可经过网络面试。
- 怎样用JS来实现分页?
- 有关回车即相当于按下按钮
- 请教以下网页是用什么脚本写的?
- 新手........高分,在线等!!!!!!!!!!!!!!!!!!!!!!!!!动态控件问题
- 关于treeview的问题。。
/*c#:varName:变量名,varValue:变量值*/
用的时候:Application["varName"],即可提取出来
它的效果跟Session差不多
打开后找下面的代码
Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)End Sub在中间加入
Application("YourVar") = "YourValue"-------------
记得给分哦