2012-08-23 25 views
0

如何調用會話並將其用作文本框窗體的值。我正在使用asp.net會話值到文本框值

<form id="frmLog" name="frmLog" method="post" action="/Page/"> 
<input type="text" name="UserId" value="<%=Sessiopn["UserID"] %>">" /> 
</form> 

謝謝!

+0

MVC or webforms? – walther

回答

0

糾正它這一點。你有一個輸入錯誤。

<input type="text" name="UserId" value="<%=Session["UserID"] %>" /> 
+0

你有一個額外的>「在你的解決方案;) – walther

0

你有錯誤的變量名(不包括P)

Sessiopn - >會話