Skip to Content

TheBlogReaders.com

Salesforce.com, PHP, MySQL, Javascript, Ajax, Htacces

ASP.Net Interview Questions and Answers for Freshers and Experience Part-12

Be First!

asp.net67. Where should the data validations be performed-at the client side or at the server side and why?
Data validations should be done primarily at the client side and the server-side validation should be avoided because it makes server task overloaded. If the client-side validation is not available, you can use server-side validation. When a user sends a request to the server, the validation controls are invoked to check the user input one by one.

68. Why do we need nested master pages in a Web site?
When we have several hierarchical levels in a Web site, then we use nested master pages in the Web site.

69. How can you dynamically add user controls to a page?
User controls can be dynamically loaded by adding a Web User Control page in the application and adding the control on this page.

70. What is the appSettings Section in the web.config file?
The web.config file sets the configuration for a Web project. The appSettings block in configuration file sets the user-defined values for the whole application.

For example, in the following code snippet, the specified ConnectionString section is used throughout the project for database connection:
<configuration>
<appSettings>
<add key=”ConnectionString” value=”careerbuzzserver=server; pwd=dbpassword; database=careerbuzz” />
</appSettings>

71. What type of code, client-side or server-side, is found in a code-behind file of a Web page?
A code-behind file contains the server-side code, which means that the code contained in a code-behind file is executed at the server.

72. To which class a Web form belongs to in the .NET Framework class hierarchy?
A Web form belongs to the System.Web.UI.Page class.

(77)

Previous
Next

Leave a Reply