I have created password field for new and confirm password in password mode in VB.Net, while saving textbox become empty but after updation textbox is not clear. i have used code -
txtUserProfilePassword.Attributes.Add("value", txtUserProfilePassword.Text.Trim())
txtUserProfileConfirmPassword.Attributes.Add("value", txtUserProfileConfirmPassword.Text.Trim())
after submitting i am using code like -
txtUserProfilePassword.text = ""
or
txtUserProfilePassword.text = string.empty
but still textbox are not clear....
what code i should write for this??
Iftikar HussainPosted Aug 6, 2013, 12:34 AM
If(IsPostBack==false)
--add it
I think it will work now. if not then
After saving just remove the attribute
TextBox1.Attributes.Remove("value");
Regards,
Iftikar
rachayita jaiswalPosted Aug 6, 2013, 3:14 AM
Abhineet SrivastavaPosted Aug 6, 2013, 2:30 AM
If( !Ispostback)
txtUserProfilePassword.Attributes.Add("value", txtUserProfilePassword.Text.Trim())
rachayita jaiswalPosted Aug 6, 2013, 2:28 AM
after submitting page i have used -
TextBox1.Attributes.Remove("value");
it is working.
Thank you :)
rachayita jaiswalPosted Aug 6, 2013, 12:15 AM
txtUserProfilePassword.Text = grdUserProfile.SelectedRow.Cells(3).Text.Trim()
(if i will remove textmode="password" it is working otherwise not working)
Iftikar HussainPosted Aug 5, 2013, 11:58 PM
As per my understand, you want to display previously saved password while loading this page? Why have used to .Attributes.Add for adding the value? Please clear your requirement.
Regards,
Iftikar
rachayita jaiswalPosted Aug 5, 2013, 11:30 PM
txtUserProfilePassword.Attributes.Add("value", txtUserProfilePassword.Text.Trim())
but now for updation my password is not coming in password textbox.
need help, what i will do?
Sanjeeb LenkaPosted Aug 5, 2013, 10:44 AM
Abhineet SrivastavaPosted Aug 5, 2013, 8:31 AM
txtUserProfilePassword.Attributes.Add("value", txtUserProfilePassword.Text.Trim())
Comment it And Run the application please.
Abhineet SrivastavaPosted Aug 5, 2013, 8:20 AM
rachayita jaiswalPosted Aug 5, 2013, 8:17 AM
for updation i am fetching password in txtUserProfilePassword textbox
i am using -
txtUserProfilePassword.Attributes.Add("value", txtUserProfilePassword.Text.Trim())
so only password is coming in textbox before it was not coming
now i am updating my data, when i am clicking on button, i am getting message like data saved but password textbox is not clearing, it should clear..
what i ll do for this?
Abhineet SrivastavaPosted Aug 5, 2013, 8:17 AM
Please share your piece of code.
rachayita jaiswalPosted Aug 5, 2013, 8:12 AM
AutoComplete property is not working, textbox is not clear after submit my page.
Riyaz AkhtarPosted Aug 5, 2013, 8:09 AM
By the way what is the purpose to use Attribute in ur code?
Abhineet SrivastavaPosted Aug 5, 2013, 8:08 AM
rachayita jaiswalPosted Aug 5, 2013, 8:06 AM
I din't get you. where this auto complete i have to set off??
Abhineet SrivastavaPosted Aug 5, 2013, 8:01 AM