Announcement

Collapse
No announcement yet.

Make label invisible

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Make label invisible

    Hello

    I have the following code in a Web page:

    Code:
    Protected Sub btnLogin_Click(sender As Object, e As EventArgs)
    
            Dim strEmail As Boolean
    
            Dim result As String = VerifyAccount(strEmail, password.Text)
    
            If result = True Then
    
                Session("ValidUser") = True
    
                Session("strEmail") = GetUser(strEmail)
    
                Response.Redirect("userpage.aspx")
    
            Else
    
                Session("ValidUser") = False
    
                Label1.Text = "Please provide a valid Username and password"
    
            End If
    
        End Sub
    I am interested in this line:

    Label1.Text = "Please provide a valid Username and password"

    On my Web form, this shows the word 'Label' which I would prefer to be invisible unless and until it is required. How would I code that, please?

    Thanks!

  • #2
    It's OK, I have done it now, thanks!

    Comment

    Working...
    X