locked
label command RRS feed

  • Question

  • User-1994446809 posted

    Hello,

    How do I make a label INVISIBLE when i reload a web page ?

    Friday, April 24, 2020 11:45 PM

Answers

  • User288213138 posted

    Hi georgeakpan233,

    georgeakpan233

    How do I make a label INVISIBLE when i reload a web page ?

    Is your label a control in the web form? if so, you can set the Label.Visible = false when relaod the web page.

    Here is a web form demo for your reference. After I click the button, the page will reload.

    <asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" />
    <asp:Label ID="Label1" runat="server" Text="Label1"></asp:Label>
    
    
    protected void Button1_Click(object sender, EventArgs e)
            {
                Label1.Visible = false;
            }

    If you still have questions, please let me know.

    Best regard,

    Sam

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, April 25, 2020 2:20 AM

All replies

  • User409696431 posted

    Try posting your questions in the section related to the ASP. NET technology your site uses so we don't have to guess.  Is this Web Forms?

    Saturday, April 25, 2020 1:05 AM
  • User288213138 posted

    Hi georgeakpan233,

    georgeakpan233

    How do I make a label INVISIBLE when i reload a web page ?

    Is your label a control in the web form? if so, you can set the Label.Visible = false when relaod the web page.

    Here is a web form demo for your reference. After I click the button, the page will reload.

    <asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" />
    <asp:Label ID="Label1" runat="server" Text="Label1"></asp:Label>
    
    
    protected void Button1_Click(object sender, EventArgs e)
            {
                Label1.Visible = false;
            }

    If you still have questions, please let me know.

    Best regard,

    Sam

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, April 25, 2020 2:20 AM