Click here to Skip to main content
15,895,011 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a password field.
XML
<div class="form_txt">Password <span class="red">*</span></div>
                        <div class="txt_bx">
                            <asp:TextBox ID="txtPwd" runat="server" TextMode="Password" Height="28px" Width="352px"
                            BorderColor="#C9CACA" BorderStyle="Solid" BorderWidth="1px" BackColor="White">
                            </asp:TextBox>
                        </div>



after filling the password when the page is postback the value erases from the password filed. How to overcome this problem
Posted
Comments
choudhary.sumit 12-Dec-12 2:01am    
why page is postbacked after filling the password???
Subha Ranjan Saha 12-Dec-12 3:20am    
it is required a post back to fill the second dropdown after selection of the first. The dropdown is after the field password. Most interesting is that the other text fields and dropdowns are not getting blank.
choudhary.sumit 12-Dec-12 3:27am    
this is the feature of textbox whose textmode is "password".
i suggest you to use update panel in this case.
Subha Ranjan Saha 12-Dec-12 4:04am    
Can you give me the snipnet for using update panel

You can use Update panel as choudhary.sumit as mentioned or you can use the code
C#
txtPwd.Attributes["value"] = txtPwd.Text;
in the page load but it is not recommended as the value in the text box becomes visible.
 
Share this answer
 
it will help you.
Use of update panel [^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900