how to display a session value in an ASP textbox

前端 未结 3 1887
小蘑菇
小蘑菇 2021-01-18 14:35

A basic question but there is no such question on Stack Overflow (for ASP.NET)



        
3条回答
  •  清酒与你
    2021-01-18 15:08

    What I did was pulled the text box in C# code and set it text value to the session. Example:

    txtUserName.text = Session["UserName"];
    

    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)

提交回复
热议问题