Session [" var"]和Session(&var")之间的差异 [英] Difference between Session["var"] and Session("var")
本文介绍了Session [" var"]和Session(&var")之间的差异的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
i在C#中创建一个会话变量,如下所示Session [" var"],
但是我无法访问VB.net中的变量
喜欢intmode = Session(" var");
为什么会这样?
问候
thomson
Hi,
i create a session variable in C# as follows Session["var"] ,
but iam not able to access the variable in VB.net
like intmode=Session("var");
Why is that ?
Regards
thomson
推荐答案
你有任何错误吗?
Eliyahu
" thomson" < SA ********** @ yahoo.com>在消息中写道
news:11 ********************* @ g44g2000cwa.googlegro ups.com ...
Do you get any error?
Eliyahu
"thomson" <sa**********@yahoo.com> wrote in message
news:11*********************@g44g2000cwa.googlegro ups.com...
我在C#中创建一个会话变量,如下所示Session [" var"],
但我无法访问VB.net中的变量
比如intmode = Session(" var");
为什么会这样?
关于
thomson
Hi,
i create a session variable in C# as follows Session["var"] ,
but iam not able to access the variable in VB.net
like intmode=Session("var");
Why is that ?
Regards
thomson
我没有收到错误,但是当我检索到价值这样的东西时,这个
这个
if session(" module")=""然后
intmodle = 50
else
intmodle = session(" module")
结束如果
当我来到第一个if时它跳过并且没有执行任何语句
我还可以将一个querystring变量添加到Server.transfer
方法
问候
thomson
Eliyahu Goldin写道:
iam not getting an error but while i retrieve the value somtething like
this
if session("module")="" then
intmodle=50
else
intmodle=session("module")
end if
when i come to the first "if " it skips and no statement is executed
One morething can i add querystring variable to a Server.transfer
method
regards
thomson
Eliyahu Goldin wrote:
你有任何错误吗?
Eliyahu >
thomson < SA ********** @ yahoo.com>在消息中写道
新闻:11 ********************* @ g44g2000cwa.googlegro ups.com ...
Do you get any error?
Eliyahu
"thomson" <sa**********@yahoo.com> wrote in message
news:11*********************@g44g2000cwa.googlegro ups.com...
你好,我在C#中创建一个会话变量,如下所示Session [" var"],
但我无法访问VB.net中的变量
如intmode = Session (var);
为什么会这样?
thomson
Hi,
i create a session variable in C# as follows Session["var"] ,
but iam not able to access the variable in VB.net
like intmode=Session("var");
Why is that ?
Regards
thomson
thomson写道:
thomson wrote:
我在C#中创建一个会话变量,如下所示Session [" var"],
如intmode = Session(" var");
为什么会这样?
<问候
thomson
Hi,
i create a session variable in C# as follows Session["var"] ,
but iam not able to access the variable in VB.net
like intmode=Session("var");
Why is that ?
Regards
thomson
这只是语法:
$ C $ b在C#中你使用[]
VB中使用的
()
除此之外,它是完全相同的。
Hans Kesting
It''s just syntax:
in C# you use [ ]
in VB you use ( )
apart from that, it''s identical.
Hans Kesting
这篇关于Session [" var"]和Session(&var")之间的差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文