如何在视图页面中设置会话值 [英] how to set a session value in view page
本文介绍了如何在视图页面中设置会话值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个视图页面,我能够在视图页面中检索id值.我想将该值分配给会话.我分配像
Hi,
I have a view page,I am able to retrieve the id value in the view page. I want to assign that value to the session. I assigned like
'@Session["Id"]' = ID.
但是当我输入alert(ID)时,该值没有得到.
可以 u 告诉我如何在视图页面中设置会话值
but when i put alert(ID),the value is not getting.
can u you tell me how to set a session value in the view page
推荐答案
应该类似于
Session["Id"] = ID
...
注意:如果您在使用警报时得到null;那不是因为这个陈述.
问候
...
NB: If you are getting null when you are using alert; that''s not because of this statement.
Regards
这篇关于如何在视图页面中设置会话值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文