.NET - ASP.NET

45.
Explain login controls.
Login controls are built-in controls in ASP.Net for providing a login solution to ASP.NET application. The login controls use the membership system to authenticate a user credentials for a Web site.

There are many controls in login controls.
  • ChangePassword control - Allows users to change their password.
  • CreateUserWizard control - Provides an interface to the user to register for that Web site.
  • Login control - Provides an interface for user authentication. It consists of a set of controls, such as TextBox, Label, Button, CheckBox, HyperLink.
  • LoginView control - Displays appropriate information to different users according to the user's status.
  • LoginStatus control - Shows a login link to users, who are not authenticated and logout link, who are authenticated
  • LoginName control - Displays a user name, if the user logs in.
  • PasswordRecovery control - Allows users to get back the password through an e-mail, if they forget.

46.
What is the use of PlaceHolder control? Can we see it at runtime?
The PlaceHolder control acts as a container for those controls that are dynamically generated at runtime. We cannot see it at runtime because it does not produce any visible output. It used only as a container.

47.
What setting must be added in the configuration file to deny a particular user from accessing the secured resources?
To deny a particular user form accessing the secured resources, the web.config file must contain the following code:

<authorization >
<deny users="username" />
</authorization>

48.
What are the event handlers that can be included in the Global.asax file?
The Global.asax file contains some of the following important event handlers:
  • Application_Error
  • Application_Start
  • Application_End
  • Session_Start
  • Session_End