Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. login page problem

login page problem

Scheduled Pinned Locked Moved C#
helptutorialquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rocky811
    wrote on last edited by
    #1

    i have a login page wid login check up loop as if (userType.Equals("Administrator")) { Response.Redirect("successPage.aspx"); } else if (!userType.Equals("Administrator")) { errMessage.Text = " Login Incorrect!! " ; } login works well with correct details as needed ..but if i enter wrong details.. it displays nothing.. i want to display text above... how to do this ??

    A 1 Reply Last reply
    0
    • R rocky811

      i have a login page wid login check up loop as if (userType.Equals("Administrator")) { Response.Redirect("successPage.aspx"); } else if (!userType.Equals("Administrator")) { errMessage.Text = " Login Incorrect!! " ; } login works well with correct details as needed ..but if i enter wrong details.. it displays nothing.. i want to display text above... how to do this ??

      A Offline
      A Offline
      Anthony Mushrow
      wrote on last edited by
      #2

      I'm not sure why the message is not displayed. But why are you using an else if? If the user is an admin it will pass through the first if. If it gets to the else part then we already know they're not an admin, there should be no need to check again.

      My current favourite word is: PIE! Good ol' pie, it's been a while.

      R 1 Reply Last reply
      0
      • A Anthony Mushrow

        I'm not sure why the message is not displayed. But why are you using an else if? If the user is an admin it will pass through the first if. If it gets to the else part then we already know they're not an admin, there should be no need to check again.

        My current favourite word is: PIE! Good ol' pie, it's been a while.

        R Offline
        R Offline
        rocky811
        wrote on last edited by
        #3

        ya its fine !!! but just like i want to display a text message .. when u enter wrong details !!!

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups