A basic question but there is no such question on Stack Overflow (for ASP.NET)
<asp:TextBox ID="txtUserName" runat="server" Text=<% Session["UserName"] %> >
I did this a week ago, now something is wrong. It should be simple. I also tried <%= %>, it did not work either. Putting a single quote around ‘<% %>’ gives binding error. Help
What I did was pulled the text box in C# code and set it text value to the session.
Example:
Use it in one of the function which checks the session values or you can use in page_load function (the default function for every page)