tag:blogger.com,1999:blog-8492016573075353132.post8223443960036972787..comments2024-02-01T21:22:43.864+05:30Comments on Explore .NET with Vikram Pendse: Retain Password in ViewStateVikram Pendsehttp://www.blogger.com/profile/01410458827520236058noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-8492016573075353132.post-53058227932493660772009-07-01T10:31:01.355+05:302009-07-01T10:31:01.355+05:30Thanks Chaitanya for your valuable feedback.
My c...Thanks Chaitanya for your valuable feedback.<br /><br />My concern that time was to maintain it in Postbacks, which generally txtbox with password don't allow to do so.<br /><br />However,I will check if the same logic work for TextBox,especially if it is password textbox. For several Security reasons if you wish to store Password(Not the other text in combo or any sever control)then it becomes issue. <br /><br />I will surely try to check it with some text as password in textbox. However concern remains for password is to keep it as it is in postbacks.Vikram Pendsehttps://www.blogger.com/profile/01410458827520236058noreply@blogger.comtag:blogger.com,1999:blog-8492016573075353132.post-74462584980399963772009-07-01T08:04:22.870+05:302009-07-01T08:04:22.870+05:30Hey I came across with the same situation while wo...Hey I came across with the same situation while working with registration process. There was two combo boxes one is for Country and another is for States/province which is filled up according to the value selected in Country.<br /><br />Its not require to store value in ViewState["MyPassword"] ... you can assign value to a simple variable in SelectedIndexChanged event as the first statement and assign back to the control in last statement and it worked ... following is the snippet of code i have written in my project:<br /><br /> Private Sub ddlCountry_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ddlCountry.SelectedIndexChanged<br /> Dim sPassword As String = txtPassword.Text.Trim()<br /><br /> 'Snippet of code to fill up state dropdown<br /><br /> 'Setting password<br /> txtPassword.Attributes.Add("value", sPassword) <br />End Sub<br /><br />and this is working fine ...Chaitanyahttps://www.blogger.com/profile/08960404799774294368noreply@blogger.com