Interview Questions: ASP. NET
1. Describe the role of inetinfo.exe, aspnet_isapi.dll and aspnet_wp.exe in the page loading process.
Inetinfo.exe is the Microsoft IIS server running, handling ASP. net requests among other things. when an ASP. NET Request is already ed (usually a file. aspx extension), the ISAPI filter aspnet_isapi.dll takes care of it by passing the request tothe actual worker process aspnet_wp.exe.
2. What's the difference between response. Write () and response. Output. Write ()?
The latter one allows you to write formatted output.
3. What methods are fired during the page load?
Init ()-When the pageis instantiated, load ()-When the page is loaded into server memory, prerender ()-the brief moment before the page is displayed to the user ashtml, unload ()-When page finishes loading.
4. Where does the web page belong in the. NET Framework class hierarchy?
System. Web. UI. Page
5. Where do you store the information about the user's locale?
System. Web. UI. Page. Culture
6. What's the difference between codebehind = "mycode. aspx. cs" and src = "mycode. aspx. cs "?
Codebehind is relevant to Visual Studio. NET only.
7. What's a bubbled event?
When you have a complex control, like DataGrid, writing an event processing routine for each object (cell, button, row, etc .) is quite tedious. the controls can bubble up their eventhandlers, allowing the main DataGrid event handler to take care of its constituents.
8. Suppose you want a certain ASP. NET function executed on Mouseover over a certain button. Where do you add an event handler?
It's the attributesproperty, the Add function inside that property. So btnsubmit. Attributes. Add ("onmouseover", "someclientcode ();")
9. What data type does the rangevalidator control support?
Integer, string and date.
10. Explain the differences between server-side and client-side code?
Server-side code runs on the server. client-side code runs in the clients 'browser.
11. What type of code (server or client) is found in a code-behind class?
Server-side code.
12. shocould validation (did the user enter a real date) occur server-side or client-side? Why?
Client-side. This has CES an additional request to the server to validate the users input.
13. What does the "enableviewstate" property do? Why wocould I want it on or off?
It enables the viewstate on the page. It allows the page to save the users input on a form.
14. What is the difference between server. Transfer and response. Redirect? Why wocould I choose one over the other?
Server. Transfer is used to post a form to another page. response. Redirect is used to redirect the user to another page or site.
15. Can you explain the difference between an ADO. Net dataset and An ADO recordset?
· A dataset can represent an entire relational database in memory, complete with tables, relations, and views.
· A dataset is designed to work without any continuing connection to the original data source.
· Data in a dataset is bulk-loaded, rather than being loaded on demand.
· There's no concept of cursor types in a dataset.
· Datasets have no current record pointer you can use for each loops to move through the data.
· You can store your edits in a dataset, and write them to the original data source in a single operation.
· Though the dataset is universal, other objects in ADO. Net come in different versions for different data sources.
16. Can you give an example of what might be best suited to place in the application_start and session_start subroutines?
This is where you can set the specific variables for the application and session objects.
17. if I'm developing an application that must accommodate multiple security levels though secure login and my asp. net web application is spanned into SS three web-servers (using round-robin load balancing) What wocould be the best approach to maintain login-in state for the users?
Maintain the login state security through a database.
18. Can you explain what inheritance is and an example of when you might use it?
When you want to inherit (use the functionality of) another class. base class employee. A manager class cocould be derived from the employee base class.
19. Whats an assembly?
Assemblies are the building blocks of the. NET Framework. Overview of assemblies from msdn.
20. Describe the difference between inline and code behind.
Inline code written along side the HTML in a page. Code-behind is code written in a separate file and referenced by the. ASPX page.
21. Explain what a DiffGram is, and a good use for one?
The DiffGram is one of the two XML formats that you can use to render DataSet object contents to XML. For reading database data to an XML file to be sent to a web service.
22. Whats msil, And why shoshould my developers need an appreciation of it if at all?
Msil is the Microsoft intermediate language. All. Net compatible versions ages will get converted to msil.
23. Which method do you invoke on the dataadapter control to load your generated dataset with data?
The. Fill () method
24. Can you edit data in the Repeater control?
No, it just reads the information from its Data Source
25. Which template must you provide, in order to display data in a repeater control?
Itemtemplate
26. How can you provide an alternating color scheme in a repeater control?
Use the alternatingitemtemplate
27. What property must you set, and what method must you call in your code, in order to bind the data from some data source to the Repeater control?
You must set the datasource property and call the databind method.
28. What base class do all web forms inherit from?
The page class.
29. Name two properties common in every validation control?
Controltovalidate property and text property.
30. What tags do you need to add within the ASP: DataGrid tags to bind columns manually?
Set autogeneratecolumns property to false on the DataGrid tag
31. What tag do you use to add a hyperlink column to the DataGrid?
32. What is the transport protocol you use to call a web service?
Soap is the preferred protocol.
33. True or false: A web service can only be written in. Net?
False
34. What does WSDL stand?
Web Services Description Language
35. Where on the Internet wocould you look for Web Services?
Http://www.uddi.org
36. Which property on a combo box do you set with a column name, prior to setting the datasource, to display data in the combo box?
Datatextfield Property
37. Which control wocould you use if you needed to make sure the values in two different controls matched?
Comparevalidator Control
38. True or false: To test a web service you must create a Windows application or web application to consume this service?
False, the WebService comes with a test page and it provides HTTP-GET method to test.
39. How many classes can a single. Net DLL contain?
It can contain in your classes.
please visit http://www.techinterviews.com to get more questions.