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. Web Development
  3. ASP.NET
  4. i need a code for user login time

i need a code for user login time

Scheduled Pinned Locked Moved ASP.NET
helpcsharpquestion
3 Posts 3 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.
  • S Offline
    S Offline
    suresh_kumar_s
    wrote on last edited by
    #1

    i created one webform in c# that contains login name and password if u r eligible person then the redirect form will be come.i hav a problem for this redirect page..i want to knoe the login time from the user.can u help me???

    sureshkumaran

    R E 2 Replies Last reply
    0
    • S suresh_kumar_s

      i created one webform in c# that contains login name and password if u r eligible person then the redirect form will be come.i hav a problem for this redirect page..i want to knoe the login time from the user.can u help me???

      sureshkumaran

      R Offline
      R Offline
      Rahithi
      wrote on last edited by
      #2

      hi, just try this: after entering the user id & Pwd, just use this code to know the user login time. DateTime LoginTime= new DateTime(); LoginTime=DateTime.Now; private string lstrUserID; // To hold login user id private string lstrPassword; // To hold login Password this.lblErrorMessage.Text = ""; lstrUserID = txtUserID.Text.Trim();// Get the Correct User Login Id lstrPassword = txtPassword.Text.Trim(); // Get the Correct User Password < write the code for validating the User> if the credentials are valid (valid user) then, to redirect the user Response.Redirect("MainMenu.aspx"); } else { lblErrorMessage.Text = "Invalid UserID / Password";(//to display the error message i am using label here, just use according to ur page) } Thanks, Rahi

      If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "

      1 Reply Last reply
      0
      • S suresh_kumar_s

        i created one webform in c# that contains login name and password if u r eligible person then the redirect form will be come.i hav a problem for this redirect page..i want to knoe the login time from the user.can u help me???

        sureshkumaran

        E Offline
        E Offline
        enjoycrack
        wrote on last edited by
        #3

        What is your problem of redirect page?

        suresh008 wrote:

        i want to knoe the login time from the user.can u help me

        just get the system date... << >>

        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