查看: 1367|回复: 4
|
请问有没有类似asp.net的session功能在vb.net?
[复制链接]
|
|
请问有没有类似asp.net的session功能在vb.net?
这样我开发的window form application 就可以让form_B读取form_A的某个variable了 |
|
|
|
|
|
|
|
发表于 23-1-2007 10:08 PM
|
显示全部楼层
原帖由 一只优雅的猪 于 23-1-2007 09:49 PM 发表
请问有没有类似asp.net的session功能在vb.net?
这样我开发的window form application 就可以让form_B读取form_A的某个variable了
Public variable 就可以了嘛 |
|
|
|
|
|
|
|
发表于 24-1-2007 10:42 AM
|
显示全部楼层
回复 #1 一只优雅的猪 的帖子
要来做什么?
要不用 Public Shared 咯 |
|
|
|
|
|
|
|

楼主 |
发表于 26-1-2007 09:00 AM
|
显示全部楼层
回复 #3 blur_dolphin 的帖子
就是让我的form B 可以读取 form A 的资料
Form A
Dim abc as string = "Super"
Form B 要可以读取abc这个variable |
|
|
|
|
|
|
|
发表于 28-1-2007 01:18 AM
|
显示全部楼层
不能用sesion的话,你可以在你的webform的click event里,连同你的variable附在一起redirect到你的webform B
列如(C#):
string A;
A = "value=" + variable;
Response.Redirect("webformA.aspx?"+ A);
成功transfer去webform B的话,browser 的address bar就会display “...webformB.aspx?value=variable" instead of just the webform name "...webformB.aspx"
由那里event从address bar读取从webform A带过去的variable
我很久没编写程序了,忘了actual code是怎么写的
但是我记得concept大概是这样把。。。希望可以帮到你
如过有错的话请纠正
[ 本帖最后由 simpleMind 于 28-1-2007 01:25 AM 编辑 ] |
|
|
|
|
|
|
| |
本周最热论坛帖子
|