SyntaxError SyntaxError - 2 months ago 30
ASP.NET (C#) Question

Session value to TextBox Value

How to call a Session and use it as a value of Text Box Form. I am using asp.net

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


Thanks!

Answer

Correct it to this. You have a typing mistake.

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