Q. 1. What is ASP.Net?
Q. 2. In which event of page cycle is the ViewState available?
After the Init() and before the Page_Load().
Q. 3. From which base class all Web Forms are inherited?
Q. 4. What are the different validators in ASP.NET?
There are six types of validator in ASP.NET: 1-Required field Validator 2-Range Validator 3-Compare Validator 4-Custom Validator 5-Regular expression Validator 6-Summary Validator
Q. 5. Which validator control you use if you need to make sure the values in two different controls matched?
Compare Validator control
Q. 6. What is ViewState?
ViewState is used to retain the state of server-side objects between page post backs.
Q. 7. How long the items in ViewState exists?
They exist for the life of the current page.
Q. 8. What is caching?
Caching is a technique used to increase performance by keeping frequently accessed data or files in memory. The request for a cached file/data will be accessed from cache instead of actual location of that file.
Q. 9. What are the different types of caching?
ASP.NET has 3 kinds of caching : 1-Output Caching 2-Fragment Caching 3-Data Caching
Q. 10. List the events in page life cycle?
1-Page_PreInit 2- Page_Init 3- Page_InitComplete 4- Page_PreLoad 5- Page_Load 6- Page_LoadComplete 7- Page_PreRender 8-Render
Q. 11. Can we add code files of different languages in App_Code folder?
No. The code files must be in same language to be kept in App_code folder.
Q. 12. What is Protected Configuration?
It is a feature used to secure connection string information.
Q. 13. What is the good practice to implement validations in aspx page?
Client-side validation is the best way to validate data of a web page. It reduces the network traffic and saves server resources.
Q. 14. Which protocol is used to call a Web service?
Q. 15. Can we have multiple web config files for an asp.net application?
Q. 16. What is the difference between web config and machine config?
Web config file is specific to a web application where as machine config is specific to a machine or server. There can be multiple web config files into an application where as we can have only one machine config file on a server.
Q. 17. What is RedirectPermanent in ASP.Net?
Redirect Permanent Performs a permanent redirection from the requested URL to the specified URL. Once the redirection is done, it also returns 301 Moved Permanently responses.
Q. 18. List all templates of the Repeater control?
1-ItemTemplate 2-AlternatingltemTemplate 3-SeparatorTemplate 4-HeaderTemplate 5-FooterTemplate
Q. 19. List the major built-in objects in ASP.NET?
1-Application 2-Request 3-Response 4-Server 5-Session 6-Context 7-Trace
Q. 20. Which data type does the Range Validator control support?
The data types supported by the Range Validator control are Integer, Double, String, Currency, and Date.
Q. 21. What is the difference between an HtmlInputCheckBox control and an HtmlInputRadioButton control?
In HtmlInputCheckBoxcontrol, multiple item selection is possible whereas in HtmlInputRadioButton controls, we can select only single item from the group of items.
Q. 22. Which namespaces are necessary to create a localized application?
Q. 23. What are the different types of cookies in ASP.NET?
1-Session Cookie ? Resides on the client machine for a single session until the user does not log out. 2-Persistent Cookie ? Resides on a user?s machine for a period specified for its expiry, such as 10 days, one month, and never.
Q. 24. What is the file extension of web service?
Web services have file extension .asmx.
Q. 25. What is the difference between ExecuteScalar and ExecuteNonQuery?
ExecuteScalar returns output value where as ExecuteNonQuery does not return any value but the number of rows affected by the query. ExecuteScalar used for fetching a single value and ExecuteNonQuery used to execute Insert and Update statements.