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. ASP.NET Coockies

ASP.NET Coockies

Scheduled Pinned Locked Moved ASP.NET
csharpasp-net
2 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.
  • S Offline
    S Offline
    shashank veerkar
    wrote on last edited by
    #1

    Hi I am implementing a program for remember login.I am doing this like this HttpCookie hc1=new HttpCookie("username",Text1.Value); HttpCookie hc2=new HttpCookie("password",Text2.Value); Response.Cookies.Add(hc1); Response.Cookies.Add(hc2); And i want to show these values in the textboxes by this if(Request.Cookies["username"]!=null) Text1.Value=Request.Cookies["username"].Value; if(Request.Cookies["password"]!=null) Text2.Value=Request.Cookies["password"].Value; but the value in the password text box does not appear. is it possible to show the password in the textbox in the form of ' * ' . Alok Kumar

    M 1 Reply Last reply
    0
    • S shashank veerkar

      Hi I am implementing a program for remember login.I am doing this like this HttpCookie hc1=new HttpCookie("username",Text1.Value); HttpCookie hc2=new HttpCookie("password",Text2.Value); Response.Cookies.Add(hc1); Response.Cookies.Add(hc2); And i want to show these values in the textboxes by this if(Request.Cookies["username"]!=null) Text1.Value=Request.Cookies["username"].Value; if(Request.Cookies["password"]!=null) Text2.Value=Request.Cookies["password"].Value; but the value in the password text box does not appear. is it possible to show the password in the textbox in the form of ' * ' . Alok Kumar

      M Offline
      M Offline
      minhpc_bk
      wrote on last edited by
      #2

      Hi there, The TextBox control having the TextMode property set to Password renders as an input password element at the client side. The value of this emelent is always set to null by default, so to work around this thing you need to do two things: + Add the password value to the Response.Cookies collection at the server side. + Use the client side script to read the password value from the cookie, and it should be running on the client machine, not the server.

      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