Asp.Net interview Questions and Answers Part 5

By
1.) What is built-in object in asp.net?                                                                          
2.) How to use connection string in web.config file?                                                 
<appSettings>
<add key="msg" value="msdotnet"/>
<add key="app_con" value="data source=my-pc;integrated security=yes;database=mas"/>
 </appSettings>\
Note:
  • 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 asp.net ?                                                    
20 Min

5.) What is Namespace used for Globalization and Localization in asp.net ?       
  • System.Globalization
  • System.Resources
6.) How to know this website is made in asp.net,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 asp.net ?                                                                               
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 asp.net ?                                                   
  • 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 asp.net web application without web.config file ?                             
Yes.

5 comments:

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

    ReplyDelete
    Replies
    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 asp.net 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 asp.net as below link.
      http://www.msdotnet.co.in/2013/12/how-to-use-different-connection-strings.html

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

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

    ReplyDelete

Powered by Blogger.