在vb.net中分配会话时出现问题。请帮助我。 [英] Issue in session assigning in vb.net. pls help me out.

查看:78
本文介绍了在vb.net中分配会话时出现问题。请帮助我。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





i在vb.net会话中分配了字符串值。



dim codil as string =Raja



会话(codi)= codil



我希望是正确的。我把调试器和我在codil中获得了值。何时进入下一步(f10)。注意:我尝试使用codil.ToString()也是同样的错误。



抛出异常。



对象引用未设置为对象的实例。



i assigned the string value in session in vb.net follows.

dim codil as string = "Raja"

Session("codi") = codil

I hope that is correct. i put the debugger and i got the value in codil. when move to next step (f10). Note: i tried with codil.ToString() also same error.

It throws follows exception.

Object reference not set to an instance of an object.

推荐答案

我怀疑它不是 codil 这就是问题所在,但是会话

这种情况​​很少见但很可能,取决于许多因素。请参阅此处: http://stackoverflow.com/questions / 1382791 / asp-net-what-to-do-if-current-session-null-null [ ^ ]
I suspect that it isn't codil that's the problem, but Session.
This is rare but possible, and depends on a number of factors. See here: http://stackoverflow.com/questions/1382791/asp-net-what-to-do-if-current-session-is-null[^]


这篇关于在vb.net中分配会话时出现问题。请帮助我。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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