How to add a login or logout images to a Web page?

Are you preparing for IT certification? With practice questions, study notes, interactive quizzes, tips and technical articles, uCertify PrepKits ensure that you get a solid grasp of core technical concepts to ace your certification exam in first attempt.

How to add a login or logout images to a Web page?

Rating:

The following are the steps to add a login or logout images to a Web page:

  1. Create a Web page named Login.aspx in a Web application that uses ASP.NET membership. Select the LoginStatus Web server control from the Login option of the Toolbox tool. An illustrative image is shown below:



  2. Drag and place the LoginStatus control on the design page of the Login.aspx page. Open the Properties window of the control. Click the right side of the LoginImageUrl property in the Properties window. An illustrative image is shown below:



  3. The Select Image dialog box appears. Select the image file that is to be displayed at runtime from the Contents of folder list box. Click the OK button, as shown below:



  4. The image is now shown on the LoginStatus control, instead of the text. Click the right side of the LogoutImageUrl property in the Properties window. An illustrative image is shown below:



  5. Again the Select Image dialog box appears. Select another image file that is to be displayed when a user logs out. Click the OK button, as shown below:



  6. Similarly, Click the right side of the LogoutPageUrl property in the Properties window. This property is usually set to the name of the current Web page, as a user will be redirected to this page after logging out. An illustrative image is shown below:



  7. The Select URL dialog box appears. Select the Login.aspx file from the Contents of folder list box. Click the OK button, as shown below:



  8. The properties of the LoginStatus control can also be set by writing code. Open the source view of the Login.aspx page by clicking the Source tab at the bottom of the Web page. Write the code within the <asp:LoginStatus> element, as shown below:


Note: At runtime, the customized image will be displayed instead of the text in the button when a user logs in and logs out.


Rating:



Other articles

Click here to Article home

 
uCertify.com | Our Company | Articles | Privacy | Security | Contact Us | News and Press Release | uCertify India
MCSE: MCSA, MCTS, MCITP    JAVA Certification: SCJP, SCWCD Cisco Certification: CCNA, CCENT, A+, Network+, Security+
Oracle Certification: OCP 9i, OCP 10g, OCA 9i, OCA 10g CIW foundation    EC-212-32    CISSP    Photoshop ACE    Adobe Flash ACE
© 2008 uCertify.com. All rights reserved. All trademarks are the property of their respective owners.