asp.net中的vb .net变量 [英] vb .net variables in asp .net

查看:81
本文介绍了asp.net中的vb .net变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我有一个关于vb .net变量的简单问题。关于变量有很多

信息我很难找到我正在寻找的b
。这是一个问题:


当我在

服务器代码中使用变量(例如Dim strWhatever As String)时,是一个新的变量实例创建对于每个用户

谁访问该页面?我知道我需要跨多个页面的用户特定的会话变量

信息(还有其他方式,但会话是最简单的
)。但是,如果我使用变量做一些类似于贷款支付的

利息,而代码是服务器端(不是客户端

方面),是否会有如果多人同时使用我的页面

或者它们是否分开?我知道这是一个菜鸟问题

但我想确认答案。谢谢。如果你知道任何好的

链接请发送。

Hi,

I have a simple question about vb .net variables. There is so much
info on variables out there I had trouble finding exactly what I am
looking for. Here is the question:

When I use a variable (for example Dim strWhatever As String) in
server code, is a new instance of the variable create for each user
who visits the page? I know I need session variables for user specific
information across multiple pages (there are other ways but session is
easiest). But if I''m using variables do something like figure the
interest on a loan payment, and the code is server side (not client
side), will there be a conflict if multiple people use my page
simultaneously or is it all separate? I know this is a rookie question
but I want to confirm the answer. Thanks. If you know of any good
links please send.

推荐答案

这是完全独立的。


您必须使用会话,应用程序或缓存来共享

用户之间的变量。


Greg


" Matt Mercer" <毫安****** @ bellsouth.net>在消息中写道

news:37 ************************** @ posting.google.c om ...
It is all separate.

You have to use Session, Application, or Cache to share a variables between
users.

Greg

"Matt Mercer" <ma******@bellsouth.net> wrote in message
news:37**************************@posting.google.c om...


我有一个关于vb .net变量的简单问题。变量有很多关于变量的信息我很难找到我正在寻找的东西。这是一个问题:

当我在服务器代码中使用变量(例如Dim strWhatever As String)时,是为每个用户创建的变量的新实例
访问该页面?我知道我需要跨多个页面的用户特定信息的会话变量(还有其他方法,但会话最简单)。但是,如果我使用变量做了类似贷款支付的利息,而代码是服务器端(不是客户端),如果多人使用我的页面会有冲突
同时还是全部分开?我知道这是一个菜鸟问题
但我想确认答案。谢谢。如果您知道任何好的链接,请发送。
Hi,

I have a simple question about vb .net variables. There is so much
info on variables out there I had trouble finding exactly what I am
looking for. Here is the question:

When I use a variable (for example Dim strWhatever As String) in
server code, is a new instance of the variable create for each user
who visits the page? I know I need session variables for user specific
information across multiple pages (there are other ways but session is
easiest). But if I''m using variables do something like figure the
interest on a loan payment, and the code is server side (not client
side), will there be a conflict if multiple people use my page
simultaneously or is it all separate? I know this is a rookie question
but I want to confirm the answer. Thanks. If you know of any good
links please send.



呃,也许不是会话。 :^)


" Greg Burns" < greg_burns@DONT_SPAM_ME_hotmail.com>在留言中写道

新闻:%2 **************** @ TK2MSFTNGP12.phx.gbl ...
Uh, well maybe not Session. :^)

"Greg Burns" <greg_burns@DONT_SPAM_ME_hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
这是所有单独的。

你必须使用Session,Application或Cache来共享用户之间的变量。

Greg

;马特默瑟 <毫安****** @ bellsouth.net>在消息中写道
新闻:37 ************************** @ posting.google.c om ...
It is all separate.

You have to use Session, Application, or Cache to share a variables
between users.

Greg

"Matt Mercer" <ma******@bellsouth.net> wrote in message
news:37**************************@posting.google.c om...


我有一个关于vb .net变量的简单问题。变量有很多关于变量的信息我很难找到我正在寻找的东西。这是一个问题:

当我在服务器代码中使用变量(例如Dim strWhatever As String)时,是为每个用户创建的变量的新实例
访问该页面?我知道我需要跨多个页面的用户特定信息的会话变量(还有其他方法,但会话最简单)。但是,如果我使用变量做了类似贷款支付的利息,而代码是服务器端(不是客户端),如果多人使用我的页面会有冲突
同时还是全部分开?我知道这是一个菜鸟问题
但我想确认答案。谢谢。如果您知道任何好的链接,请发送。
Hi,

I have a simple question about vb .net variables. There is so much
info on variables out there I had trouble finding exactly what I am
looking for. Here is the question:

When I use a variable (for example Dim strWhatever As String) in
server code, is a new instance of the variable create for each user
who visits the page? I know I need session variables for user specific
information across multiple pages (there are other ways but session is
easiest). But if I''m using variables do something like figure the
interest on a loan payment, and the code is server side (not client
side), will there be a conflict if multiple people use my page
simultaneously or is it all separate? I know this is a rookie question
but I want to confirm the answer. Thanks. If you know of any good
links please send.




ma ****** @ bellsouth.net (Matt Mercer)写道

新闻:37 ******* *******************@posting.google.c om:
ma******@bellsouth.net (Matt Mercer) wrote in
news:37**************************@posting.google.c om:
但如果我使用变量做类似的事情计算贷款支付的利息,代码是服务器端(不是客户端),如果多人同时使用我的页面
或者它们是否分开会有冲突吗?
But if I''m using variables do something like figure the
interest on a loan payment, and the code is server side (not client
side), will there be a conflict if multiple people use my page
simultaneously or is it all separate?




这取决于你如何声明变量。如果您将变量声明为

static,它将由所有用户共享。如果你以任何其他方式声明它,那么它将特定于每个用户。


您可以使用静态,应用程序或缓存变量共享变量。


-

Lucas Tam(RE********@rogers.com)

请删除 ;移除];来自回复时的电子邮件地址。
http://成员。 ebay.com/aboutme/coolspot18/


这篇关于asp.net中的vb .net变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆