In code behind page I create a variable like this (it belongs to one of the class)
string login_status = "you are not logged in";
I want to show this variable value in my Default.aspx page. What do I do?
You can create a variable of type string with protected access modifier and call it on your web page using:
<%= login_status %>
Drop a label onto your aspx page:
<asp:Label ID="Label1" runat="server"></asp:Label>
then in the codebehind, say:
Label1.Text = login_status;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With