全球数据集? [英] Global Dataset?
本文介绍了全球数据集?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好,
有没有办法让我的所有aspx 2.0网页表格都是全局数据集?
谢谢,
Chuck
Hello,
Is there a way to make a dataset global to all my aspx 2.0 web forms?
Thanks,
Chuck
推荐答案
当然。在Global.asax中将其声明为公共静态字段。然后你可以从任何页面中将
引用它作为Global.MyDataSet
Peter
-
联合创始人,Eggheadcafe.com开发者门户网站:
http://www.eggheadcafe。 com
UnBlog:
http:// petesbloggerama .blogspot.com
" Charles A. Lackman"写道:
Sure. Declare it in your Global.asax as a public static field. Then you can
refer to it from any page as Global.MyDataSet
Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
"Charles A. Lackman" wrote:
你好,
有没有办法让我的所有aspx 2.0网页表格都是全局数据集? br />
谢谢,
Chuck
Hello,
Is there a way to make a dataset global to all my aspx 2.0 web forms?
Thanks,
Chuck
谢谢,
>
由于某种原因它不适合我。
这是代码:
<%@应用语言= QUOT; VB" %>
< script runat =" server">
Public MyDataset As New Dataset
>
Sub Application_Start(ByVal sender As Object,ByVal e As EventArgs)
''在应用程序启动时运行的代码
End Sub
我不能将Public Static作为错误显示,表示它不是声明的一部分
。
当我输入全球。 - 没有列出MyDataset。
谢谢,
Chuck
" Peter Bromberg [C#MVP]" ; < pb ******* @ yahoo.nospammin.com写在留言中
新闻:FC ********************* ************* @ microsof t.com ...
当然。在Global.asax中将其声明为公共静态字段。然后你可以从任何页面中将
引用它作为Global.MyDataSet
Peter
-
联合创始人,Eggheadcafe.com开发者门户网站:
http://www.eggheadcafe。 com
UnBlog:
http:// petesbloggerama .blogspot.com
" Charles A. Lackman"写道:
Thanks,
For some reason is it not working for me.
This is the code:
<%@ Application Language="VB" %>
<script runat="server">
Public MyDataset As New Dataset
Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
'' Code that runs on application startup
End Sub
I Cannot put Public Static as an error is shown that says it is not a part
of a declaration.
When I type Global. - MyDataset is not listed.
Thanks,
Chuck
"Peter Bromberg [C# MVP]" <pb*******@yahoo.nospammin.comwrote in message
news:FC**********************************@microsof t.com...
Sure. Declare it in your Global.asax as a public static field. Then you can
refer to it from any page as Global.MyDataSet
Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
"Charles A. Lackman" wrote:
你好,
有没有办法让我的所有aspx 2.0网页表格都是全局数据集? br />
谢谢,
Chuck
Hello,
Is there a way to make a dataset global to all my aspx 2.0 web forms?
Thanks,
Chuck
你可以把它放进去申请状态。
Application.Lock()
应用程序(" MyDataSet")= MyDataSet
Application.Unlock()
-
我希望这会有所帮助,
Steve C. Orr
MCSD,MVP ,CSM
http://SteveOrr.net
" ; Charles A. Lackman < Ch ***** @ CreateItSoftware.netwrote in message
news:eQ ************** @ TK2MSFTNGP04.phx.gbl ...
You could put it in Application State.
Application.Lock()
Application("MyDataSet") = MyDataSet
Application.Unlock()
--
I hope this helps,
Steve C. Orr
MCSD, MVP, CSM
http://SteveOrr.net
"Charles A. Lackman" <Ch*****@CreateItSoftware.netwrote in message
news:eQ**************@TK2MSFTNGP04.phx.gbl...
你好,
有没有办法让我的所有aspx 2.0网页表格都是全局数据集?
谢谢,
Chuck
Hello,
Is there a way to make a dataset global to all my aspx 2.0 web forms?
Thanks,
Chuck
这篇关于全球数据集?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文