Click here to Skip to main content
16,021,112 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have a login page.

When I enter an invalid login id and password, and then click the login button, the label showing invalid login is displayed.
Then in which event I have to set the label visibility as false when I reenter the userid and password?
Posted
Updated 3-Oct-11 22:38pm
v2
Comments
Dalek Dave 4-Oct-11 4:39am    
Edited for Readability and Spelling.

It's myLabel.Visible = false, see, for example http://forums.asp.net/t/1248982.aspx/1[^].

—SA
 
Share this answer
 
Comments
Espen Harlinn 4-Oct-11 4:28am    
Right :)
Sergey Alexandrovich Kryukov 4-Oct-11 11:07am    
Thank you, Espen.
--SA
On keypress event of the Userid and Password field you can set display of the label to none and on the button press you can set its display to be visible.
 
Share this answer
 
Comments
lll1234 4-Oct-11 5:16am    
I didnt find any key press event, there is only textchanged event
Anuja Pawar Indore 4-Oct-11 9:38am    
OnKeyPress event is fired in the client-side, u can add it to text box
in the design only make the lable.visible property as false and in the login button click event if in valid username password then make the label visible
 
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