Asp.Net interview Questions and Answers Part 5

1.) What is built-in object in                                                                          
2.) How to use connection string in web.config file?                                                 
<add key="msg" value="msdotnet"/>
<add key="app_con" value="data source=my-pc;integrated security=yes;database=mas"/>
  • App settings makes the code faster.
  • It allows better codes separation and clarity.
3.) What are the different types of directories used in .Net ?                                   
  • @Page
  • @Import
  • @Control
  • @Register
  • @Reference
  • @Output Cache
  • @Assembly
  • @Implements
4.) What is the default timeout of session in ?                                                    
20 Min

5.) What is Namespace used for Globalization and Localization in ?       
  • System.Globalization
  • System.Resources
6.) How to know this website is made in,asp,jsp,html,php etc.?                
  We can see the extension of  each type of web application in url bar as given below:-
  • ASP.NET  ---> .aspx
  • ASP   --->.asp
  • java ---> .jsp
  • HTML ---> .html
  • PHP --->.php
But some time you have not found any extension in url bar in web application, then you have to put each extension in url bar one by one and check, if no error is found then you can easily predict that application. 
7.) What is caching concepts in ?                                                                               
Caching is a place where data is stored temporarily. This data can be stored for a specific time period on the server or client system.
More Details.....

8.) What are the different types of caching in ?                                                   
  • Output Caching
  • Fragment caching
  • Data caching
9.) What is different between Execute Scalar and ExecuteNonQuery ?                    
ExecuteScalar :-->It Returns output value.It is basically used for fetching a single value.
ExecuteNonQuery:--> It does not return any value but number of rows affected by the Query.It is normally used to execute Insert and update commands.

10.) Can we run web application without web.config file ?                             


  1. what is a sql injection in Asp.Net?

    1. Hi priya ! sql injection is a technique,in this any user can access any website's database by passing some url parameter in browser, if website has any loop whole.there are some technique to find whether website has any loop whole or not.if you build any website for any organization then you have to pass parameter value in your connection string .then it will free from sql injection.
      you can see, different connection strings and other security features in as below link.

  2. Hello Ramashanker... your que. no.4 is wrong->What is the default timeout of session in ?
    Right answer is 20 . To confirm just put your whole question on google and rectify your answer.

  3. hi bikash, thank you for this...
    this is my typing mistake.. every .net developers know about that...sorry!..


Powered by Blogger.