cant set text of two password fields on update page
-
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 -
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 -
Hi jake, I want to know what is dtr represent, if you give that details it will be easy to find any solution
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