show-notice
hide-notice

Wednesday 21 August 2013

Add default value in ASP TextBox with TextMode is Password


Introduction:

Here i will explain Add default value in ASP TextBox with TextMode is Password.

Description:

Most of textbox in the many time without validation we can add default value in textbox when textmode is password.That's solution here...

ASPX:


    

        

        

    


CS:
protected void Page_Load(object sender, EventArgs e)
    {
        TextBox txtPassword = (TextBox)LoginUser.FindControl("Password");
txtPassword.Attributes.Add("value", "defaultpassword");
    }

SHARE THIS POST   

0 comments :

Post a Comment

Design by Gohilinfotech | www.gohilinfotech.blogspot.com