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. cant set text of two password fields on update page

cant set text of two password fields on update page

Scheduled Pinned Locked Moved ASP.NET
databasecsharpsql-serversysadmin
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.
  • J Offline
    J Offline
    jake williamson
    wrote on last edited by
    #1

    coding: aspx web pages in vb.net 2.0 database: sql server express this is a weird one... i'm trying to set the text of two password fields from a database query and it wont let me! this is in the code behind: txtPassword.Text = dtr.Item("password").ToString txtPasswordCompare.Text = dtr.Item("password").ToString and this is the page:
    Please retype password
    the 1st text box 'txtPassword' gets populated but not the 2nd? i can get round it using: txtPassword.Attributes.Add("value", dtr.Item("password").ToString) txtPasswordCompare.Attributes.Add("value", dtr.Item("password").ToString) but then the passwords render as live text in the source code - far from ideal... is there a way round this?! any suggestions would be great, cheers, jake

    V 1 Reply Last reply
    0
    • J jake williamson

      coding: aspx web pages in vb.net 2.0 database: sql server express this is a weird one... i'm trying to set the text of two password fields from a database query and it wont let me! this is in the code behind: txtPassword.Text = dtr.Item("password").ToString txtPasswordCompare.Text = dtr.Item("password").ToString and this is the page:
      Please retype password
      the 1st text box 'txtPassword' gets populated but not the 2nd? i can get round it using: txtPassword.Attributes.Add("value", dtr.Item("password").ToString) txtPasswordCompare.Attributes.Add("value", dtr.Item("password").ToString) but then the passwords render as live text in the source code - far from ideal... is there a way round this?! any suggestions would be great, cheers, jake

      V Offline
      V Offline
      Venk259
      wrote on last edited by
      #2

      Hi jake, I want to know what is dtr represent, if you give that details it will be easy to find any solution

      J 1 Reply Last reply
      0
      • V Venk259

        Hi jake, I want to know what is dtr represent, if you give that details it will be easy to find any solution

        J Offline
        J Offline
        jake williamson
        wrote on last edited by
        #3

        hey Venk259, thanks for getting back to me - have a feeling this should be a simple one, just needs the knowledge! the 'dtr' is a SqlDataReader thats populated using a stored procedure: Dim dtr As SqlDataReader i then set the form fields with the values, for example: txtUserName.Text = dtr.Item("username").ToString which works for the 1st password field but not the 2nd! hope that makes things a bit clearer, thanks for any suggestions, jake

        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