interview questions asp[1]

151
Interview Questions: ASP.NET ASP.NET Interview Questions This is a list of questions I have gathered and created over a period of time from my experience, many of which I felt where incomplete or simply wrong. I have finally taken the time to go through each question and correct them to the best of my ability. However, please feel free to post feedback to challenge, improve, or suggest new questions. I want to thank those of you that have contributed quality questions and corrections thus far. There are some questions in this list that I do not consider to be good questions for an interview. However, they do exist on other lists available on the Internet so I felt compelled to keep them here for easy access. 1. Describe the role of inetinfo.exe, aspnet_isapi.dll andaspnet_wp.exe in the page loading process. inetinfo.exe is theMicrosoft IIS server running, handling ASP.NET requests among other things.When an ASP.NET request is received (usually a file with .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() andResponse.Output.Write()? Response.Output.Write() allows you to write formatted output. 3. What methods are fired during the page load? Init() - when the page is instantiated Load() - when the page is loaded into server memory PreRender() - the brief moment before the page is displayed to the user as HTML Unload() - when page finishes loading. 4. When during the page processing cycle is ViewState available? After the Init() and before the Page_Load(), or OnLoad() for a control. 5. What namespace does the Web page belong in the .NET Framework class hierarchy? System.Web.UI.Page 6. Where do you store the information about the user’s locale? System.Web.UI.Page.Culture 7. What’s the difference between Codebehind="MyCode.aspx.cs" andSrc="MyCode.aspx.cs"? CodeBehind is relevant to Visual Studio.NET only. 8. 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.

Upload: jhalmoori

Post on 24-Mar-2015

136 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Interview Questions ASP[1]

Interview Questions: ASP.NET

ASP.NET Interview Questions

This is a list of questions I have gathered and created over a period of time from my experience, many of which I felt where incomplete or simply wrong.  I have finally taken the time to go through each question and correct them to the best of my ability.  However, please feel free to post feedback to challenge, improve, or suggest new questions.  I want to thank those of you that have contributed quality questions and corrections thus far.

There are some questions in this list that I do not consider to be good questions for an interview.  However, they do exist on other lists available on the Internet so I felt compelled to keep them here for easy access.

1. Describe the role of inetinfo.exe, aspnet_isapi.dll andaspnet_wp.exe in the page loading process.inetinfo.exe is theMicrosoft IIS server running, handling ASP.NET requests among other things.When an ASP.NET request is received (usually a file with .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() andResponse.Output.Write()?Response.Output.Write() allows you to write formatted output.  

3. What methods are fired during the page load?Init() - when the page is instantiatedLoad() - when the page is loaded into server memoryPreRender() - the brief moment before the page is displayed to the user as HTMLUnload() - when page finishes loading.  

4. When during the page processing cycle is ViewState available?After the Init() and before the Page_Load(), or OnLoad() for a control.  

5. What namespace does the Web page belong in the .NET Framework class hierarchy?System.Web.UI.Page  

6. Where do you store the information about the user’s locale?System.Web.UI.Page.Culture  

7. What’s the difference between Codebehind="MyCode.aspx.cs" andSrc="MyCode.aspx.cs"?CodeBehind is relevant to Visual Studio.NET only.  

8. 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.  

9. Suppose you want a certain ASP.NET function executed on MouseOver for a certain button.  Where do you add an event handler?Add an OnMouseOver attribute to the button.  Example: btnSubmit.Attributes.Add("onmouseover","someClientCodeHere();");  

10. What data types do the RangeValidator control support?Integer, String, and Date.  

11. Explain the differences between Server-side and Client-side code?Server-side code executes on the server.  Client-side code executes in the

Page 2: Interview Questions ASP[1]

client's browser.  

12. What type of code (server or client) is found in a Code-Behind class?The answer is server-side code since code-behind is executed on the server.  However, during the code-behind's execution on the server, it can render client-side code such as JavaScript to be processed in the clients browser.  But just to be clear, code-behind executes on the server, thus making it server-side code.  

13. Should user input data validation occur server-side or client-side?  Why?All user input data validation should occur on the server at a minimum.  Additionally, client-side validation can be performed where deemed appropriate and feasable to provide a richer, more responsive experience for the user.  

14. What is the difference between Server.Transfer and Response.Redirect? Why would I choose one over the other?Server.Transfer transfers page processing from one page directly to the next page without making a round-trip back to the client's browser.  This provides a faster response with a little less overhead on the server.  Server.Transfer does not update the clients url history list or current url.  Response.Redirect is used to redirect the user's browser to another page or site.  This performas a trip back to the client where the client's browser is redirected to the new page.  The user's browser history list is updated to reflect the new address.  

15. Can you explain the difference between an ADO.NET Dataset and an ADO Recordset?Valid answers are:·  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 many 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. What is the Global.asax used for?The Global.asax (including the Global.asax.cs file) is used to implement application and session level events.  

17. What are the Application_Start and Session_Start subroutines used for?This is where you can set the specific variables for the Application and Session objects.  

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.  Example: With a base class named Employee, a Manager class could 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.  

Page 3: Interview Questions ASP[1]

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.  A good use is reading database data to an XML file to be sent to a Web Service.  

22. Whats MSIL, and why should my developers need an appreciation of it if at all?MSIL is the Microsoft Intermediate Language. All .NET compatible languages will get converted to MSIL.  MSIL also allows the .NET Framework to JIT compile the assembly on the installed computer.  

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 a 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. 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.  

31. Which control would you use if you needed to make sure the values in two different controls matched?CompareValidator control.  

32. How many classes can a single .NET DLL contain?It can contain many classes. 

Web Service Questions1. What is the transport protocol you use to call a Web service?

SOAP (Simple Object Access Protocol) is the preferred protocol.  

2. True or False: A Web service can only be written in .NET?False  

3. What does WSDL stand for?Web Services Description Language.  

4. Where on the Internet would you look for Web services?http://www.uddi.org  

Page 4: Interview Questions ASP[1]

5. True or False: To test a Web service you must create a Windows application or Web application to consume this service?False, the web service comes with a test page and it provides HTTP-GET method to test. 

State Management Questions1. What is ViewState?

ViewState allows the state of objects (serializable) to be stored in a hidden field on the page.  ViewState is transported to the client and back to the server, and is not stored on the server or any other external source.  ViewState is used the retain the state of server-side objects between postabacks.  

2. What is the lifespan for items stored in ViewState?Item stored in ViewState exist for the life of the current page.  This includes postbacks (to the same page).  

3. What does the "EnableViewState" property do?  Why would I want it on or off?It allows the page to save the users input on a form across postbacks.  It saves the server-side values for a given control into ViewState, which is stored as a hidden value on the page before sending the page to the clients browser.  When the page is posted back to the server the server control is recreated with the state stored in viewstate.  

4. What are the different types of Session state management options available with ASP.NET?ASP.NET provides In-Process and Out-of-Process state management.  In-Process stores the session in memory on the web server.  This requires the a "sticky-server" (or no load-balancing) so that the user is always reconnected to the same web server.  Out-of-Process Session state management stores data in an external data source.  The external data source may be either a SQL Server or a State Server service.  Out-of-Process state management requires that all objects stored in session are serializable.

posted on Tuesday, March 16, 2004 8:14 AM

Feedback

# re: Interview Questions: ASP.NET 6/1/2004 5:00 AM pinak hey can anyone gimme some common basic questions on .net which can b expected in interview. Plz consider that i'm just beginer in .net. You can mail me at [email protected]. I'll b really thankfull to u ... bye

# re: Interview Questions: ASP.NET 6/25/2004 11:08 PM thomas hello friend

thankx for you questions. the questions seems to be little bit tough, so if you have prilim questions for a beginner, could you please send it to me.

with prayers..........................................thomas [email protected]

Page 5: Interview Questions ASP[1]

# re: Interview Questions: ASP.NET 7/1/2004 12:49 AM doubt 11. What type of code (server or client) is found in a Code-Behind class? Server-side code.

we can write client side code in code-behind calss like button1.Attributes.Add("onMouseOver", "window.open('webform1.aspx')")

pls help me

# re: Interview Questions: ASP.NET 7/1/2004 12:44 PM Mark Wagner You are correct. You can write dynamically created client-side code in the code-behind class just as you have shown in your example. I understand your question and believe you have a good point. However, I would argue the code-behind class should still be considered "server-side" code since that is where it is executing. Client-side code does not execute in the code-behind, it is simply text or data, not really code and is treated as such in the code-behind.

Your (excellent) example demonstrates the power of ASP in that a developer can dynamically create HTML, XML, or even Javascript in the code-behind. As you have pointed out, this dynamically generated code would execute on the client-side.

In short, you are correct in your assessment and appear to be able to intelligently answer this question should you encounter it in an interview. Great question!

# re: Interview Questions: ASP.NET 7/3/2004 10:36 AM Yasser Hi,

This is in response to Question 12, validation should occur on client side and server side both. Client side should happen to avoid server round trip, but it's easily possible to by-pass client side validation. Say if someone has turned of javascript in her browser or if the browser is not supporting javascript? In that scenario client side validation will not work. Hence if the validation is also done on server than such scenario can be avoided. The rule is whether validation occurs on client or not, but it should always occur on server.

# re: Interview Questions: ASP.NET 7/5/2004 10:26 PM Vivek Kumbhojkar This article is realyy good for beginners..

Excellent article

Vivek

# re: Interview Questions: ASP.NET 7/16/2004 11:00 PM vishal wadhawan This is a real good stuff.I liked it very much and i'll refer it to every fresher.

# re: Interview Questions: ASP.NET 7/20/2004 3:02 AM Rohit Kalia This is in response to Question 14 : What is the difference between Server.Transfer and Response.Redirect? Why would I choose one over the other?

server.transfer simply transfer execution to another page. this doesn't require any information to be sent to the browser== it all occurs on the server without the user's knowledge. The response.redirect method sends http information to the browser instructing it to go to another page.

Page 6: Interview Questions ASP[1]

[email protected]

# re: Interview Questions: ASP.NET 7/29/2004 11:31 AM Mukti ranjan It's very very useful for interview purpose. thanks for this good did.

# re: Interview Questions: ASP.NET 7/29/2004 11:07 PM vishal hi all I,m working in NIC .it's a very good question for all freshers who really want about the .net

# re: Interview Questions: ASP.NET 8/5/2004 12:01 AM sandy hi all, i think these questions r very much useful for freshers,but it will be more useful if u provide more questions on this topic bye to all sandy

# re: Interview Questions: ASP.NET 8/5/2004 9:05 PM Akhil Bhandari Good Stuff!!

Flood it with more....

# re: Interview Questions: ASP.NET 8/8/2004 11:04 PM Fahad Khalil Hi

About question 12... the validation on client side. Yes, one should perform the validation on client side... but as they say, *never trust your client, specially thin*.

So always perform validation on client side, try to save atleast one trip. If client is not messing with the HTML, then he is doing a favor on himself. If he is messing, let him waste his own band width.

To check whether all the validors on a page validate into *true*, before performing business, you better should do...

Page.IsValid

or if you want to perform validation for a particular validator, just do...

FieldValidator.IsValid.

Hope this helps :)

mEEEEEEEEEEEEEEE!!!!!!!

# re: Interview Questions: ASP.NET 8/11/2004 12:04 PM swapna could any one pls send me imp questions in .Net,ASP.Net,Sqlserver 2000 mail me on [email protected] thanks in advance

# re: Interview Questions: ASP.NET 8/16/2004 2:43 AM pradeep

Page 7: Interview Questions ASP[1]

The Questions are really great.

Thank you.

# re: Interview Questions: ASP.NET 8/16/2004 4:56 AM suresh Question are good enough for a fresher.

# re: Interview Questions: ASP.NET 8/18/2004 9:36 AM Sergey Most questions are good, but asking about property names or tag names has no benefit whatsoever. Why would I memorize them if I have intellisence and MSDN library? Rather concentrate on questions about general programming knowledge and understanding of ASP.NET concepts such as request/response, processing pipelines and code-behind.

# re: Interview Questions: ASP.NET 8/18/2004 10:08 AM Mark Wagner I agree Sergey.

# re: Interview Questions: ASP.NET 8/19/2004 12:28 PM RKA Good for Interview point of view, but require more additional question in practicle.

# re: Interview Questions: ASP.NET 9/2/2004 11:16 PM sarvjeet Thats really nice

# re: Interview Questions: ASP.NET 9/6/2004 2:54 AM Senthil Kumaran Yeah nice questions u have it here. But still towards OOPS concept and their implementation will do better

mail me @ [email protected] I do have some questions.........

Ever Loving, R. Senthil Kumaran

# re: Interview Questions: ASP.NET 9/7/2004 3:52 AM Ravi Nagaraj Its indeed a good article. Please if you find any interview questions for Beginner in ASP.net please mail it to [email protected] Thanks Ravi Nagaraj

# re: Interview Questions: ASP.NET 9/7/2004 5:38 AM Ravi Its real good Information. Thanks

# re: Interview Questions: ASP.NET 9/17/2004 10:20 AM Niveditha Hi

The questions and answers in this article are quite useful in an interview. But i am not satisfied by the answer to Q No.14. What is the difference between Server.Transfer and Response.Redirect? Why would I

Page 8: Interview Questions ASP[1]

choose one over the other?

My answer will be The Response .Redirect () method can be used to redirect the browser to specified url, pointing to any resource and may contain query strings and causes an extra roundtrip

Server.Transfer() performs server side redirection of the page avoiding extra roundtrip.

Server.Transfer() is preferred over Response.Redirect to avoid rountrip but the limitation is the aspx page should reside on same web server.

# re: Interview Questions: ASP.NET 9/27/2004 12:52 PM Rakesh M Naithani The Questions are really helpful for all of us and design as if we are at test.

Thank you.

# re: Interview Questions: ASP.NET 10/2/2004 9:00 PM anil sir very good

# re: Interview Questions: ASP.NET 10/4/2004 8:57 PM SS Very useful article.Thanks for spending the time to come up with such an article.Would really appreciate more questions regding general asp.net & OOP concepts...

# re: Interview Questions: ASP.NET 10/5/2004 1:33 PM jag tuelly remarkable

# ASP.NET Interview Q&A 10/8/2004 9:25 AM roux mohammed 1. Describe the role of inetinfo.exe, aspnet_isapi.dll andaspnet_wp.exe in the page loading process. inetinfo.exe is theMicrosoft IIS server running, handling ASP.NET requests among other things.When an ASP.NET request is received (usually a file with .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() andResponse.Output.Write()? The later one allows you to write formattedoutput. 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" andSrc="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

# re: Interview Questions: ASP.NET 10/8/2004 10:47 AM Mark Wagner

Page 9: Interview Questions ASP[1]

Roux,

Excellent questions. I will "eventually" add them to the main list above.

Thanks!

# re: Interview Questions: ASP.NET 10/10/2004 6:33 PM santhosh chary hi iam fresher, addemding interviews.any one can send me faqs,maninly on oops concept,web services/remoting,security and windows services

# re: Interview Questions: ASP.NET 10/14/2004 1:29 AM Erik Lane Great stuff along with your others too.

# re: Interview Questions: ASP.NET 10/15/2004 5:22 AM satyan Thanks ,

Help every one to reach their Dream Job .

# re: Interview Questions: ASP.NET 10/21/2004 11:36 PM Horatiu Cristea Sergey, you know there is a point in asking about proprety names and tag names :) knowing those answers, could prove the interviewed person that he has worked with that stuff, not just theoreticaly knowledge. For example what is the difference between visibility and display styles for a html tag?

but what iritates me at intervies and tests is that there are companies that give you as test a small project to do. This has no relevance in my point of view. instead i prefer to test the coding skill on paper. i usualy ask the person to write me on paper a snippet of code of 5-10 lines of code.

# re: Interview Questions: ASP.NET 11/7/2004 11:13 PM mouli very good

# re: Interview Questions: ASP.NET 11/13/2004 9:03 PM kris

ASP.NET Interview Questions

1. Describe the role of inetinfo.exe, aspnet_isapi.dll andaspnet_wp.exe in the page loading process. inetinfo.exe is theMicrosoft IIS server running, handling ASP.NET requests among other things.When an ASP.NET request is received (usually a file with .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() andResponse.Output.Write()? The latter one allows you to write formattedoutput.

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.

Page 10: Interview Questions ASP[1]

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" andSrc="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 overa 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. Should validation (did the user enter a real date) occur server-side or client-side? Why? Client-side. This reduces an additional request to the server to validate the users input.

13. What does the "EnableViewState" property do? Why would 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 would 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 many 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 across three web-servers (using round-robin load balancing) what would be the best approach to maintain login-in state for the

Page 11: Interview Questions ASP[1]

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 could 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 should my developers need an appreciation of it if at all? MSIL is the Microsoft Intermediate Language. All .NET compatible languages 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

Page 12: Interview Questions ASP[1]

34. What does WSDL stand for? (Web Services Description Language)

35. Where on the Internet would 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 would 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 many classes.

# re: Interview Questions: ASP.NET 11/17/2004 3:47 AM Sharad Hi I am Working in Hanu Software Systems . It will be Good If u also Provide all the quetions through topic wise

# re: Interview Questions: ASP.NET 11/17/2004 3:47 AM Sharad Hi I am Working in Hanu Software Systems . It will be Good If u also Provide all the quetions through topic wise

# re: Interview Questions: ASP.NET 11/18/2004 10:30 PM arati its very nice to have such a website, Its good if u provide topicwise questions

# re: Interview Questions: ASP.NET 11/22/2004 10:48 PM Senthilkumar Thirukkami Hi,

Questions listed in the articles sounds good. I am adding more to the above mentioned list. As many opted for some basics in .NET.

1) What is CLS (Common Language Specificaiton)? It provides the set of specificaiton which has to be adhered by any new language writer / Compiler writer for .NET Framework. This ensures Interoperability. For example: Within a ASP.NET application written in C#.NET language, we can refer to any DLL written in any other language supported by .NET Framework. As of now .NET Supports around 32 languages.

2) What is CTS (Common Type System)? It defines about how Objects should be declard, defined and used within .NET. CLS is the subset of CTS.

3) What is Boxing and UnBoxing? Boxing is implicit conversion of ValueTypes to Reference Types (Object) . UnBoxing is explicit conversion of Reference Types (Object) to its equivalent ValueTypes. It requires type-casting.

4) What is the difference between Value Types and Reference Types? Value Types uses Stack to store the data where as the later uses the Heap to store the data.

Page 13: Interview Questions ASP[1]

5) What are the different types of assemblies available and their purpose? Private, Public/shared and Satellite Assemblies.

Private Assemblies : Assembly used within an application is known as private assemblies

Public/shared Assemblies : Assembly which can be shared across applicaiton is known as shared assemblies. Strong Name has to be created to create a shared assembly. This can be done using SN.EXE. The same has to be registered using GACUtil.exe (Global Assembly Cache).

Satellite Assemblies : These assemblies contain resource files pertaining to a locale (Culture+Language). These assemblies are used in deploying an Gloabl applicaiton for different languages.

6) Is String is Value Type or Reference Type in C#? String is an object (Reference Type).

More to come....

Thanks & Regards, Senthilkumar.Thirukkami [email protected]

# re: Interview Questions: ASP.NET 11/26/2004 3:29 AM Omendra Hi all.This is very good u provide guide like this. Omendra

# re: Interview Questions: ASP.NET 11/27/2004 12:08 AM sivamohanreddy Please give me description about the difference between Codebehind and Src

this is very urgent

# re: Interview Questions: ASP.NET 11/29/2004 6:06 AM Venkatajalapathi Good Job, this questions is very useful for beginners.

# re: Interview Questions: ASP.NET 12/3/2004 10:19 PM Narendra Singh This is nice to have such questions on net. Its really helpful.

# re: Interview Questions: ASP.NET 12/5/2004 4:47 AM Niks Good set of questions.

I feel the difference between "src" and "code behind" tag can be better explained from the deployment perspective. When "code behind" tag is used, ASP.NET expects the precompiled dll on the server. When "src" tag is used the code behind is converted to MSIL just in time. Then it does not expect the pre-compiled DLL. So directly the .cs (if C# is used) can be deployed on the server. For further details Microsift msdn help - Knowledge base can be looked.

Page 14: Interview Questions ASP[1]

# re: Interview Questions: ASP.NET 12/16/2004 3:02 AM binay hello can anyone provide me some common basic questions on .net which can b expected in interview. consider me as a beginner. pls do mail me with Ans. at [email protected]. I'll b really thankfull to u ... bye

# re: Interview Questions: ASP.NET 12/16/2004 3:29 AM hemant sudehely this is too much helpful, so thaks for this and continue and if i can contribute than how can.

# re: Interview Questions: ASP.NET 12/16/2004 7:06 AM Sahana Can anyone give interview quesions about OOP and c#

# re: Interview Questions: ASP.NET 12/16/2004 10:08 AM Shriram Nimbolkar These are really very good Q & A and those helped me a lot!

# re: Interview Questions: ASP.NET 12/18/2004 6:01 AM R J Singh

Thanks for you questions.

Can u send me some more quetion on asp.net and C#.

My Email id is [email protected]

Regrads & Thanks

R J Singh

# re: Interview Questions: ASP.NET 12/20/2004 1:34 AM Subhajit Biswas This is excellent !! would certainely expect something more..

[email protected]

# re: Interview Questions: ASP.NET 12/20/2004 5:17 AM P.K.MANIKANDAN Thanks for you questions.

Can u send me some more quetion on asp.net and C#.

My Email id is [email protected]

Regrads & Thanks

P.K.MANIKANDAN

Page 15: Interview Questions ASP[1]

# re: Interview Questions: ASP.NET 3/11/2005 12:21 PM Developer in Seattle Someone posts a great article, and the feedback thread is littered with requests for more help. Are you guys idiots? Why should anyone take time out of their day to send you anything?

# re: Interview Questions: ASP.NET 3/14/2005 2:00 AM deepak these question r not enough for interview plz add more question and mail me [email protected]

# re: Interview Questions: ASP.NET 3/14/2005 2:00 AM deepak these question r not enough for interview plz add more question and mail me [email protected]

# re: Interview Questions: ASP.NET 3/15/2005 2:13 AM Santhosh Hi All,

The questions published are good. I would like to refer a website which contains the basic questions and answers on .net

http://www.andymcm.com/dotnetfaq.htm

regards, Santhosh.

# re: Interview Questions: ASP.NET 3/17/2005 11:27 PM Giribabu.T Dear friends, U can send Interview model papers on this, If u have any. If u do so, i am very thankfull to u. If it is possible to u u can mail me: [email protected]

# re: Interview Questions: ASP.NET 3/21/2005 12:10 AM s kotteeswaran sir, please give some Asp.Net Interview Questions it is usefull for me.plz send my url. Thank you s.kotteeswaran

# New questions from today! 3/21/2005 7:17 PM Bork, James Bork. 1. What is the user in an asp.net application?

2. How can you unload an asp.net app without touching the iis?

3. What is "delegation" in c# ?

4. in a load balancing environment, which way you choose to maintain state info, if security is important?

5. What is the life cycle of an asp.net page? (events, from start to end)

6. What command line tools do we have in .net environment?

Page 16: Interview Questions ASP[1]

7. What is the plugin architecture? how to use it?

That's it for today, see if you have answers...

# re: Interview Questions: ASP.NET 3/22/2005 6:34 AM Rathi Hello sir,

Can u send me some more asp.net and vb.net interview questions with answers my emailid is [email protected]

Thank you, B.sharu

# re: Interview Questions: ASP.NET 3/22/2005 11:34 PM Dhruv goyal it's great help . thnx for all these ... but better if some question related to praticle situation can come.. thnx

# re: Interview Questions: ASP.NET 3/28/2005 4:37 AM sprakash

Can u send me some more asp.net and vb.net interview questions with answers my emailid is [email protected] Thank you, sprakash

# re: Interview Questions: ASP.NET 3/28/2005 9:38 AM Venkataramana Alladi 1. What is the purpose of XSLT other than displaying XML contents in HTML?

2. How to refresh a static HTML page?

3. What is the difference between DELETE and TRUNCATE in SQL?

4. How to declare the XSLT document?

5. What are the data Islands in XML?

6. How to initialize COM in ASP?

7. What are the deferences of DataSet and ???

8. What are the cursers in ADO?

9. What are the in-build components in ASP?

10. What are the Objects in ASP?

Can any body send more ASP.net questions to [email protected]

Page 17: Interview Questions ASP[1]

# MCAD question Bank 4/2/2005 4:07 AM ToLearn Please give sites or links containing MCAD questions and answers.Please mail it to [email protected] or [email protected]

# re: Interview Questions: ASP.NET 4/4/2005 10:12 PM jagadeesh This is a real good stuff. I liked it very much and i'll refer it to every fresher.

# re: Interview Questions: ASP.NET 4/6/2005 11:19 AM SANDEEP KUMAR GUPTA Excellent ! Really these questions will be very beneficial for freshers. I like these very much and hope you will send these type important question on my E-mail. E-mail :- [email protected]

# re: Interview Questions: ASP.NET 4/7/2005 8:29 AM ravi kumar Excellent ! Really these questions will be very HELPFUL for freshers. pl.send these type important question on my E-mail. E-mail :- [email protected]

# re: Interview Questions: ASP.NET 4/9/2005 9:56 PM armugam I want interview question on asp.net, c#

# re: Interview Questions: ASP.NET 4/16/2005 3:38 AM [email protected] Questions are good.

# re: Interview Questions: ASP.NET 4/18/2005 3:12 AM praveen these questions are extremely fantastic.as a fresher like me, these are very helpful.I like these very much and hope you will send these type important question on my E-mail.

# re: Interview Questions: ASP.NET 4/18/2005 3:22 AM Deepu I like these very much and hope you will send these type important question on my E-mail.

#  Interview Questions: ASP.NET 4/19/2005 9:53 PM inder Excellent ! Really these questions will be very beneficial for freshers. I like these very much and hope you will send these type important question on my E-mail. E-mail :- [email protected]

# re: Interview Questions: ASP.NET 4/19/2005 9:55 PM inder Excellent ! Really these questions will be very beneficial for freshers. I like these very much and hope you will send these type important question on my E-mail. E-mail :- [email protected]

Page 18: Interview Questions ASP[1]

# re: Interview Questions: ASP.NET 4/20/2005 5:59 AM Santhosh Hi all,

Can anyone provide me some common questions on ASp.net which can be expected in interview. consider me as a beginner. pls do mail me with Ans.

It will be very helpfull for my preparations

My email id is [email protected]

# re: Interview Questions: ASP.NET 4/21/2005 9:08 PM Ravi Bais Excellent ! Really these questions will be very beneficial for all. I like these very much and hope you will send these type important question on my E-mail. E-mail :- [email protected]

# re: Interview Questions: ASP.NET 4/22/2005 8:45 PM Saravanan Really i am satiesfied with this notes i like this site shuld continue thier service

# re: Interview Questions: ASP.NET 4/29/2005 10:19 PM Bindu 1.Using ADO.NET Datareader a user extracted data from a database table having 5 records.What happens if another user adda 5 more records to the table same time.Can the first user extracted records become 10 instead of 5 or will it remain same 5? what about same case when ADO ? pls explain in detail.

2. Using ADO.NET Datareader a user extracts data from a database table having 1000 rows.He closed his browser in between. that is after fetching only 50 records. What happens to the Datareader?will it remain connected? and will fetch 1000 records and what after? will garbage collector collect and dispose it soon?

3. A user fetched dtata from a database table using Dataset(Disconnected records) for updation. Another user deleted the table just after. what happens when the first user try to update the table after changes? Error or Something else?

4. What are different types of assemblies in ASP.NET?

5.where is session id stored in ASP? in IIS aerver or ASP Engine?

# re: Interview Questions: ASP.NET 5/2/2005 9:07 AM Ishanth I really appreciate this piece of work. At the same time i support comments from "Developer in Seattle". Instead of asking your personal copies of the documents why dont you come and visit this link again and copy the entire contents into a document. I'm not able to understand why are they demanding for spoonfeeding??

Page 19: Interview Questions ASP[1]

btw i'd like to share some more links which might help people who are in search of .NET questions.

http://www.hanselman.com/blog/PermaLink.aspx?guid=2d2fae59-a589-4c43-b6a5-b6 ebc1a9eafd http://www.techinterviews.com/?p=193

# re: Interview Questions: ASP.NET 5/2/2005 10:08 PM alin I really appreciate this answers. You are doing so great job here. Thank you so much.

# re: Interview Questions: ASP.NET 5/3/2005 4:25 AM Vijay here are few more....

http://www.geekinterview.com

# re: Interview Questions: ASP.NET 5/4/2005 11:12 AM dan When designing an ASCX control is it good practice to use read from the viewstate in onload event of the control? Why or Why not.

answer: Its not good practice because if the control is loaded in page_load by use of LoadControl() it will not see any of its own viewstate in onload. So if there is a textbox on the ascx that the control needs it will not be able to see the postback data.

onload { string temp = textbox1.text }

temp = ""

At the end of the onload event it will sync back up with viewstate. So in any of the userfired events it will have the correct values.

Also anything that is not named or loaded global must be loaded before it will respond to events on the pages round trip.

If the control is named in the html portion it will have its viewstate synced already in pageload.

# re: Interview Questions: ASP.NET 5/7/2005 12:28 AM syed anwar ali A nice piece of work.

# re: Interview Questions: ASP.NET 5/10/2005 1:14 AM abcd hmm fine

# re: Interview Questions: ASP.NET 5/11/2005 5:06 AM Yogi_virgin

Page 20: Interview Questions ASP[1]

thanks buddy !!!!!!!!!!!!!

# re: Interview Questions: ASP.NET 5/11/2005 5:31 AM mayur hi it is gr8 & very helpful 4 me

# re: Interview Questions: ASP.NET 5/11/2005 9:10 AM Mukesh Kumar I wants more interviews Question on asp.net, controls

# re: Interview Questions: ASP.NET 5/11/2005 9:17 PM Jaineesh Pleae send me more latest questions About ASP.Net.

Thanking you,

Yours sincerely,

Jaineesh

# re: Interview Questions: ASP.NET 5/11/2005 9:22 PM Jaineesh Please send me good more questions about ASP.Net on [email protected]

Thanking you,

Yours sincerely,

Jaineesh

# re: Interview Questions: ASP.NET 5/17/2005 4:29 AM Ravi Goyal i am new to ASP.NET please guide me how to approch to learn asp.net send me more questions also.

i will be very thankful of you. Regards

Ravi Goyal

# re: Interview Questions: ASP.NET 5/17/2005 5:36 AM Vivek Harne Hi all,

I want the ASP.Net interview question and examples urgently. please forword it on my email-id.

[email protected]

Vivek Harne

# re: Interview Questions: ASP.NET 5/19/2005 4:59 AM rojali thanx fpr the questions.

Page 21: Interview Questions ASP[1]

# re: Interview Questions: ASP.NET 5/22/2005 10:15 PM Vivek sharma Hi all,

I want the ASP.Net interview question and examples urgently. please forword it on my email-id. These responses r really very satisfactory. Thank you.

# re: Interview Questions: ASP.NET 5/22/2005 10:34 PM P.Durga Rao Hi I need the Questions mainly asked in WebServices and Remoting. Thanks

# re: Interview Questions: ASP.NET 5/22/2005 10:34 PM P.Durga Rao Hi I need the Questions mainly asked in WebServices and Remoting. Thanks

# re: Interview Questions: ASP.NET 5/22/2005 10:34 PM P.Durga Rao Hi I need the Questions mainly asked in WebServices and Remoting. Thanks

# re: Interview Questions: ASP.NET 5/24/2005 1:31 PM RAJU Hi all,

I need the frequently asked interview questions on asp.net, C#, webservices and remoting. Please send to my email id. [email protected]

it will be very helpful to me.

Thanks

# re: Interview Questions: ASP.NET 5/24/2005 10:24 PM renju

Can u send me some more .net and ASP.NET interview questions with answers my emailid is [email protected] Thank you, renju

# re: Interview Questions: ASP.NET 5/26/2005 2:32 PM Ram How many "cache" statements can we have in "try" block in C#?

# re: Interview Questions: ASP.NET 5/26/2005 7:58 PM KS Does anyone know about any job openings for ASP.NET

# re: Interview Questions: ASP.NET 5/27/2005 12:16 AM Venkatesh Please send me the interview questions in ASP.NEt and C#.

Page 22: Interview Questions ASP[1]

# re: Interview Questions: ASP.NET 5/27/2005 10:51 PM Harish gopinath Hi,

Please send me some VB.Net based questions. Please send it to [email protected]

Regards, Harish

# re: Interview Questions: ASP.NET 5/29/2005 6:33 AM Ramakant Singh Dear Sir,

I need the frequently asked interview questions and answer on VB.Net, ASP.Net, C#. Please send to my email id. [email protected].

It will be very helpful to me.

Regards, Ramakant Singh

# re: Interview Questions: ASP.NET 5/29/2005 10:44 PM santhosh Dear Sir,

I need the frequently asked interview questions and answer on VB.Net, ASP.Net, C#. Please send to my email id. [email protected].

# re: Interview Questions: ASP.NET 5/31/2005 5:53 AM Manjunath Hi,

Can have some more basic as well as advanced questions? Please send them to [email protected].

Thanks in advance.

# re: Interview Questions: ASP.NET 6/1/2005 2:10 AM Siva Nice Job.

If somebody have asp.net and vb.net interview questions and answers, pls send it to [email protected].

Thanks, Siva R

# re: Interview Questions: ASP.NET 6/1/2005 10:05 AM Raja Sekhar Excellent Stuff. Thanks a lot. I have a question how state management is done in a webfarm or webgarden. I mean how a session will travel from one web server to another web server? Thanks in advance Raja

# re: Interview Questions: ASP.NET 6/3/2005 10:23 PM Diwakar Sharma

Page 23: Interview Questions ASP[1]

Grrrrrrrrrrrrrr8

# Interview Questions: ASP.NET 6/6/2005 1:07 AM N.S.Jenkins Hai friends I want webservices Question .Net with c#

Please Send it in [email protected]

# re: Interview Questions: ASP.NET 6/7/2005 6:11 AM Pavan Kumar Devangam. hi friends/brothers n sisters,

i am new to c#.net. plz send me the frequently asked interview questions and plz guide to get through some good company where i can explore my knowledge in .net.

awaiting with anticipation, thanking you, pavan kumar.

# re: Interview Questions: ASP.NET 6/7/2005 6:11 AM Pavan Kumar Devangam. hi friends/brothers n sisters,

i am new to c#.net. plz send me the frequently asked interview questions and plz guide to get through some good company where i can explore my knowledge in .net.

my id is : [email protected]

awaiting with anticipation, thanking you, pavan kumar.

# re: Interview Questions: ASP.NET 6/7/2005 7:06 AM Poornachander It's tooooo good really nice job Thank you thanks alot

# re: Interview Questions: ASP.NET 6/7/2005 8:46 PM gopal chandra biswas hi friends,

i am new to ASP.net. plz send me the frequently asked interview questions and plz guide to get through some good company where i can explore my knowledge in ASP/ASP.net.

my id is : [email protected]

awaiting with anticipation, thanking you, gopal chandra biswas

# re: Interview Questions: ASP.NET 6/8/2005 1:25 AM hari pratap

Page 24: Interview Questions ASP[1]

Hello sir

This is Hari Pratap

I am Searching for good job so please help me by giving me all the latest asp interview quiestions

my mail ID is [email protected]

# re: Interview Questions: ASP.NET 6/8/2005 3:27 AM Nidhi Mishra Hi Mark

THis is good stuff..and a very jhelpful post!

# re: Interview Questions: ASP.NET 6/8/2005 6:02 AM Apurva hi, very good stuff for study if u have some more deep qus then pls send me @

[email protected]

thx

# re: Interview Questions: ASP.NET 6/13/2005 4:01 AM Priza Hi.. Its a real good piece of work.Its good that freshers like me are being guided by professionals.Plz. send more .NET questions and guide me to get a good job off-campus. Thanx, priza.

# re: Interview Questions: ASP.NET 6/15/2005 6:11 AM Shankar Dear Friends,

Even if you ask an experience professional this above questions they to answer the same and I didn't know how you can differenciate that this answer are realated to the freshers.

With Query, Shankar

# re: Interview Questions: ASP.NET 6/15/2005 12:07 PM Sohel Hi, I am new at .net and planning to take some interview. The questions on the top help me alot. If you have some more interview questions and useful links, please send me at [email protected]. Thanks in advance. Sohel.

# re: Interview Questions: ASP.NET 6/20/2005 12:37 AM thiyagarajan pls send .net faq at my mail id [email protected]

# re: Interview Questions: ASP.NET 6/20/2005 3:16 AM Bhavesh Patel

Page 25: Interview Questions ASP[1]

Hi Thanks to everyone who has provide this information. Please send me more FAQ related with C# and XML.

My Mail id is [email protected]

# re: Interview Questions: ASP.NET 6/22/2005 11:45 PM Prasad Reddy Aluru hello friends , I said thanks to every body in this group for their helping nature and spend their valuable time please send me the interview related material and URLs in .net @[email protected]

thank you

# re: Interview Questions: ASP.NET 6/23/2005 1:27 AM Parmeeta Oberoi I am fresher n these interview question with answers really helping me.Good Show.....keep it up!! Keep flooding with more :)

# re: Interview Questions: ASP.NET 6/26/2005 11:00 PM harvinder singh hello sir.....these questions r really good for freshers..as im a freshers im looking for some more faqs..do mail me at [email protected]....

# re: Interview Questions: ASP.NET 6/26/2005 11:02 PM harvinder singh plz mail me constantly asked faqs on vb.net,asp.net n c#.net

# re: Interview Questions: ASP.NET 6/27/2005 6:05 AM murthy sir,

Please send me all the faqs on vb.net , asp.net & c#.net which might help me out in my inteview

# re: Interview Questions: ASP.NET 6/27/2005 6:10 AM murthy It is good, providing lot of interesting questions

thanks

# re: Interview Questions: ASP.NET 6/28/2005 2:02 PM Great questions .. Is there any other good URL For VB.NEt or C# question too? -- Thanks Krithika

# re: Interview Questions: ASP.NET 6/28/2005 8:16 PM Ashish Plz provide me the interview questions for vb.net and SQL if possible. My Email id is [email protected]

Page 26: Interview Questions ASP[1]

# re: Interview Questions: ASP.NET 6/30/2005 8:06 AM Mahesh i like this website really,,every time i prepare for interview but ,people doesn't want to take .. i don't y?

# re: Interview Questions: ASP.NET 7/1/2005 12:03 AM Senthil kumar Dear Sir,

I need the frequently asked interview questions and answer on VB.Net, ASP.Net, C#. Please send to my email id. [email protected].

# re: Interview Questions: ASP.NET 7/1/2005 1:15 AM prashanth qustions r very good can u send me some more qustions to my mail [email protected]

# re: Interview Questions: ASP.NET 7/4/2005 1:57 AM Johny qustions r very good can u send me some more qustions to my mail [email protected]

# re: Interview Questions: ASP.NET 7/4/2005 2:01 AM johny 1. What is the purpose of XSLT other than displaying XML contents in HTML?

2. How to refresh a static HTML page?

3. What is the difference between DELETE and TRUNCATE in SQL?

4. How to declare the XSLT document?

5. What are the data Islands in XML?

6. How to initialize COM in ASP?

7. What are the deferences of DataSet and ???

8. What are the cursers in ADO?

9. What are the in-build components in ASP?

10. What are the Objects in ASP?

Can any body send more ASP.net questions to [email protected]

# re: Interview Questions: ASP.NET 7/4/2005 2:03 AM johny 1. What is the user in an asp.net application?

2. How can you unload an asp.net app without touching the iis?

3. What is "delegation" in c# ?

4. in a load balancing environment, which way you choose to maintain state info, if security is important?

Page 27: Interview Questions ASP[1]

5. What is the life cycle of an asp.net page? (events, from start to end)

6. What command line tools do we have in .net environment?

7. What is the plugin architecture? how to use it? Can any body send more ASP.net questions to [email protected]

# re: Interview Questions: ASP.NET 7/5/2005 2:28 AM shiva Can any body send more ASP.net questions to [email protected]

# re: Interview Questions: ASP.NET 7/6/2005 5:50 AM chandu please send any .net questions and answers whether they are touch and simple.

with regards thanQ chandu

# re: Interview Questions: ASP.NET 7/6/2005 2:24 PM Manoj Kumar M The article seems to be very much helpful for an interview.It would be great if some more questions are added to this article.

Thanks manoj

#  Interview Questions: ASP.NET 7/7/2005 2:09 AM predeep Good Questions and answers.Send more questions and answers in [email protected]

# re: Interview Questions: ASP.NET 7/18/2005 9:47 PM DIVAGAR Nice article. I need more basic questions in c# and asp.net

# re: Interview Questions: ASP.NET 7/18/2005 10:04 PM SaiCHaran Dear

i glad to see this questions and i benifited from this questions please send me any FAQ'S from vb.net or asp.nte or C#

to

[email protected]

# re: Interview Questions: ASP.NET 7/19/2005 12:29 AM Abhijit Nayak Really, the questions provide are very helpful. Will you please send some more advanced question in .NET ?

Page 28: Interview Questions ASP[1]

# re: Interview Questions: ASP.NET 7/19/2005 3:52 AM RajyaLakshmi The Questions are really great. could any one pls send me imp questions in C#.Net,ASP.Net,Sqlserver 2000 mail me on [email protected]

# re: Interview Questions: ASP.NET 7/20/2005 10:31 AM Joe not bad for starters. But You definately need more

# re: Interview Questions: ASP.NET 7/22/2005 10:20 PM gopal please mail asp.net interview questions i have an interview

# re: Interview Questions: ASP.NET 7/22/2005 11:23 PM madheshwar Its very good for starter.

# re: Interview Questions: ASP.NET 7/23/2005 7:20 AM sailendra hi,all can anyone tell me how better we can explian .net features like .net architecture, clr,cls and other other features in interview . and also how to restrict session time out

plz mail me at [email protected]

# re: Interview Questions: ASP.NET 7/26/2005 2:32 AM Chandan Chaudhari This Page containes the questions that r asked in most of the interviews. I just faced an interview and believe me all the questions were from the Same Page. So It is better to refer these questions before attending an Interview.

# re: Interview Questions: ASP.NET 7/26/2005 2:33 AM Chandan Chaudhari Why we USE XML in .NET. Please Explain the ADVANTAGES of using XML and Send to [email protected]

Thanks

Chandan

# re: it is a nice work 7/27/2005 12:47 AM shashank bhopal it was a very good work

i've a question too

Q. I want to programme in raw MSIL how can i do it can i use object orientation in it how will it compile ultimately.

Q. when .NET has a built in garbage collector then is there any use defining a destructor in any .NET class?

Page 29: Interview Questions ASP[1]

# re: Interview Questions: ASP.NET 7/27/2005 5:15 AM Arnab Samanta(Globsyn) Expecting more....

# re: Interview Questions: ASP.NET 7/31/2005 12:14 AM PKs This is not at all impressive site, I mean, To become a good and usable site, please upload 10000 questions and answer ( That may be even hypothetical question) to this site.

Happy programming....

# re: Interview Questions: ASP.NET 8/1/2005 10:17 AM sailesh

RESPECTED SIR

UR QUESTIONS SEEM TO BE VRY HELPFUL

AS I WAS BEGINEER IN .NET I NEED SOME QUESTIONS IN THE INTERVIEW POINT OF VIEW

I WILL BE VERY THANKFUL FOR U IF U MAIL IT FOR ME MY ID:[email protected]

# re: Interview Questions: ASP.NET 8/3/2005 2:38 AM Sonia Questions are really very helpful.

Mail me if you have some more of such kind

My ID: [email protected]

# re: Interview Questions: ASP.NET 8/3/2005 9:57 PM jagannath i want DotNet(VB.NET,ASP.NET,C#) Frequently asked questions or interview questions

Please mail me at : [email protected]

# re: Interview Questions: ASP.NET 8/3/2005 11:32 PM [email protected] please mail me at my email ad [email protected]

# re: Interview Questions: ASP.NET 8/6/2005 5:56 AM kiran i need DotNet(VB.NET,ASP.NET,C#) Frequently asked nterview questions

#  Interview Questions: ASP.NET 8/8/2005 12:44 AM Satya Vir Singh Questions are really very helpful

# re: Interview Questions: ASP.NET 8/9/2005 9:13 PM Arun Devdas

Page 30: Interview Questions ASP[1]

qustions r very good can u send me some more qustions to my mail [email protected]

# re: Interview Questions: ASP.NET 8/11/2005 1:12 AM Suriya I was in need of such collection. Great work to all those who involved...

Keep this good job on!!!

# re: Interview Questions: ASP.NET 8/12/2005 1:17 AM Rajesh Thakur Hi Everybody

This is realy great place for the Beginer attending interviews i am one of them.so is any one have some collection of question in .Net and SQL Server please mail me at this ID [email protected]

# re: Interview Questions: ASP.NET 8/14/2005 5:26 AM malini the article is excellent.can u pls send me more questions in ASP.net to my mail id.

thanx.

# re: Interview Questions: ASP.NET 8/17/2005 5:38 AM kumaresh Really good collective questions and answers. Keep update its useful for us.

Thanks

# re: Interview Questions: ASP.NET 8/19/2005 10:27 PM bhumit rathod PLS SEND ME MORE QUESTIONS SIR..

# Interview Questions: ASP.NET 8/21/2005 11:38 PM Saravanan Plz provide me the interview questions for vb.net and SQL Server if possible. My Email id is [email protected]

# re: Interview Questions: ASP.NET 8/24/2005 4:22 AM Srinivas RESPECTED SIR

UR QUESTIONS SEEM TO BE VRY HELPFUL . Plese Send More questions on .NET. I WILL BE VERY THANKFUL FOR U IF U MAIL IT FOR ME my E-mail id is : [email protected]

# re: Interview Questions: ASP.NET 8/25/2005 12:38 PM renu Good Site. But I agree with 'Developer in Seattle' - For God's sake stop asking for more questions..and wasting space here !!

# re: Interview Questions: ASP.NET 8/25/2005 10:58 PM Balaji_nayuni

Page 31: Interview Questions ASP[1]

Hai

# re: Interview Questions: ASP.NET 8/29/2005 3:48 AM Vijayananth Pls. any one have some collection of question in .Net and SQL Server please mail me at this ID [email protected]

# re: Interview Questions: ASP.NET 8/30/2005 5:22 AM Mark Hoffman Some good questions, but many of them are just sheer trivia. These types of questions don't give you any insight in to the person's skill or their ability to think.

For example: "What data types do the RangeValidator control support? Integer, String, and Date. "

Suppose I know the answer. What does that really tell you? That I've worked with a Range Validator before. Whoopee. Who cares?

If I don't now answer then it means that either I don't know it exists, haven't worked with it, or more likely, simply don't remember which data types it supports. I can Google the question and get a satisfactory answer in about 10 seconds.

When I interview, I want to know that the candidate understands deeper concepts than what can be Googled in 30 seconds. Explain to me some particular OOP concepts. When would you use a Singleton? Why? Why use an Interface? How would you implement exception handling in this case? I want to know that they can THINK. Sure, I'll ask some basic questions that are trivial during a phone screening, but asking what namespace some class out of the BCL belongs to is just...well, stupid. It might make you feel superior if you know the answer, but it does nothing to help you find talented programmers who can think intelligently.

# re: Interview Questions: ASP.NET 9/1/2005 5:25 AM Yogesh Srivastava These question are very much helpfull for the asp.net interviews.

# re: Interview Questions: ASP.NET 9/3/2005 6:54 PM shahnawaz i also want a interview questions on ASP.NET,VB.NET,SQL SERVER.PLS ANY BODY SEND ME.

# re: Interview Questions: ASP.NET 9/3/2005 9:17 PM madhavi the questions are really good and heplful for facing interviews..

# re: Interview Questions: ASP.NET 9/11/2005 7:00 AM Amit Gupta I want an interview questions on ASP.NET,VB.NET,C#, SQL SERVER.PLS ANY BODY SEND ME.

# Interview Questions: ASP.NET 9/13/2005 3:11 AM Tiki I hav just jumped to .net technologies its quite a good site for learners coz i can brush up wht i hav studied through the books. Thanks Mr.Mark Wagner

# re: Interview Questions: ASP.NET 9/14/2005 1:28 AM swati WOW!!!! i really enjoyed goin.. thru all da ques n ans.... as i m a beginner i gained lot of knowledge thru dis session............. good work ..............

Page 32: Interview Questions ASP[1]

keep it up!!!!!!!!!!!! but i feel some ques r repeating n shud be deleted as they consume lot of space over here(on dis page)

:-)KEEP SMILNG :-)

# re: Interview Questions: ASP.NET 9/14/2005 1:51 AM neha hi friends !!!!!!!!!!!! i like the questions being put here as well as the responses but i am in search of some more difficult questions try to put some more over here O.K. U BETTER BE OTHERWISE HaHaHaHa

# re: Interview Questions: ASP.NET 9/14/2005 11:16 PM prashant pandey hi friends !!!!!!!!!!!! i like the questions being put here as well as the responses but i am in search of some more difficult questions try to put some more over here O.K. U BETTER BE OTHERWISE HaHaHaHa

# A Question 9/15/2005 6:00 AM Sanket Hello there,

Can someone explain when we inherit from HttpApplication to create a class for Global.asax, Why do we NOT have to override Application_Start or any other event handler methods ??

Or, How is that eventhandler linked with the event?

Thanks Sanket Vaidya

# re: Interview Questions: ASP.NET 9/19/2005 12:33 AM mithun.achar hi, I thank u 4 these questions this will help me in my interview today

# re: Interview Questions: ASP.NET 9/21/2005 2:31 AM Apurva I like the wat Mark Hoffman wrote that helps us to understand wht interviwer wants good can u pls send me some more interview qus

mail me at [email protected]

# re: Interview Questions: ASP.NET 9/23/2005 12:02 AM umesh I like this type of question

# re: Interview Questions: ASP.NET 9/24/2005 5:51 AM Ashu I found question/ansews to ASP.Net very very interesting. I stumble upon this link by chance. In fact i was looking for Interview styled question on Visual Studio.Net. If u can plz email it to me or any relevant URL.. Although i m looking for a URL on my own and wud post it here if i get a good URL on Visula Studio.Net. rgds and thanx

Page 33: Interview Questions ASP[1]

# re: Interview Questions: ASP.NET 9/24/2005 5:58 AM Ashu sorry didn't left my email address. My email is [email protected].

# Some ASP.NET questions 9/28/2005 3:51 AM Naren 1. Explain the differences between Server-side and Client-side code? Server side code basically gets executed on the server (for example on a webserver) per request/call basis, while client side code gets executed and rendered on the client side (for example web browser as a platform) per response basis.

2. What type of code (server or client) is found in a Code-Behind class? In the Code-behind class the server side code resides, and it generates the responses to the client appropriately while it gets called or requested.

3. Should validation (did the user enter a real date) occur server-side or client-side? Why? That depends. In the up browsers (like IE 5.0 and up and Netscape 6.0) this would help if it gets validated on the client side, because it reduces number of round trips between client and server. But for the down level browsers (IE 4.0 and below and Netscape 5.0 and below) it has to be on server side. Reason being the validation code requires some scripting on client side.

4. What does the "EnableViewState" property do? Why would I want it on or off? EnableViewState stores the current state of the page and the objects in it like text boxes, buttons, tables etc. So this helps not losing the state between the round trips between client and server. But this is a very expensive on browser. It delays rendering on the browser, so you should enable it only for the important fields/objects 5. What is the difference between Server.Transfer and Response.Redirect? Why would I choose one over the other? Server.Transfer transfers the currnet context of the page to the next page and also avoids double roundtrips. Where as Response.Redirect could only pass querystring and also requires roundtrip.

6. Can you give an example of when it would be appropriate to use a web service as opposed to a non-serviced .NET component Webservice is one of main component in Service Oriented Architecture. You could use webservices when your clients and servers are running on different networks and also different platforms. This provides a loosely coupled system. And also if the client is behind the firewall it would be easy to use webserivce since it runs on port 80 (by default) instead of having some thing else in SOA apps . 7. Let's say I have an existing application written using Visual Studio 6 (VB 6, InterDev 6) and this application utilizes Windows 2000 COM+ transaction services. How would you approach migrating this application to .NET You have to use System.EnterpriseServices namespace and also COMInterop the existing application

8. Can you explain the difference between an ADO.NET Dataset and an ADO Recordset? ADO.NET DataSet is a mini RDBMS based on XML, where as RecordSet is collection of rows. DataSet is independent of connection and communicates to the database through DataAdapter, so it could be attached to any well defined collections like hashtable, dictionary, tables, arraylists etc. practically. And also it can be bound to DataGrid etc. controls straightaway. RecordSet on the otherhand is tightly coupled to Database System.

9. Can you give an example of what might be best suited to place in

Page 34: Interview Questions ASP[1]

the Application_Start and Session_Start subroutines? In the Application_Start event you could store the data, which is used throughout the life time of an application for example application name, where as Session_Start could be used to store the information, which is required for that session of the application say for example user id or user name.

10. If I'm developing an application that must accomodate multiple security levels though secure login and my ASP.NET web appplication is spanned across three web-servers (using round-robbin load balancing) what would be the best approach to maintain login-in state for the users? Use the state server or store the state in the database. This can be easily done through simple setting change in the web.config. <sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;user id=sa;password=" cookieless="false" timeout="30" /> in the above one instead of mode="InProc", you specifiy stateserver or sqlserver.

11. What are ASP.NET Web Forms? How is this technology different than what is available though ASP (1.0-3.0)? ASP.NET webforms are analogous to Windows Forms which are available to most VB developers. A webform is essentially a core container in a Page. An empty webform is nothing but a HTML Form tag(control) running at server and posting form to itself by default, but you could change it to post it to something else. This is a container, and you could place the web controls, user controls and HTML Controls in that one and interact with user on a postback basis.

12. How does VB.NET/C# achieve polymorphism? Polymorphism is achieved through virtual, overloaded, overridden methods in C# and VB.NET 11. Can you explain what inheritance is and an example of when you might use it? .

13. How would you implement inheYou missed the number sequence here). Inheritance is extending the properites, behaviour, methods to child classes from super classes. VB.NET and C# provide single inheritance, means the subclasses can be derived from only one parent unlike C++, where true multiple inheritance is possible. As an alternate to implement multiple inheritance, we could do the same to implement interfaces to the parent classes and implement the same interfaces to derive the child classesritance using VB.NET/C#?

14. Whats an assembly An assembly is the primary building block of .NET. It's a reusable, self-describing, versionable deployment unit for types and resources. They are self-describing so to allow the .NET runtime to fully understand the application and enforce dependency and versioning rules

15. Describe the difference between inline and code behind - which is best in a 16. loosely coupled solution 5 and 16. (You missed the sequence again). Inline style is mixing the server side code and client side code (HTML and javascript) on the same page and run it. Where as codebehind is seperating the server side in a different page (enabling developers/coders to work) and leaving the client side code to do the presentation only (so designers would work on it). Inline code would be simplest way of approach because it doesn't require any pre-compilation. But it is not good in many ways, i. You mix the presentation and server side code together so whenever there is a change it would be tough to maintain. ii. The event processing would be a night

Page 35: Interview Questions ASP[1]

mare in inline code. iii. Since the codebehind needs to be compile in advance, it would be faster unline inline, which is interpreted per call basis. In a loosely couple situation, code-behind would be the best way to approach. Because it provides better performance. 17. Explain what a diffgram is, and a good use for one http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sqlxml3/htm/dotnet_11pr.asp 18. Where would you use an iHTTPModule, and what are the limitations of any 19. approach you might take in implementing one 20. What are the disadvantages of viewstate/what are the benefits 21 Describe session handling in a webfarm, how does it work and what are the > limits 22. How would you get ASP.NET running in Apache web servers - why would you even do this? 23. Whats MSIL, and why should my developers need an appreciation of it if at all? 24. In what order do the events of an ASPX page execute. As a developer is it important to undertsand these events? 25. Which method do you invoke on the DataAdapter control to load your generated dataset with data? 26. Can you edit data in the Repeater control? 27. Which template must you provide, in order to display data in a Repeater control? 28. How can you provide an alternating color scheme in a Repeater control? 29. 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? 30. What base class do all Web Forms inherit from? 31. What method do you use to explicitly kill a user s session? 32 How do you turn off cookies for one page in your site? 33. Which two properties are on every validation control? 34. What tags do you need to add within the asp:datagrid tags to bind columns manually? 35. How do you create a permanent cookie? Supply never to the expiration date/time 36. What tag do you use to add a hyperlink column to the DataGrid? 37. What is the standard you use to wrap up a call to a Web service 38. Which method do you use to redirect the user to another page without performing a round trip to the client? 39. What is the transport protocol you use to call a Web service SOAP 40. True or False: A Web service can only be written in .NET 41. What does WSDL stand for? 42. What property do you have to set to tell the grid which page to go to when using the Pager object? 43. Where on the Internet would you look for Web services? 44. What tags do you need to add within the asp:datagrid tags to bind columns manually. 45. 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? 46. How is a property designated as read-only? 47. Which control would you use if you needed to make sure the values in two different controls matched? 48. True or False: To test a Web service you must create a windows application or Web application to consume this service? 49. How many classes can a single .NET DLL contain? 1 Describe session handling in a webform, how does it work and what are the its limits

Sometimes it is necessary to carry a particular session data across pages. And HTTP is a stateless protocol. In order to maintain state between page calls, we could use cookies, hidden form fields etc. One of them is using sessions. each sessions are maintain a unique key on the server and

Page 36: Interview Questions ASP[1]

serialize the data on it. Actually it is a hashtable and stores data on key/value pair of combination. You could set a session using Session Object and retrieve the same data/state by passing the key. //Set Session["abc"] = "Session Value"; // Get string abc = Session["abc"].ToString(); The downside of sessions is scalability. Say your application gets more and more hits and you though instead of one webserver handling it, have it in a webfarm (multiple web servers working under one domain). You cannot transfer the session so easily across multiple webservers. Reason is like I said, it physically serializes the state data to webserver hard disk. .NET proposes a new way to handle this using a stateserver (actually a trimmed down sql server) storing the web session data in a factory configured database schema or using Database with your own schema defined to handle the sessions.

2. How would you get ASP.NET running in Apache web servers - why would you even do this?

You need to create a CLRHost, which hosts the CLR (ASP.NET) on top of Apache. Since Apache is #1 webserver used by many companies, this would allow more number of web site owners to take advantage of ASP.NET and its richness.

3. Whats MSIL, and why should my developers need an appreciation of it if at all?

MSIL is Microsoft Intermediate (Intermediary) Language. It is Microsoft's implementation of CIL (standard recognized by ECMA and ISO) as part of CLI and C# Standardization.

.NET supports more than 21 language (I think 24 now). They compile to IL first and then this IL would get JITted to Native code at runtime. Learning IL is advantageous in many terms. The important one is sometimes you need to optimize your code, so you could disassemble your compile assembly using ILDASM and tweak your code and re assemble it using ILASM.

4. In what order do the events of an ASPX page execute. As a developer is it important to undertsand these events?

This is the order of Page events i. Page_Init ii.Page_LoadViewState iii. Page_LoadPostData iv. Page_Load v. Page_RaisePostDataChanged vi. Page_RaisePostBackEvent vii. Page_PreRender viii. Page_SaveViewState ix. Page_Render x. Page_Dispose xii. Page_Error (this is caused whenever there is an exception at the page level).

Out of all the Page_Load is the one where your code gets loaded and your magic should be written. page_init occurs only once, i.e. when the page is initially created.

Page 37: Interview Questions ASP[1]

As a developer you need to know these, becuase your development activity is coding for these only.

5. Which method do you invoke on the DataAdapter control to load your generated dataset with data?

Fill()

6. Can you edit data in the Repeater control? No. Only DataList and DataGrid provide you editing capabilities.

7. Which template must you provide, in order to display data in a Repeater control? ItemTemplate

8. How can you provide an alternating color scheme in a Repeater control?

Use AlternatingItemTemplate

9. 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?

The text property and the DataBind Method.

10. What base class do all Web Forms inherit from?

System.Web.UI.Page

11. What method do you use to explicitly kill a user s session?

Session.Abandon

12 How do you turn off cookies for one page in your site?

Actually I never did this. But there should be a way to do this. May be need to write your own code to do this using Response.Cookies collection and HTTPCookie class and also SessionStateMode. Or there may be some simple way to do it. Need to do further research on this.

13. Which two properties are on every validation control?

The common properties are: i. IsValid (bool) ii. ControlToValidate (string) iii. ErrorMessage (string) iv. ValidationDisplay (Display) v. Text (string) The common method is: Validate()

14. What tags do you need to add within the asp:datagrid tags to bind columns manually?

You need to set AutoGenerateColumns Property to false.

15. How do you create a permanent cookie?

If you are developing web services and the cookies need to be travelled across multiple

Page 38: Interview Questions ASP[1]

requests, then you need to have permanent or persistant cookie. In order to do this, you have to set the your webserivce CookieContainer to a newly created CookieContainer, and the its cookie to a session value and then store the cookie(s) into the Service CookieCollection from that cookie container if something is there othere wise add cookie to the container.

16. What tag do you use to add a hyperlink column to the DataGrid? HyperLinkColumn 17. What is the standard you use to wrap up a call to a Web service SOAP. 18. Which method do you use to redirect the user to another page without performing a round trip to the client? Server.Transfer Response.Redirect also does that but it requires round trip between client and server.

19. What is the transport protocol you use to call a Web service SOAP SOAP 20. True or False: A Web service can only be written in .NET False. 21. What does WSDL stand for? Web Services Description Language.

22. What property do you have to set to tell the grid which page to go to when using the Pager object? CurrentPageIndex. You need to set this one with the DataGridPageChangedEventArgs' NewPageIndex.

23. Where on the Internet would you look for Web services? UDDI.org, UDDI.Org (even microsoft maintains a uddi server-- http://uddi.microsoft.com) UDDI is Universal Description, Discovery and Integration of Web Services. The UDDI servers serves as yellow pages to WebServices (visit http://www.uddi.org)

24. 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

25. 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?

ListItem.

26. How is a property designated as read-only? If it has only get accessor.

ex: public class abc { private string stringIt="This is the string"; public string StringIt { get { return stringIt; } } }

Page 39: Interview Questions ASP[1]

But you could set an attribute prior to the property name with [ReadOnly="true"], if that property defined an attribute

27. Which control would you use if you needed to make sure the values in two different controls matched?

Use CompareValidator

28. 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. And if the web service turned off HTTP-GET for security purposes then you need to create a web application or windows app as a client to this to test.

29. How many classes can a single .NET DLL contain?

many is correct. Yes an assembly can contain one or more classes and an assembly can be contained in one dll or could spread across multiple dlls. too. Take System.dll, it is collections of so many classes. 2. What is CLR ? 2.1. Diff between CLR & CTS 3. Trace and Debug belongs to which namespaces? 4. ColumnMapping belongs to which namespaces? 5. In order to get assembly info whcih namespace we should import? 6. DIff. between Friend and Protected Friend. 7. What is an abstract class? 8. What is diff. between abstract class and an interface? · what is shadowing ? · Overloading allows a subclass to add a new variation of a method. As long as the new variation has a different method signature, it can have the same name as an existing method on the base class. Shadowing, on the other hand, entirely replaces all variations of the method from the base class, leaving the subclass with only a single version of the method—the one we created through shadowing. Shadowing does not extend an interface, but rather replaces existing methods.

Overriding allows a subclass to alter or replace an existing method with the permission of the base class designer. Shadowing can be done without the permission of the base class designer, which is a risky proposition and one that requires extensive testing because the base class was never designed with such a thing in mind.

Also, as we discussed earlier, overriding uses virtual methods so the implementation of the method that is invoked is based on the data type of the underlying object, not the data type of the variable we're using. When a method is shadowed it is not virtual, and it is the data type of the variable that dictates the implementation of the method that will be used. The data type of the underlying object is ignored.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnadvnet/html/vbnet12252001.asp · * diff between Overriding and overloading 9. How do u declare static variable and how it is declared and what is its lifetime? 10. Diff between Dataset and Datareader? 11. How do u get record no from 5 to 15 from a dataset of 100 records. 12. diff. betn Dataset and Recordset. 13. why Datareader is useful? 14. How do u call and execute a SP in .NET? 15. What is DLL hell? 16. what is versioning in .NET? 17. What r the ASP.NET list controls and diff. between them? 18. What is diff. betn ASP State Management and ASP.NET State Management?(Imp) 19. How can we pass info. between 2 asp.net pages? 20. Diff betn Web User Control and Web Custom Control

Page 40: Interview Questions ASP[1]

21. What is an indexed property? 22. i've 2 buttons on an asp.net page(.aspx). i wanna execute same routine clicking on 2 buttons.how? 23. How do we Sort the data from a Dataset? 24. how do we get only edited/deleted/inserted records from a Dataset? 25. how Dataadapter.fill works? 26. how can we implement a Identity (SQL Server) call in an asp.net page? 27. What is Viewstate? 28. What is the life cycle of an asp.net page?

1. What does the keyword static mean when applied to a class member? 1. It means the method can be called through the class without instantiating the class.

2. Declare a method called calculate that takes one integer, adds one and returns the result. Allow this method to be overridden by an inheriting class. 2. Public virtual int calculate(int value) { newValue = value + 1; return newValue; } value++; return value;

3. What is the difference between a class and a struct? 3. The class object is stored in the heap and struct object is stored in the stack. Therefore accessing and removing data from the struct is faster than for a class.

4. What is the difference between a class and an interface?

4. You can instantiate a class but you cannot instantiate an interace you can only offer the functionality of that interface.

5. What are the .Net web authentication options and which one would generally be used for a secured/public site? 5. None Windows Authentication –Secured side IIS Authentication Forms Authentication – Public Side

6. What are some .Net options for maintaining session state? 6. In process and out of process. (wasn't sure about this one?) I believe the 6th one could be Querystring, Cookies, Session objects (variables) I wasn't sure, but I knew they could either be handled in the memory on the local machine (in process) or through the ASP.NET state service running either locally or remotely (out of process).

7. What is a Singleton? 7. This ensures that a class can only be instantiated once.

Using the EMPLOYEE and JOBS tables, fill in the following stored procedure template so that it removes a job by job_id and all associated employees ensuring that both updates succeed or fail together.

CREATE PROCEDURE deleteJob @jobid smallint AS

Page 41: Interview Questions ASP[1]

Database Answer:

CREATE PROCEDURE deleteJob @jobid smallint AS

BEGIN BEGIN TRAN IF EXISTS (SELECT * FROM JOBS WHERE job_id = @jobid) DELETE FROM JOBS WHERE job_id = @jobid IF @@ERROR <> 0 BEGIN RAISERROR(‘Could not delete row from Jobs – Abort’, 16,1) GOTO Errorhandler END IF EXISTS(SELECT * FROM EMPLOYEES WHERE job_id = @jobid) DELETE FROM EMPLOYEES WHERE job_id = @jobid IF @@ ERROR <> 0 BEGIN RAISERROR(‘Could not delete row from Employees – Abort’, 16,1) GOTO Errorhandler END COMMIT RETURN Errorhandler: ROLLBACK TRAN RETURN END

You could also ask him what situations to use a datareader in, when to use a dataset etc... for ado.net

In general they will be questions bascially on the SQL Server management, what kind of different services it provides. what the replication methods used. They will give you a situation where you have to choose which type of SQL sever edition you have to use. (there are 7).

About ADO.NET, they will give some senario and ask you to use the appropriate methods like sort,filter, row state enumeration and all

1. What is other name for shared assembly? 2. How do you create and use shared assemblies? 3. How do you use thread in your .NET application? 4. what are the main differences between Web Server controls and HTML Server controls? 5. Differences between ref and out parameters? 6. How will you consume web services in ASP.NET? 7. To test web service you must create a windows application or web application to consume this service (True or False). 8. When on the internet would you look for web services? 9. Does .NET supports Pessimistic record locking or Optimistic record locking or both? 10. What is Catch API? 11. How do you handle concurrency errors? 12. where on the internet would you look for web services? 13. In .NET Exception handling model, what are the benefits of over return code? · Shared assemblies. By including a strong name, the assembly can be shared by multiple applications running on the same machine when installed in the Global Assembly Cache (GAC). This code-sharing model is the inverse of the model used in the unmanaged world, where COM components are automatically shared when compiled and registered in the system registry. Serviced Components. For a .NET class to take advantage of Enterprise Services (COM+ Services), such as distributed transactions and object pooling, the assembly that contains the

Page 42: Interview Questions ASP[1]

class—called a Serviced Component because it inherits from the class EnterpriseServices.ServicedComponent—must have a strong name. Having a strong name allows Enterprise Services to be sure it loads the correct assembly. Serviced Components that run in the process hosted by Enterprise Services (DLLHost.exe) should be placed in the GAC, while those running as library applications in the caller's process need not ADO.NET and Visual Studio .NET use optimistic concurrency, because the data architecture is based on disconnected data. Therefore, you need to add business logic to resolve issues with optimistic concurrency. If you choose to use optimistic concurrency, there are two general ways to determine if changes have occurred: the version approach (true version numbers or date-time stamps) and the saving all values approach. · be. sion Number ApproachIn the version number approach, the record to be updated must have a column that contains a date-time stamp or version number. The date-time stamp or a version number is saved on the client when the record is read. This value is then made part of the update.One way to handle concurrency is to update only if value in the WHERE clause matches the value on the record. The SQL representation of this approach is: UPDATE Table1 SET Column1 = @newvalue1, Column2 = @newvalue2 WHERE DateTimeStamp = @origDateTimeStamp Alternatively, the comparison can be made using the version number: UPDATE Table1 SET Column1 = @newvalue1, Column2 = @newvalue2 WHERE RowVersion = @origRowVersionValue If the date-time stamps or version numbers match, the record in the data store has not changed and can be safely updated with the new values from the dataset. An error is returned if they don't match. You can write code to implement this form of concurrency checking in Visual Studio .NET. You will also have to write code to respond to any update conflicts. To keep the date-time stamp or version number accurate, you need to set up a trigger on the table to update it when a change to a row occurs

A finally block can not have with break; continue; return or goto statements

Hi Friends,

I know some of the answers.... but i want to recheck it... Please give me the correct answers... or any links where i can study abt these...

1. what is the root namespace for all types?

2. What is CLR ?

2.1. Diff between CLR & CTS

3. Trace and Debug belongs to which namespaces?

4. ColumnMapping belongs to which namespaces?

5. In order to get assembly info whcih namespace we should import?

6. DIff. between Friend and Protected Friend.

7. What is an abstract class?

8. What is diff. between abstract class and an interface? * what is shadowing ? * diff between Overriding and overloading

9. How do u declare static variable and how it is declared and what is its lifetime?

10. Diff between Dataset and Datareader?

11. How do u get record no from 5 to 15 from a dataset of 100 records.

Page 43: Interview Questions ASP[1]

12. diff. betn Dataset and Recordset.

13. why Datareader is useful? 14. How do u call and execute a SP in .NET?

15. What is DLL hell?

16. what is versioning in .NET?

17. What r the ASP.NET list controls and diff. between them?

18. What is diff. betn ASP State Management and ASP.NET State Management?(Imp)

19. How can we pass info. between 2 asp.net pages? 20. Diff betn Web User Control and Web Custom Control.

21. What is an indexed property?

22. i've 2 buttons on an asp.net page(.aspx). i wanna execute same routine clicking on 2 buttons.how?

23. How do we Sort the data from a Dataset?

24. how do we get only edited/deleted/inserted records from a Dataset?

25. how Dataadapter.fill works?

26. how can we implement a Identity (SQL Server) call in an asp.net page?

27. What is Viewstate?

28. What is the life cycle of an asp.net page?

Thanks 1. System 2. Common Language Runtime 2.1. CLR - The common language runtime is the execution engine for .NET Framework applications.

It provides a number of services, including the following:

Code management (loading and execution) Application memory isolation Verification of type safety Conversion of IL to native code Access to metadata (enhanced type information) Managing memory for managed objects Enforcement of code access security Exception handling, including cross-language exceptions Interoperation between managed code, COM objects, and pre-existing DLLs (unmanaged code and data) Automation of object layout Support for developer services (profiling, debugging, and so on)

CTS - The common type system is a rich type system, built into the common language runtime, that supports the types and operations found in most programming languages. The common type system supports the complete implementation of a wide range of programming languages.

3. System.Diagnostics

Page 44: Interview Questions ASP[1]

4. System.Data.Common

5. System.Reflection

6. Protected - Available only to classes that inherit from our class. Friend - Available only to code within the project/component. Protected Friend - Available only to classes that inherit from our class (in any project) or to code within our project/component. This is a combination of Protected and Friend.

7. Abstract classes cannot be instantiated they can only be extended. You call the functionality of the abstract class without having to create an instance of it.

8. a) Interfaces don't have implementation and abstract classes can be partially implemented.

From a practical point of view, interfaces can be implemented in any class and more than one interface can be implemented in a class, but abstract classes can only be implemented in the same class hierarchy (subclassing) and only one abstract class can be implemented in a class.

b) Basically it's an mixture of non-virtual methods and method hiding. That is, in VB.NET overriding methods never hide while non-overriding methods always do.

c) Overloading a method means that you are providing another version of an existing method that takes different input arguments/parameters. The method will have the same name as an existing method and may or may not have a different return type. It must have a different number and/or type of input parameters. Methods are identified by their name, and number and type of arguments. This is known as the method's signature. The return value of a method is not regarded as part of the signature. Overloading can be done within the same class i.e. you can have several methods defined in one class that have the same name, but different arguments, or it can be done in a class related to another by inheritance i.e. the superclass contains one method, and a subclass provides another version of the method with the same name and different arguments.

Overriding a method means that you are replacing the method with your own version. The overriding method must be defined identically to the method being replaced. Overriding can only be done in inherited classes i.e. the superclass provides a method and the subclass redefines the method with one that has exactly the same name and arguments as the superclass version. This will cause the method to behave differently when it is called by an object of the subclass, to when it is called by an object of the superclass.

9. Has application scope...variable only goes out of scope when the application ends. code:

public static int Size = 0;

10. The datareader is a forward only, readonly object. It will keep a connection open as long as it is open. It is a fast way to loop through records.

The dataset can be used like an in memory representation of the database. You can use DataViews to filter and sort records for presentation. You can also establish relationships with the dataRelation object. You can use the dataset with a data adapter to update the database. These objects can keep track of changes and original values. When updating the database these objects can help to resolve conflicts or concurrency issues.

Page 45: Interview Questions ASP[1]

11.

Working with ADO.NET

Now, I'm tired...You can find the answers to all of these questions...If you really want to. __________________ "When that first bullet goes past your head, politics goes right out the window." Eric Bana - Black Hawk Down

# re: Interview Questions: ASP.NET 9/28/2005 3:54 AM NarasimhaRao Pls provide some stuff for ADO.Net with XML

My mail Id is [email protected]

# re: Interview Questions: ASP.NET 9/28/2005 12:17 PM Job Hunter in Seattle Good God. So many threads going on. I think there are a lot of desperate job searchers are out there (especially freshers). Every body is asking for questions to be sent to their email id. You already have got tons and tons of question in this page. Have you all done learning those.

The basic thing is nobody knows what to study [what are the important topics to focus, how to study for the interview....[ we never know what Q would come from the interviewer] . Me too..Thats the reason i am here.

By just going through the questions and answerers you can not win.

All you need to do is once you done reading the particular topic for eg. ADO.Net, then search for questions and see if you could answer.

Or just don't read the answer and try to remember that. Read that topic fully and try to understand.

I got some basic questions, may seem very easy but try to answer [try to tell out loud in 3 or 4 lines] with out googling

1. What is HTML ? 2. What is XML ? 3. What is the difference between a class and struct ? 4. What is the difference between a Get and a Post ? 5. What is a managed code ? 6. int n *=2; int x = n & 1; What is the value of x ? 7. What is a friend in C++ ?

Knowledge is Power. All the best for the hunters.

# re: Interview Questions: ASP.NET 9/29/2005 1:24 PM Job Hunter in Seattle 1.Why would you use an array vs linked-list ?

Linked List: ? They allow a new element to be inserted or deleted at any position in a constant number of operations (changing some references) O(1).

Page 46: Interview Questions ASP[1]

? Easy to delete a node (as it only has to rearrange the links to the different nodes)., O(1). ? To find the nth node, will need to recurse through the list till it finds [linked lists allow only sequential access to elements. ], O(n)

Array ? Insertion or deletion of element at any position require a linear (O(n)) number of operations. ? Poor at deleting nodes (or elements) as it cannot remove one node without individually shifting all the elements up the list by one., O(n) ? Poor at inserting as an array will eventually either fill up or need to be resized, an expensive operation that may not even be possible if memory is fragmented. Similarly, an array from which many elements are removed may become wastefully empty or need to be made smaller, O(n)

? easy to find the nth element in the array by directly referencing them by their position in the array.[ arrays allow random access ] , O(1)

# re: Interview Questions: ASP.NET 10/3/2005 3:51 AM venkatesh moorthy For beginners in asp.net the following site is very useful... www.aspspider.com

# re: Interview Questions: ASP.NET 10/9/2005 10:18 PM ramanarasimham Nice the questions are really good and I have learnt some new topics from this.

# re: Interview Questions: ASP.NET 10/10/2005 7:40 PM D. Swicegood The inheritance question that you have is incomplete; you fail to mention both types of inheritance:implementation and interface inheritance. Also, the answer to your web service testing question is just plain wrong. 99 percent of .NET web services out there use complex types in method signatures to push data across the wire; the test page does not support this.

Looks like you are trying to do a good thing here; but most of your answers are very incomplete. If you were an interviewee for a senior developer position with my company and gave some of the answers that you have listed they would definitely warrant follow up questions, or I would consider them wrong; and that is just at first glance.

Dave

# re: Interview Questions: ASP.NET 10/11/2005 4:39 AM Gopinath Very Good Boosting Tips For the Interviews.

I got Six Years of Experience in vb , asp. I Know .net and i did some projects in asp.net. Now i am trying job in MNC comapnies. I don't know how they are asking questions can you give me some sample questions?

# re: Interview Questions: ASP.NET 10/15/2005 12:46 AM pankaj can anyone tell me about thread in asp.net

# re: Interview Questions: ASP.NET 10/23/2005 11:00 PM chandralekha

Page 47: Interview Questions ASP[1]

good collection of queries with its answers. So i am also encouraged to get solve my query from expert if possible.

Sir - I am developing one application where my front end is vb.NET. I want to make DLL library of classes and various components that will be used again and again in the application. but as I have studied in book for making dll library for classes we use class library. and for making library of various components we use Window control library. In this way there will be many dll libraries. Thus my question is - can we make one library where all classes , window control components and web contents can reside for reusabilility purpose. If yes then how? Or is it must to make three different libraries for these three? chandralekha

# re: Interview Questions: ASP.NET 10/26/2005 3:06 AM Rohit Daga What do you mean by GAC(Global Assembly Cache)?

# re: Interview Questions: ASP.NET 11/6/2005 7:20 PM Basu Dear sir,

I am a fresher and seeking about a job in a reputed company.can u send me the questions of related type which were asked in the interviews.I have the knowledge of .net and no practical experience on it.. My email is [email protected]

# re: Interview Questions: ASP.NET 11/7/2005 9:14 PM Parivesh Gupta I m a software engineer. I have 1 year experience in ASP.Net with C#. I want to change the job. so i need Interview Questions. Kindly send me Interview Questions.I m waiting.....

Thanks and Regards Parivesh Gupta [email protected]

# re: Interview Questions: ASP.NET 11/8/2005 12:45 AM yogesh choudhary Dear All,

Please send me all the FAQs on vb.net , asp.net & c#.net which might help me out in my inteview

[email protected] Yogesh Choudhary

9890254775

# re: Interview Questions: ASP.NET 11/10/2005 8:07 AM Mukesh Good Ones

# re: Interview Questions: ASP.NET 11/17/2005 7:43 AM John Vasili Except the fact that some of the questions are not clear and some of the answers are wrong I dont think you can make a right decision for a new hire based on this kind of interview. Talents are spotted differently. Hard workers differently. I dont think any of the .NET creators knows by heart all assemblies and their respective methods, but they developed the .NET so you can fail

Page 48: Interview Questions ASP[1]

them in interviews like these.

# re: Interview Questions: ASP.NET 11/20/2005 10:31 PM sachin i am very thankful to you sir

# re: Interview Questions: ASP.NET 11/20/2005 10:36 PM sachin God help me

# re: Interview Questions: ASP.NET 11/29/2005 1:13 AM lakshminarayana Good help for me

# re: Interview Questions: ASP.NET 11/30/2005 5:09 AM Rishi hi very nice

# re: Interview Questions: ASP.NET 11/30/2005 9:14 PM banu I want an interview questions on ASP.NET,VB.NET,C#, SQL SERVER.PLS ANY BODY SEND ME.

# re: Interview Questions: ASP.NET 12/1/2005 11:12 AM Jack The very best part of this page is reading all the comments. Most of the time, if a given answer is wrong or incomplete, responders will jump on it and we all gather a good idea of the right answer based on that.

Also, there are a lot of people asking to have things emailed to them. Just out of curiosity, are people actually replying to those requests? I'm also studying for a job interview, but I wouldn't bother asking for help! I go and seek out what I need. I googled to find this page, I can google to find others. I'm just sayin...

p.s. I've been working with ASP.Net since it was in beta, and even I didn't know the answer to a lot of these questions! In any big company, the way work and projects are divided up, you don't always work with all aspects of web development. You do the part that's assigned to you. We used SOAP, but I never coded for that part of it; I've coded to use other peoples' web services but never coded my own; never used a diffgram; etc. And as far as what the methods are, type a dang dot and see what pops up!

# re: Interview Questions: ASP.NET 12/4/2005 7:30 PM xyz Questions are really good.But , I am not getting the answer of the following question. Because if we make EnableViewState=true of Dropdownlist control.Then say 5 values will be added each time page will get refreshed.This means ViewState is available after page gets laoded.

When during the page processing cycle is ViewState available? After the Init() and before the Page_Load(), or OnLoad() for a control.

# re: Interview Questions: ASP.NET 12/6/2005 7:57 PM Jags Gowda Dear all,

Questions are very good , please update the page with different Question and answers so that we can learn more and more .

Page 49: Interview Questions ASP[1]

Regards & Thanks Jagadish Gowda

# re: Interview Questions: ASP.NET 12/8/2005 10:29 PM rajaguru ya, These are really good.

# re: Interview Questions: ASP.NET 12/9/2005 1:33 AM guru ok fine. and also i would like to recommend another web site : http://www.megasolutions.net/FAQ/aspnet/ASP_Net_FAQs.aspx Regards, guru.

# re: Interview Questions: ASP.NET 12/21/2005 7:37 AM Denim The answer for #24 is wrong. The data in repeater can be edited if Itemtemplates are added.

# re: Interview Questions: ASP.NET 12/29/2005 11:03 PM Jags Gowda Hey ,

Thanks guru for such a good information .

i wanted to know advanced technique is added to VS 2005 and Server SQL 2005 .

regards Jagadish Gowda

# re: Interview Questions: ASP.NET 1/5/2006 10:08 AM Prakjii Hi Guru, Thankyou for such a wonderful site. I need sqlserver 2005 Questions and answer. Regards prakjiii

# Interview Questions: ASP.NET,C# 1/9/2006 11:31 PM Arunkavin Dear Sir, These questions all are very much helpfull for the asp.net interviews. I need the any other frequently asked interview questions and answer on VB.Net, ASP.Net, C#. Please send to my email id. [email protected].

It will be very helpful to me.

Regards, Arunkavin

# re: Interview Questions: ASP.NET,c#,ADO.Net,SQL Server 1/11/2006 2:46 AM J.DURAISAMY Dear sir,

All these questions are very much helpfull for the asp.net interviews. i need some more frequently asked questions for the interview in asp.net c#,Ado.net,SQL Server

Page 50: Interview Questions ASP[1]

kindly send me frequently asked questions to

[email protected]

regards

J.Duraisamy .

# re: Interview Questions: ASP.NET 1/16/2006 9:26 AM amit does any bodyhas kenexa interview pattern questions?

#  Interview Questions: ASP.NET 1/16/2006 10:40 PM NIkita Dear Sir, i want to know the difference between repeater,datalist and datagrid controls?

# re: Interview Questions: ASP.NET 1/21/2006 12:49 AM raji Can u send me .net interview questions to this id.

# re: Interview Questions: ASP.NET 1/23/2006 2:10 PM Rohit Shrestha Very nice posting and site.thank you all.

# re: Interview Questions: ASP.NET 1/26/2006 9:02 AM Manish Kumar Tiwari Hello Sir

I am a student of B. Tech (Information Technology). These questions are really very very help full to me. Sir I want to build my career with .NET technologies. Sir can u send me some e books on ASP.NET, VB.NET or which u think will be helpfull to me. Sir if u can please send me some material on my id

[email protected]

With Regards Manish Kumar Tiwari

# re: Interview Questions: ASP.NET 1/27/2006 10:41 PM S. Suresh kumar(cd) Sir, I think this site is very useful for the beginners who r going 2 attend the interview as well as for exp. candidates. It provides me confident to get into entry level programmer.

# re: Interview Questions: ASP.NET 1/31/2006 3:51 AM Kranthi Kumar Hi all,

I got an interview with Bosch can any body help me providing some hi level and standard interview questions on ASP.NET,C#.net and SQL SERVER 2005.Plz I am really thankful if anybody help me out.

Page 51: Interview Questions ASP[1]

id [email protected]

# Interview Questions: ASP.NET 1/31/2006 9:53 PM C.Ramesh Dear sir,

All these questions are very much helpfull for the asp.net interviews. i need some more frequently asked questions for the interview in asp.net c#,Ado.net,SQL Server

kindly send me frequently asked questions to

[email protected]

regards

C.Ramesh

# re: Interview Questions: ASP.NET 2/2/2006 10:22 PM Menaka Dear sir,

All these questions are very much helpfull for the asp.net interviews. i need some more frequently asked questions for the interview in asp.net c#,Ado.net,SQL Server

kindly send me frequently asked questions to

[email protected]

regards

Menaka

# re: Interview Questions: ASP.NET 2/5/2006 9:52 AM Nima Varghese This question are realy good not only for the interview but also for knowlledge wise.

Nima

# re: Interview Questions: ASP.NET 2/8/2006 12:19 AM Seshu Kumar Please send the interview questions .. so that i can prepare these questions

seshu

# re: Interview Questions: ASP.NET 2/10/2006 8:13 AM rajdeep hi i am begineer in the asp.net i read wrox for beginners .now i am prepraing for the intervies so please send me the asp.net with c #question as soon as possible

# re: Interview Questions: ASP.NET 2/16/2006 5:28 AM Deepak Sharma

Page 52: Interview Questions ASP[1]

Awesome Man

Really, this time I am not going to give answer of any question because I am novice in this field but dear I will come back with lots of question along with sollutions.

Warm Regards Deepak

# re: Interview Questions: ASP.NET 2/17/2006 5:04 AM saibabu.M Hello

these question and answers are very useful to face the technical interview purpose

Thanks and Regards saibabu.M GlobaleProcure

# re: Interview Questions: ASP.NET 2/20/2006 10:43 AM Anil L Really!! good Questions and very helpful

# re: Interview Questions: ASP.NET 2/21/2006 1:44 AM Harikrishna kondapalli Hi,

I Have a programing problem. Could You help me.

The question:

How to bind Three Different DropdownList Boxes? i meen first one --- Dropdown DAY second------Dropdown month thirdone-----DropDown Year so iwant to store date format in DateDataSource column.

my Email Id: [email protected]

Thanking You sir.

# re: Interview Questions: ASP.NET 2/22/2006 3:37 AM Manish Soni Anyone can ask me questions related to .Net framework and anyone can send me tutorials to me on [email protected]. I am .Net programmer with 2 years experience

# re: Interview Questions: ASP.NET 2/22/2006 8:41 AM Intekhab Aalam I am keen to look more questions and answers on advanced features of .NET like Remoting, Reflection, Web Services, Assembly etc.

Mail me if ne1 have : [email protected]

Thanks,

Page 53: Interview Questions ASP[1]

Intekhab

# re: Interview Questions: ASP.NET 2/22/2006 1:25 PM Yogesh Patange This page has got extensive list of Questions and Answers, even if you go through it once you should get good idea about what to expect in ASP.Net and .Net interviews I went through the answers of many of questions, for some of those answers you can expect sub-questions which one should be prepared for. So best way to tackle this is to learn about these .Net topics in little more details by going through online articles Or msdn. I think you have to know following topics to be confidently attend the interview: - CLR functions, CTS, MSIL, Metadata - OOP's in C# & VB.Net - .Net Remoting Basics & Web Services - XML & Serialization - Enterprise Services - ADO.Net, DataSets, Typed DataSets - Multi-threading and Syncronization - State Management in ASP.Net - Data binding in ASP.Net (specifically with Grid & List controls) - Security in ASP.Net - Application Configuration - Whats New in .Net Framework 2.0 (to be upto date with tecnology changes)

I just have the list, please look around for answers. Even I need it. Best of Luck!!

# re: Interview Questions: ASP.NET 2/22/2006 9:19 PM Atul Verma Hi

thanks for Providing these Question & Answers to help the beginers like me

Thanks, Atul

# Interview Questions: ASP.NET 2/24/2006 4:08 AM Sankar hi friends,

i am new to ASP.net. plz send me the frequently asked interview questions and plz guide to get through some good company where i can explore my knowledge in ASP/ASP.net.

my id is : [email protected]

# re: Interview Questions: ASP.NET 2/26/2006 9:46 PM Ashok.L EXPLAIN ABOUT RECORDSET

# re: Interview Questions: ASP.NET 2/27/2006 6:23 PM Ralph I am not impressed by your list of questions. If you really want to impress me get your MCSD.

With the MCSD, they ask in depth questions. Not lame repeats of stuff you can google out on google.

# re: Interview Questions: ASP.NET 3/2/2006 2:28 AM Kamlesh patel

Page 54: Interview Questions ASP[1]

Mind Blowing article!!!! Marvellous work done here. Thanks to mark and all respondent for their contribution. expect such thing in future.

True friend of web developer:asp.net

# Server.Transfer vs. Response.Redirect 3/3/2006 10:57 PM premanshu mukherji Good information but very brief. Need to stress on the actual mechanism. Yet, good job. Thanks

# re: Interview Questions: ASP.NET 3/5/2006 10:39 PM jolly i need more questions on web services

# re: Interview Questions: ASP.NET 3/6/2006 4:04 AM Sonia Questions are really very helpful.

Mail me if you have some more of such kind

My new ID: [email protected]

# re: Interview Questions: ASP.NET 3/6/2006 6:12 AM Anand Can someone send me some vb.net , vb, asp and Database related question. Please mail me at [email protected] thanks in advance

# Interview Questions: ASP.NET 3/6/2006 6:52 PM Thangaraj pls forward the question and answer

# re: Interview Questions: ASP.NET 3/7/2006 2:34 AM leena what is webservices?How it is work

# re: Interview Questions: ASP.NET 3/7/2006 2:34 AM leena what is webservices?How it is work

# re: Interview Questions: ASP.NET 3/7/2006 1:34 PM asp.net_beginner Indeed this is a very good ariticle. greatly appreciated. thanks to all who have put these questions and answers together

# re: Interview Questions: ASP.NET 3/7/2006 8:06 PM Atul kumar hi myself atul kumar i have done MCA in 2005 and after that i continuesly search the job in dot net so u lease u send me some more questions on c# and asp.net so that i can prepare myself for the interviews in MNC thanks & regards atul kumar

Page 55: Interview Questions ASP[1]

# re: Interview Questions: ASP.NET 3/9/2006 11:45 AM Ajay Kumar Dear Friends , If You have any more question related to .net please send to me.I am very very thankful to you...

Ajay Kumar

# re: Interview Questions: ASP.NET 3/9/2006 11:01 PM Manigandan Hai Sir, you have given that Range Validator supports only int, str, and date but it also supports double and currency data types. please check it out and correct it!.

# re: Interview Questions: ASP.NET 3/15/2006 5:28 AM prasad good questions!!!!

# re: Interview Questions: ASP.NET 3/16/2006 9:09 PM Surinder Kumar i need some more Question. If somebody have some fundoo questions in asp.net or c#.net pls send me at [email protected]

# re: Interview Questions: ASP.NET 3/17/2006 1:10 AM Arudhran Its just amazing and interesting.. it helps me a lot keep going..

Arudhran

# re: Interview Questions: ASP.NET 3/17/2006 8:20 PM nagarajyam good

# Interview Questions: ASP.NET 3/20/2006 6:42 AM vijay kumar hi,

I questions is ,how many tables a single dataset can store. If anybody knows about it plz mail me. thank u

# re: Interview Questions: ASP.NET 3/22/2006 1:20 AM M.P. RODGE This is excelent site as a guideline to new programmers in asp.net another such site is geekinterview.com pl. see.

# re: Interview Questions: ASP.NET 3/26/2006 1:08 AM Sanjar Good questions for a beginner. Good job.

Cheers

# re: Interview Questions: ASP.NET 3/29/2006 6:29 AM Annamalai

Page 56: Interview Questions ASP[1]

It is very helpful for me.

can anybody send some more important ASP.NET interview Q/A like typed dataset and so on.

My maid id: [email protected]

Thanks

# re: Interview Questions: ASP.NET 3/31/2006 5:14 PM hema hi all,

Iam B-Tech graduate, iam new to .net,asp.net and c# languages.I need basic questions to work on this.Suggest me any book or send me questions on this.

This site is ver helpfull for me and i need more information about this.

Thanks

# re: Interview Questions: ASP.NET 4/2/2006 11:39 PM girish 1.I wanna access controls of one form into another webform. (I dont want to use Session/Querystring etc) Is their any other Method please help. I tried using property by returing refernce of that control.

2.I want to destroy previous form when user moves from one form to another. The previous page should not be accessable again i.e it should be Expired.

3.How to navigate through all textbox in a form. Like i wanna clear the contents of all textboxes on my from using a for loop.

4.I want a list of availabe webservices.( I tried to find it on www.UDDI.org but couldn't find usefull one.

# re: Interview Questions: ASP.NET 4/2/2006 11:43 PM girish U can mail me at [email protected]. wating in anticipation. Please help me.

# re: Interview Questions: ASP.NET 4/3/2006 6:22 AM shailendra Very good idea to share the knowledge.

# re: Interview Questions: ASP.NET 4/3/2006 9:56 PM vishal shende I like this type of question

if anybody have question so send me i am also send u other dot net question so share our and youer knowlwdge

# re: Interview Questions: ASP.NET 4/3/2006 11:07 PM shilpa s

Page 57: Interview Questions ASP[1]

can we add/insert new items in drop-downlist during execution(running)? for tht seperate code is required in asp.net??? send me on:[email protected]

# re: Interview Questions: ASP.NET 4/3/2006 11:07 PM shilpa s can we add/insert new items in drop-downlist during execution(running)? for tht seperate code is required in asp.net??? send me on:[email protected]

# re: Interview Questions: ASP.NET 4/4/2006 2:40 AM Swap Hi , I like site very much , Plz answer my questions 1.what are ADO objects int .net? 2.What is differance between ASP.NET & ASP? 3.Is .net a platform independent? 4 What is default datatype in .net?

# re: Interview Questions: ASP.NET 4/8/2006 1:38 PM saira I hav a question ...

I have a file called a.aspx which has some textboxes. I want to post the values to b.aspx without using response.redirect. How can I do this.?????

# re: Interview Questions: ASP.NET 4/11/2006 12:17 PM sam Hi, These are really good questions.

Could all the people send me the question which they faced in their interviews? Or Help me with questions that u can think can be asked.

I need more question on asp.net(vb.net), advantages of c3, sql server 2000 .

Thanx, sam

# re: Interview Questions: ASP.NET 4/13/2006 9:26 AM uros-h hi, this is great stuff! MY COMMENTS:

question 3: i would answer like this "the view state is available when Load event is fired" I was little confused with answer before and after... because this is main difference between this two events. During Init we can not see view state.

question 10: full answer is integer, string, double, date and currency.

greetings from Serbia:)

# re: Interview Questions: ASP.NET 4/13/2006 10:52 PM Satyendra very good questions can u send these types of questions on my id

Page 58: Interview Questions ASP[1]

thanks Satyendra

# re: Interview Questions: ASP.NET 4/15/2006 1:05 PM TG I had interview yesterday 13 out of 15 question was from your question. I wished I had seen your web site before the interview. Guys if you have interview it real help. Thank you for your time.

# re: Interview Questions: ASP.NET 4/17/2006 3:19 AM shiv Hi ,

Good to watch this area n learned a lot from this area

# Best ASP.NET FAQ 4/18/2006 12:05 AM Joy TrackBack From:http://littlebamboo.cnblogs.com/archive/2006/04/18/378206.html

# Best ASP.NET FAQ 4/18/2006 12:06 AM Joy TrackBack From:http://littlebamboo.cnblogs.com/archive/0001/01/01/378206.html

# re: Interview Questions: ASP.NET 4/19/2006 7:11 AM Ashik Wani The questions are really obevious in such kind of interview... Thanks for posting Ashik Wani BQE Software Inc.

# re: Interview Questions: ASP.NET 4/20/2006 4:57 AM Abhishek Saxena Hi Friends I am submitting some important questions,might be helpful to all of u ......

1.1 What is .NET? .NET is a general-purpose software development platform, similar to Java. At its core is a virtual machine that turns intermediate language (IL) into machine code. High-level language compilers for C#, VB.NET and C++ are provided to turn source code into IL. C# is a new programming language, very similar to Java. An extensive class library is included, featuring all the functionality one might expect from a contempory development platform - windows GUI development (Windows Forms), database access (ADO.NET), web development (ASP.NET), web services, XML etc. See also Microsoft's definition. 1.2 When was .NET announced? Bill Gates delivered a keynote at Forum 2000, held June 22, 2000, outlining the .NET 'vision'. The July 2000 PDC had a number of sessions on .NET technology, and delegates were given CDs containing a pre-release version of the .NET framework/SDK and Visual Studio.NET. 1.3 What versions of .NET are there? The final version of the 1.0 SDK and runtime was made publicly available around 6pm PST on 15-Jan-2002. At the same time, the final version of Visual Studio.NET was made available to MSDN subscribers. .NET 1.1 was released in April 2003 - it's mostly bug fixes for 1.0. .NET 2.0 is expected in 2005. 1.4 What operating systems does the .NET Framework run on?

Page 59: Interview Questions ASP[1]

The runtime supports Windows Server 2003, Windows XP, Windows 2000, NT4 SP6a and Windows ME/98. Windows 95 is not supported. Some parts of the framework do not work on all platforms - for example, ASP.NET is only supported on XP and Windows 2000/2003. Windows 98/ME cannot be used for development. IIS is not supported on Windows XP Home Edition, and so cannot be used to host ASP.NET. However, the ASP.NET Web Matrix web server does run on XP Home. The .NET Compact Framework is a version of the .NET Framework for mobile devices, running Windows CE or Windows Mobile. The Mono project has a version of the .NET Framework that runs on Linux. 1.5 What tools can I use to develop .NET applications? There are a number of tools, described here in ascending order of cost: • The .NET Framework SDK is free and includes command-line compilers for C++, C#, and VB.NET and various other utilities to aid development. • ASP.NET Web Matrix is a free ASP.NET development environment from Microsoft. As well as a GUI development environment, the download includes a simple web server that can be used instead of IIS to host ASP.NET apps. This opens up ASP.NET development to users of Windows XP Home Edition, which cannot run IIS. • Microsoft Visual C# .NET Standard 2003 is a cheap (around $100) version of Visual Studio limited to one language and also with limited wizard support. For example, there's no wizard support for class libraries or custom UI controls. Useful for beginners to learn with, or for savvy developers who can work around the deficiencies in the supplied wizards. As well as C#, there are VB.NET and C++ versions. • Microsoft Visual Studio.NET Professional 2003. If you have a license for Visual Studio 6.0, you can get the upgrade. You can also upgrade from VS.NET 2002 for a token $30. Visual Studio.NET includes support for all the MS languages (C#, C++, VB.NET) and has extensive wizard support. At the top end of the price spectrum are the Visual Studio.NET 2003 Enterprise and Enterprise Architect editions. These offer extra features such as Visual Sourcesafe (version control), and performance and analysis tools. Check out the Visual Studio.NET Feature Comparison at http://msdn.microsoft.com/vstudio/howtobuy/choosing.asp 1.6 Why did they call it .NET? I don't know what they were thinking. They certainly weren't thinking of people using search tools. It's meaningless marketing nonsense - best not to think about it. 2. Terminology 2.1 What is the CLI? Is it the same as the CLR? The CLI (Common Language Infrastructure) is the definiton of the fundamentals of the .NET framework - the Common Type System (CTS), metadata, the Virtual Execution Environment (VES) and its use of intermediate language (IL), and the support of multiple programming languages via the Common Language Specification (CLS). The CLI is documented through ECMA - see http://msdn.microsoft.com/net/ecma/ for more details. The CLR (Common Language Runtime) is Microsoft's primary implementation of the CLI. Microsoft also have a shared source implementation known as ROTOR, for educational purposes, as well as the .NET Compact Framework for mobile devices. Non-Microsoft CLI implementations include Mono and DotGNU Portable.NET. 2.2 What is the CTS, and how does it relate to the CLS? CTS = Common Type System. This is the full range of types that the .NET runtime understands. Not all .NET languages support all the types in the CTS. CLS = Common Language Specification. This is a subset of the CTS which all .NET languages are expected to support. The idea is that any program which uses CLS-compliant types can interoperate with any .NET program written in any language. This interop is very fine-grained - for example a VB.NET class can inherit from a C# class. 2.3 What is IL? IL = Intermediate Language. Also known as MSIL (Microsoft Intermediate Language) or CIL (Common Intermediate Language). All .NET source code (of any language) is compiled to IL during development. The IL is then converted to machine code at the point where the software is installed, or (more commonly) at run-time by a Just-In-Time (JIT) compiler. 2.4 What is C#? C# is a new language designed by Microsoft to work with the .NET framework. In their "Introduction to C#" whitepaper, Microsoft describe C# as follows: "C# is a simple, modern, object oriented, and type-safe programming language derived from C and C++. C# (pronounced “C sharp”) is firmly planted in the C and C++ family tree of

Page 60: Interview Questions ASP[1]

languages, and will immediately be familiar to C and C++ programmers. C# aims to combine the high productivity of Visual Basic and the raw power of C++." Substitute 'Java' for 'C#' in the quote above, and you'll see that the statement still works pretty well :-). If you are a C++ programmer, you might like to check out my C# FAQ. 2.5 What does 'managed' mean in the .NET context? The term 'managed' is the cause of much confusion. It is used in various places within .NET, meaning slightly different things. Managed code: The .NET framework provides several core run-time services to the programs that run within it - for example exception handling and security. For these services to work, the code must provide a minimum level of information to the runtime. Such code is called managed code. Managed data: This is data that is allocated and freed by the .NET runtime's garbage collector. Managed classes: This is usually referred to in the context of Managed Extensions (ME) for C++. When using ME C++, a class can be marked with the __gc keyword. As the name suggests, this means that the memory for instances of the class is managed by the garbage collector, but it also means more than that. The class becomes a fully paid-up member of the .NET community with the benefits and restrictions that brings. An example of a benefit is proper interop with classes written in other languages - for example, a managed C++ class can inherit from a VB class. An example of a restriction is that a managed class can only inherit from one base class. 2.6 What is reflection? All .NET compilers produce metadata about the types defined in the modules they produce. This metadata is packaged along with the module (modules in turn are packaged together in assemblies), and can be accessed by a mechanism called reflection. The System.Reflection namespace contains classes that can be used to interrogate the types for a module/assembly. Using reflection to access .NET metadata is very similar to using ITypeLib/ITypeInfo to access type library data in COM, and it is used for similar purposes - e.g. determining data type sizes for marshaling data across context/process/machine boundaries. Reflection can also be used to dynamically invoke methods (see System.Type.InvokeMember), or even create types dynamically at run-time (see System.Reflection.Emit.TypeBuilder). 3. Assemblies 3.1 What is an assembly? An assembly is sometimes described as a logical .EXE or .DLL, and can be an application (with a main entry point) or a library. An assembly consists of one or more files (dlls, exes, html files etc), and represents a group of resources, type definitions, and implementations of those types. An assembly may also contain references to other assemblies. These resources, types and references are described in a block of data called a manifest. The manifest is part of the assembly, thus making the assembly self-describing. An important aspect of assemblies is that they are part of the identity of a type. The identity of a type is the assembly that houses it combined with the type name. This means, for example, that if assembly A exports a type called T, and assembly B exports a type called T, the .NET runtime sees these as two completely different types. Furthermore, don't get confused between assemblies and namespaces - namespaces are merely a hierarchical way of organising type names. To the runtime, type names are type names, regardless of whether namespaces are used to organise the names. It's the assembly plus the typename (regardless of whether the type name belongs to a namespace) that uniquely indentifies a type to the runtime. Assemblies are also important in .NET with respect to security - many of the security restrictions are enforced at the assembly boundary. Finally, assemblies are the unit of versioning in .NET - more on this below. 3.2 How can I produce an assembly? The simplest way to produce an assembly is directly from a .NET compiler. For example, the following C# program: public class CTest { public CTest() { System.Console.WriteLine( "Hello from CTest" ); } } can be compiled into a library assembly (dll) like this: csc /t:library ctest.cs You can then view the contents of the assembly by running the "IL Disassembler" tool that

Page 61: Interview Questions ASP[1]

comes with the .NET SDK. Alternatively you can compile your source into modules, and then combine the modules into an assembly using the assembly linker (al.exe). For the C# compiler, the /target:module switch is used to generate a module instead of an assembly. 3.3 What is the difference between a private assembly and a shared assembly? • Location and visibility: A private assembly is normally used by a single application, and is stored in the application's directory, or a sub-directory beneath. A shared assembly is normally stored in the global assembly cache, which is a repository of assemblies maintained by the .NET runtime. Shared assemblies are usually libraries of code which many applications will find useful, e.g. the .NET framework classes. • Versioning: The runtime enforces versioning constraints only on shared assemblies, not on private assemblies. 3.4 How do assemblies find each other? By searching directory paths. There are several factors which can affect the path (such as the AppDomain host, and application configuration files), but for private assemblies the search path is normally the application's directory and its sub-directories. For shared assemblies, the search path is normally same as the private assembly path plus the shared assembly cache. 3.5 How does assembly versioning work? Each assembly has a version number called the compatibility version. Also each reference to an assembly (from another assembly) includes both the name and version of the referenced assembly. The version number has four numeric parts (e.g. 5.5.2.33). Assemblies with either of the first two parts different are normally viewed as incompatible. If the first two parts are the same, but the third is different, the assemblies are deemed as 'maybe compatible'. If only the fourth part is different, the assemblies are deemed compatible. However, this is just the default guideline - it is the version policy that decides to what extent these rules are enforced. The version policy can be specified via the application configuration file. Remember: versioning is only applied to shared assemblies, not private assemblies. 3.6 How can I develop an application that automatically updates itself from the web? For .NET 1.x, use the Updater Application Block. For .NET 2.x, use ClickOnce. 4. Application Domains 4.1 What is an application domain? An AppDomain can be thought of as a lightweight process. Multiple AppDomains can exist inside a Win32 process. The primary purpose of the AppDomain is to isolate applications from each other, and so it is particularly useful in hosting scenarios such as ASP.NET. An AppDomain can be destroyed by the host without affecting other AppDomains in the process. Win32 processes provide isolation by having distinct memory address spaces. This is effective, but expensive. The .NET runtime enforces AppDomain isolation by keeping control over the use of memory - all memory in the AppDomain is managed by the .NET runtime, so the runtime can ensure that AppDomains do not access each other's memory. One non-obvious use of AppDomains is for unloading types. Currently the only way to unload a .NET type is to destroy the AppDomain it is loaded into. This is particularly useful if you create and destroy types on-the-fly via reflection. Microsoft have an AppDomain FAQ. 4.2 How does an AppDomain get created? AppDomains are usually created by hosts. Examples of hosts are the Windows Shell, ASP.NET and IE. When you run a .NET application from the command-line, the host is the Shell. The Shell creates a new AppDomain for every application. AppDomains can also be explicitly created by .NET applications. Here is a C# sample which creates an AppDomain, creates an instance of an object inside it, and then executes one of the object's methods: using System; using System.Runtime.Remoting; using System.Reflection;

public class CAppDomainInfo : MarshalByRefObject { public string GetName() { return AppDomain.CurrentDomain.FriendlyName; } }

public class App

Page 62: Interview Questions ASP[1]

{ public static int Main() { AppDomain ad = AppDomain.CreateDomain( "Andy's new domain" ); CAppDomainInfo adInfo = (CAppDomainInfo)ad.CreateInstanceAndUnwrap( Assembly.GetCallingAssembly().GetName().Name, "CAppDomainInfo" ); Console.WriteLine( "Created AppDomain name = " + adInfo.GetName() ); return 0; } }

4.3 Can I write my own .NET host? Yes. For an example of how to do this, take a look at the source for the dm.net moniker developed by Jason Whittington and Don Box. There is also a code sample in the .NET SDK called CorHost. 5. Garbage Collection 5.1 What is garbage collection? Garbage collection is a heap-management strategy where a run-time component takes responsibility for managing the lifetime of the memory used by objects. This concept is not new to .NET - Java and many other languages/runtimes have used garbage collection for some time. 5.2 Is it true that objects don't always get destroyed immediately when the last reference goes away? Yes. The garbage collector offers no guarantees about the time when an object will be destroyed and its memory reclaimed. There was an interesting thread on the DOTNET list, started by Chris Sells, about the implications of non-deterministic destruction of objects in C#. In October 2000, Microsoft's Brian Harry posted a lengthy analysis of the problem. Chris Sells' response to Brian's posting is here. 5.3 Why doesn't the .NET runtime offer deterministic destruction? Because of the garbage collection algorithm. The .NET garbage collector works by periodically running through a list of all the objects that are currently being referenced by an application. All the objects that it doesn't find during this search are ready to be destroyed and the memory reclaimed. The implication of this algorithm is that the runtime doesn't get notified immediately when the final reference on an object goes away - it only finds out during the next 'sweep' of the heap. Futhermore, this type of algorithm works best by performing the garbage collection sweep as rarely as possible. Normally heap exhaustion is the trigger for a collection sweep. 5.4 Is the lack of deterministic destruction in .NET a problem? It's certainly an issue that affects component design. If you have objects that maintain expensive or scarce resources (e.g. database locks), you need to provide some way to tell the object to release the resource when it is done. Microsoft recommend that you provide a method called Dispose() for this purpose. However, this causes problems for distributed objects - in a distributed system who calls the Dispose() method? Some form of reference-counting or ownership-management mechanism is needed to handle distributed objects - unfortunately the runtime offers no help with this. 5.5 Should I implement Finalize on my class? Should I implement IDisposable? This issue is a little more complex than it first appears. There are really two categories of class that require deterministic destruction - the first category manipulate unmanaged types directly, whereas the second category manipulate managed types that require deterministic destruction. An example of the first category is a class with an IntPtr member representing an OS file handle. An example of the second category is a class with a System.IO.FileStream member. For the first category, it makes sense to implement IDisposable and override Finalize. This allows the object user to 'do the right thing' by calling Dispose, but also provides a fallback of freeing the unmanaged resource in the Finalizer, should the calling code fail in its duty. However this logic does not apply to the second category of class, with only managed resources. In this case implementing Finalize is pointless, as managed member objects cannot be accessed in the Finalizer. This is because there is no guarantee about the ordering of Finalizer execution. So only the Dispose method should be implemented. (If you think about it, it doesn't really make sense to call Dispose on member objects from a Finalizer anyway, as the

Page 63: Interview Questions ASP[1]

member object's Finalizer will do the required cleanup.) For classes that need to implement IDisposable and override Finalize, see Microsoft's documented pattern. Note that some developers argue that implementing a Finalizer is always a bad idea, as it hides a bug in your code (i.e. the lack of a Dispose call). A less radical approach is to implement Finalize but include a Debug.Assert at the start, thus signalling the problem in developer builds but allowing the cleanup to occur in release builds. 5.6 Do I have any control over the garbage collection algorithm? A little. For example the System.GC class exposes a Collect method, which forces the garbage collector to collect all unreferenced objects immediately. Also there is a gcConcurrent setting that can be specified via the application configuration file. This specifies whether or not the garbage collector performs some of its collection activities on a separate thread. The setting only applies on multi-processor machines, and defaults to true. 5.7 How can I find out what the garbage collector is doing? Lots of interesting statistics are exported from the .NET runtime via the '.NET CLR xxx' performance counters. Use Performance Monitor to view them. 5.8 What is the lapsed listener problem? The lapsed listener problem is one of the primary causes of leaks in .NET applications. It occurs when a subscriber (or 'listener') signs up for a publisher's event, but fails to unsubscribe. The failure to unsubscribe means that the publisher maintains a reference to the subscriber as long as the publisher is alive. For some publishers, this may be the duration of the application. This situation causes two problems. The obvious problem is the leakage of the subscriber object. The other problem is the performance degredation due to the publisher sending redundant notifications to 'zombie' subscribers. There are at least a couple of solutions to the problem. The simplest is to make sure the subscriber is unsubscribed from the publisher, typically by adding an Unsubscribe() method to the subscriber. Another solution, documented here by Shawn Van Ness, is to change the publisher to use weak references in its subscriber list. 5.9 When do I need to use GC.KeepAlive? It's very unintuitive, but the runtime can decide that an object is garbage much sooner than you expect. More specifically, an object can become garbage while a method is executing on the object, which is contrary to most developers' expectations. Chris Brumme explains the issue on his blog. I've taken Chris's code and expanded it into a full app that you can play with if you want to prove to yourself that this is a real problem: using System; using System.Runtime.InteropServices;

class Win32 { [DllImport("kernel32.dll")] public static extern IntPtr CreateEvent( IntPtr lpEventAttributes, bool bManualReset,bool bInitialState, string lpName);

[DllImport("kernel32.dll", SetLastError=true)] public static extern bool CloseHandle(IntPtr hObject);

[DllImport("kernel32.dll")] public static extern bool SetEvent(IntPtr hEvent); }

class EventUser { public EventUser() { hEvent = Win32.CreateEvent( IntPtr.Zero, false, false, null ); }

~EventUser() { Win32.CloseHandle( hEvent ); Console.WriteLine("EventUser finalized");

Page 64: Interview Questions ASP[1]

}

public void UseEvent() { UseEventInStatic( this.hEvent ); }

static void UseEventInStatic( IntPtr hEvent ) { //GC.Collect(); bool bSuccess = Win32.SetEvent( hEvent ); Console.WriteLine( "SetEvent " + (bSuccess ? "succeeded" : "FAILED!") ); }

IntPtr hEvent; }

class App { static void Main(string[] args) { EventUser eventUser = new EventUser(); eventUser.UseEvent(); } } If you run this code, it'll probably work fine, and you'll get the following output: SetEvent succeeded EventDemo finalized However, if you uncomment the GC.Collect() call in the UseEventInStatic() method, you'll get this output: EventDemo finalized SetEvent FAILED! (Note that you need to use a release build to reproduce this problem.) So what's happening here? Well, at the point where UseEvent() calls UseEventInStatic(), a copy is taken of the hEvent field, and there are no further references to the EventUser object anywhere in the code. So as far as the runtime is concerned, the EventUser object is garbage and can be collected. Normally of course the collection won't happen immediately, so you'll get away with it, but sooner or later a collection will occur at the wrong time, and your app will fail.

A solution to this problem is to add a call to GC.KeepAlive(this) to the end of the UseEvent method, as Chris explains. 6. Serialization 6.1 What is serialization? Serialization is the process of converting an object into a stream of bytes. Deserialization is the opposite process, i.e. creating an object from a stream of bytes. Serialization/Deserialization is mostly used to transport objects (e.g. during remoting), or to persist objects (e.g. to a file or database). 6.2 Does the .NET Framework have in-built support for serialization? There are two separate mechanisms provided by the .NET class library - XmlSerializer and SoapFormatter/BinaryFormatter. Microsoft uses XmlSerializer for Web Services, and SoapFormatter/BinaryFormatter for remoting. Both are available for use in your own code. 6.3 I want to serialize instances of my class. Should I use XmlSerializer, SoapFormatter or BinaryFormatter? It depends. XmlSerializer has severe limitations such as the requirement that the target class has a parameterless constructor, and only public read/write properties and fields can be serialized. However, on the plus side, XmlSerializer has good support for customising the XML document that is produced or consumed. XmlSerializer's features mean that it is most suitable for cross-platform work, or for constructing objects from existing XML documents. SoapFormatter and BinaryFormatter have fewer limitations than XmlSerializer. They can serialize private fields, for example. However they both require that the target class be marked with the [Serializable] attribute, so like XmlSerializer the class needs to be written with

Page 65: Interview Questions ASP[1]

serialization in mind. Also there are some quirks to watch out for - for example on deserialization the constructor of the new object is not invoked. The choice between SoapFormatter and BinaryFormatter depends on the application. BinaryFormatter makes sense where both serialization and deserialization will be performed on the .NET platform and where performance is important. SoapFormatter generally makes more sense in all other cases, for ease of debugging if nothing else. 6.4 Can I customise the serialization process? Yes. XmlSerializer supports a range of attributes that can be used to configure serialization for a particular class. For example, a field or property can be marked with the [XmlIgnore] attribute to exclude it from serialization. Another example is the [XmlElement] attribute, which can be used to specify the XML element name to be used for a particular property or field. Serialization via SoapFormatter/BinaryFormatter can also be controlled to some extent by attributes. For example, the [NonSerialized] attribute is the equivalent of XmlSerializer's [XmlIgnore] attribute. Ultimate control of the serialization process can be acheived by implementing the the ISerializable interface on the class whose instances are to be serialized. 6.5 Why is XmlSerializer so slow? There is a once-per-process-per-type overhead with XmlSerializer. So the first time you serialize or deserialize an object of a given type in an application, there is a significant delay. This normally doesn't matter, but it may mean, for example, that XmlSerializer is a poor choice for loading configuration settings during startup of a GUI application. 6.6 Why do I get errors when I try to serialize a Hashtable? XmlSerializer will refuse to serialize instances of any class that implements IDictionary, e.g. Hashtable. SoapFormatter and BinaryFormatter do not have this restriction. 6.7 XmlSerializer is throwing a generic "There was an error reflecting MyClass" error. How do I find out what the problem is? Look at the InnerException property of the exception that is thrown to get a more specific error message. 6.8 Why am I getting an InvalidOperationException when I serialize an ArrayList? XmlSerializer needs to know in advance what type of objects it will find in an ArrayList. To specify the type, use the XmlArrayItem attibute like this: public class Person { public string Name; public int Age; }

public class Population { [XmlArrayItem(typeof(Person))] public ArrayList People; } 7. Attributes 7.1 What are attributes? There are at least two types of .NET attribute. The first type I will refer to as a metadata attribute - it allows some data to be attached to a class or method. This data becomes part of the metadata for the class, and (like other class metadata) can be accessed via reflection. An example of a metadata attribute is [serializable], which can be attached to a class and means that instances of the class can be serialized. [serializable] public class CTest {} The other type of attribute is a context attribute. Context attributes use a similar syntax to metadata attributes but they are fundamentally different. Context attributes provide an interception mechanism whereby instance activation and method calls can be pre- and/or post-processed. If you have encountered Keith Brown's universal delegator you'll be familiar with this idea. 7.2 Can I create my own metadata attributes? Yes. Simply derive a class from System.Attribute and mark it with the AttributeUsage attribute. For example: [AttributeUsage(AttributeTargets.Class)] public class InspiredByAttribute : System.Attribute { public string InspiredBy;

Page 66: Interview Questions ASP[1]

public InspiredByAttribute( string inspiredBy ) { InspiredBy = inspiredBy; } }

[InspiredBy("Andy Mc's brilliant .NET FAQ")] class CTest { }

class CApp { public static void Main() { object[] atts = typeof(CTest).GetCustomAttributes(true);

foreach( object att in atts ) if( att is InspiredByAttribute ) Console.WriteLine( "Class CTest was inspired by {0}", ((InspiredByAttribute)att).InspiredBy ); } } 7.3 Can I create my own context attibutes? Yes. Take a look at Peter Drayton's Tracehook.NET. 8. Code Access Security 8.1 What is Code Access Security (CAS)? CAS is the part of the .NET security model that determines whether or not code is allowed to run, and what resources it can use when it is running. For example, it is CAS that will prevent a .NET web applet from formatting your hard disk. 8.2 How does CAS work? The CAS security policy revolves around two key concepts - code groups and permissions. Each .NET assembly is a member of a particular code group, and each code group is granted the permissions specified in a named permission set. For example, using the default security policy, a control downloaded from a web site belongs to the 'Zone - Internet' code group, which adheres to the permissions defined by the 'Internet' named permission set. (Naturally the 'Internet' named permission set represents a very restrictive range of permissions.) 8.3 Who defines the CAS code groups? Microsoft defines some default ones, but you can modify these and even create your own. To see the code groups defined on your system, run 'caspol -lg' from the command-line. On my system it looks like this: Level = Machine

Code Groups:

1. All code: Nothing 1.1. Zone - MyComputer: FullTrust 1.1.1. Honor SkipVerification requests: SkipVerification 1.2. Zone - Intranet: LocalIntranet 1.3. Zone - Internet: Internet 1.4. Zone - Untrusted: Nothing 1.5. Zone - Trusted: Internet 1.6. StrongName - 0024000004800000940000000602000000240000525341310004000003 000000CFCB3291AA715FE99D40D49040336F9056D7886FED46775BC7BB5430BA4444FEF8348EBD06 F962F39776AE4DC3B7B04A7FE6F49F25F740423EBF2C0B89698D8D08AC48D69CED0FC8F83B465E08 07AC11EC1DCC7D054E807A43336DDE408A5393A48556123272CEEEE72F1660B71927D3856

Page 67: Interview Questions ASP[1]

1AABF5C AC1DF1734633C602F8F2D5: Everything Note the hierarchy of code groups - the top of the hierarchy is the most general ('All code'), which is then sub-divided into several groups, each of which in turn can be sub-divided. Also note that (somewhat counter-intuitively) a sub-group can be associated with a more permissive permission set than its parent. 8.4 How do I define my own code group? Use caspol. For example, suppose you trust code from www.mydomain.com and you want it have full access to your system, but you want to keep the default restrictions for all other internet sites. To achieve this, you would add a new code group as a sub-group of the 'Zone - Internet' group, like this: caspol -ag 1.3 -site www.mydomain.com FullTrust Now if you run caspol -lg you will see that the new group has been added as group 1.3.1: ... 1.3. Zone - Internet: Internet 1.3.1. Site - www.mydomain.com: FullTrust ... Note that the numeric label (1.3.1) is just a caspol invention to make the code groups easy to manipulate from the command-line. The underlying runtime never sees it. 8.5 How do I change the permission set for a code group? Use caspol. If you are the machine administrator, you can operate at the 'machine' level - which means not only that the changes you make become the default for the machine, but also that users cannot change the permissions to be more permissive. If you are a normal (non-admin) user you can still modify the permissions, but only to make them more restrictive. For example, to allow intranet code to do what it likes you might do this: caspol -cg 1.2 FullTrust Note that because this is more permissive than the default policy (on a standard system), you should only do this at the machine level - doing it at the user level will have no effect. 8.6 Can I create my own permission set? Yes. Use caspol -ap, specifying an XML file containing the permissions in the permission set. To save you some time, here is a sample file corresponding to the 'Everything' permission set - just edit to suit your needs. When you have edited the sample, add it to the range of available permission sets like this: caspol -ap samplepermset.xml Then, to apply the permission set to a code group, do something like this: caspol -cg 1.3 SamplePermSet (By default, 1.3 is the 'Internet' code group) 8.7 I'm having some trouble with CAS. How can I troubleshoot the problem? Caspol has a couple of options that might help. First, you can ask caspol to tell you what code group an assembly belongs to, using caspol -rsg. Similarly, you can ask what permissions are being applied to a particular assembly using caspol -rsp. 8.8 I can't be bothered with CAS. Can I turn it off? Yes, as long as you are an administrator. Just run: caspol -s off 9. Intermediate Language (IL) 9.1 Can I look at the IL for an assembly? Yes. MS supply a tool called Ildasm that can be used to view the metadata and IL for an assembly. 9.2 Can source code be reverse-engineered from IL? Yes, it is often relatively straightforward to regenerate high-level source from IL. Lutz Roeder's Reflector does a very good job of turning IL into C# or VB.NET. 9.3 How can I stop my code being reverse-engineered from IL? You can buy an IL obfuscation tool. These tools work by 'optimising' the IL in such a way that reverse-engineering becomes much more difficult. Of course if you are writing web services then reverse-engineering is not a problem as clients do not have access to your IL. 9.4 Can I write IL programs directly? Yes. Peter Drayton posted this simple example to the DOTNET mailing list: .assembly MyAssembly {} .class MyApp { .method static void Main() {

Page 68: Interview Questions ASP[1]

.entrypoint ldstr "Hello, IL!" call void System.Console::WriteLine(class System.Object) ret } } Just put this into a file called hello.il, and then run ilasm hello.il. An exe assembly will be generated. 9.5 Can I do things in IL that I can't do in C#? Yes. A couple of simple examples are that you can throw exceptions that are not derived from System.Exception, and you can have non-zero-based arrays. 10. Implications for COM 10.1 Does .NET replace COM? This subject causes a lot of controversy, as you'll see if you read the mailing list archives. Take a look at the following two threads: http://discuss.develop.com/archives/wa.exe?A2=ind0007&L=DOTNET&D=0&P=68241 http://discuss.develop.com/archives/wa.exe?A2=ind0007&L=DOTNET&P=R60761 The bottom line is that .NET has its own mechanisms for type interaction, and they don't use COM. No IUnknown, no IDL, no typelibs, no registry-based activation. This is mostly good, as a lot of COM was ugly. Generally speaking, .NET allows you to package and use components in a similar way to COM, but makes the whole thing a bit easier. 10.2 Is DCOM dead? Pretty much, for .NET developers. The .NET Framework has a new remoting model which is not based on DCOM. DCOM was pretty much dead anyway, once firewalls became widespread and Microsoft got SOAP fever. Of course DCOM will still be used in interop scenarios. 10.3 Is COM+ dead? Not immediately. The approach for .NET 1.0 was to provide access to the existing COM+ services (through an interop layer) rather than replace the services with native .NET ones. Various tools and attributes were provided to make this as painless as possible. Over time it is expected that interop will become more seamless - this may mean that some services become a core part of the CLR, and/or it may mean that some services will be rewritten as managed code which runs on top of the CLR. For more on this topic, search for postings by Joe Long in the archives - Joe is the MS group manager for COM+. Start with this message: http://discuss.develop.com/archives/wa.exe?A2=ind0007&L=DOTNET&P=R68370 10.4 Can I use COM components from .NET programs? Yes. COM components are accessed from the .NET runtime via a Runtime Callable Wrapper (RCW). This wrapper turns the COM interfaces exposed by the COM component into .NET-compatible interfaces. For oleautomation interfaces, the RCW can be generated automatically from a type library. For non-oleautomation interfaces, it may be necessary to develop a custom RCW which manually maps the types exposed by the COM interface to .NET-compatible types. Here's a simple example for those familiar with ATL. First, create an ATL component which implements the following IDL: import "oaidl.idl"; import "ocidl.idl";

[ object, uuid(EA013F93-487A-4403-86EC-FD9FEE5E6206), helpstring("ICppName Interface"), pointer_default(unique), oleautomation ]

interface ICppName : IUnknown { [helpstring("method SetName")] HRESULT SetName([in] BSTR name); [helpstring("method GetName")] HRESULT GetName([out,retval] BSTR *pName ); };

Page 69: Interview Questions ASP[1]

[ uuid(F5E4C61D-D93A-4295-A4B4-2453D4A4484D), version(1.0), helpstring("cppcomserver 1.0 Type Library") ] library CPPCOMSERVERLib { importlib("stdole32.tlb"); importlib("stdole2.tlb"); [ uuid(600CE6D9-5ED7-4B4D-BB49-E8D5D5096F70), helpstring("CppName Class") ] coclass CppName { [default] interface ICppName; }; }; When you've built the component, you should get a typelibrary. Run the TLBIMP utility on the typelibary, like this: tlbimp cppcomserver.tlb If successful, you will get a message like this: Typelib imported successfully to CPPCOMSERVERLib.dll You now need a .NET client - let's use C#. Create a .cs file containing the following code: using System; using CPPCOMSERVERLib;

public class MainApp { static public void Main() { CppName cppname = new CppName(); cppname.SetName( "bob" ); Console.WriteLine( "Name is " + cppname.GetName() ); } } Compile the C# code like this: csc /r:cppcomserverlib.dll csharpcomclient.cs Note that the compiler is being told to reference the DLL we previously generated from the typelibrary using TLBIMP. You should now be able to run csharpcomclient.exe, and get the following output on the console: Name is bob 10.5 Can I use .NET components from COM programs? Yes. .NET components are accessed from COM via a COM Callable Wrapper (CCW). This is similar to a RCW (see previous question), but works in the opposite direction. Again, if the wrapper cannot be automatically generated by the .NET development tools, or if the automatic behaviour is not desirable, a custom CCW can be developed. Also, for COM to 'see' the .NET component, the .NET component must be registered in the registry. Here's a simple example. Create a C# file called testcomserver.cs and put the following in it: using System; using System.Runtime.InteropServices;

namespace AndyMc { [ClassInterface(ClassInterfaceType.AutoDual)] public class CSharpCOMServer { public CSharpCOMServer() {} public void SetName( string name ) { m_name = name; } public string GetName() { return m_name; } private string m_name;

Page 70: Interview Questions ASP[1]

} } Then compile the .cs file as follows: csc /target:library testcomserver.cs You should get a dll, which you register like this: regasm testcomserver.dll /tlb:testcomserver.tlb /codebase Now you need to create a client to test your .NET COM component. VBScript will do - put the following in a file called comclient.vbs: Dim dotNetObj Set dotNetObj = CreateObject("AndyMc.CSharpCOMServer") dotNetObj.SetName ("bob") MsgBox "Name is " & dotNetObj.GetName() and run the script like this: wscript comclient.vbs And hey presto you should get a message box displayed with the text "Name is bob". An alternative to the approach above it to use the dm.net moniker developed by Jason Whittington and Don Box. 10.6 Is ATL redundant in the .NET world? Yes. ATL will continue to be valuable for writing COM components for some time, but it has no place in the .NET world. 11. Miscellaneous 11.1 How does .NET remoting work? .NET remoting involves sending messages along channels. Two of the standard channels are HTTP and TCP. TCP is intended for LANs only - HTTP can be used for LANs or WANs (internet). Support is provided for multiple message serializarion formats. Examples are SOAP (XML-based) and binary. By default, the HTTP channel uses SOAP (via the .NET runtime Serialization SOAP Formatter), and the TCP channel uses binary (via the .NET runtime Serialization Binary Formatter). But either channel can use either serialization format. There are a number of styles of remote access: • SingleCall. Each incoming request from a client is serviced by a new object. The object is thrown away when the request has finished. • Singleton. All incoming requests from clients are processed by a single server object. • Client-activated object. This is the old stateful (D)COM model whereby the client receives a reference to the remote object and holds that reference (thus keeping the remote object alive) until it is finished with it. Distributed garbage collection of objects is managed by a system called 'leased based lifetime'. Each object has a lease time, and when that time expires the object is disconnected from the .NET runtime remoting infrastructure. Objects have a default renew time - the lease is renewed when a successful call is made from the client to the object. The client can also explicitly renew the lease. If you're interested in using XML-RPC as an alternative to SOAP, take a look at Charles Cook's XML-RPC.Net. 11.2 How can I get at the Win32 API from a .NET program? Use P/Invoke. This uses similar technology to COM Interop, but is used to access static DLL entry points instead of COM objects. Here is an example of C# calling the Win32 MessageBox function: using System; using System.Runtime.InteropServices;

class MainApp { [DllImport("user32.dll", EntryPoint="MessageBox", SetLastError=true, CharSet=CharSet.Auto)]

public static extern int MessageBox(int hWnd, String strMessage, String strCaption, uint uiType);

public static void Main() { MessageBox( 0, "Hello, this is PInvoke in operation!", ".NET", 0 ); } }

Page 71: Interview Questions ASP[1]

Pinvoke.net is a great resource for off-the-shelf P/Invoke signatures. 11.3 How do I write to the application configuration file at runtime? You don't. See http://www.interact-sw.co.uk/iangblog/2004/11/25/savingconfig. 11.4 What is the difference between an event and a delegate? An event is just a wrapper for a multicast delegate. Adding a public event to a class is almost the same as adding a public multicast delegate field. In both cases, subscriber objects can register for notifications, and in both cases the publisher object can send notifications to the subscribers. However, a public multicast delegate has the undesirable property that external objects can invoke the delegate, something we'd normally want to restrict to the publisher. Hence events - an event adds public methods to the containing class to add and remove receivers, but does not make the invocation mechanism public. See this post by Julien Couvreur for more discussion. 11.5 What size is a .NET object? Each instance of a reference type has two fields maintained by the runtime - a method table pointer and a sync block. These are 4 bytes each on a 32-bit system, making a total of 8 bytes per object overhead. Obviously the instance data for the type must be added to this to get the overall size of the object. So, for example, instances of the following class are 12 bytes each: class MyInt { ... private int x; } However, note that with the current implementation of the CLR there seems to be a minimum object size of 12 bytes, even for classes with no data (e.g. System.Object). Values types have no equivalent overhead. 12. .NET 2.0 12.1 What are the new features of .NET 2.0? Generics, anonymous methods, partial classes, iterators, property visibility (separate visibility for get and set) and static classes. See http://msdn.microsoft.com/msdnmag/issues/04/05/C20/default.aspx for more information about these features. 12.2 What are the new 2.0 features useful for? Generics are useful for writing efficient type-independent code, particularly where the types might include value types. The obvious application is container classes, and the .NET 2.0 class library includes a suite of generic container classes in the System.Collections.Generic namespace. Here's a simple example of a generic container class being used: List<int> myList = new List<int>(); myList.Add( 10 ); Anonymous methods reduce the amount of code you have to write when using delegates, and are therefore especially useful for GUI programming. Here's an example AppDomain.CurrentDomain.ProcessExit += delegate { Console.WriteLine("Process ending ..."); }; Partial classes is a useful feature for separating machine-generated code from hand-written code in the same class, and will therefore be heavily used by development tools such as Visual Studio. Iterators reduce the amount of code you need to write to implement IEnumerable/IEnumerator. Here's some sample code: static void Main() { RandomEnumerator re = new RandomEnumerator( 5 ); foreach( double r in re ) Console.WriteLine( r ); Console.Read(); }

class RandomEnumerator : IEnumerable<double> { public RandomEnumerator(int size) { m_size = size; }

public IEnumerator<double> GetEnumerator() {

Page 72: Interview Questions ASP[1]

Random rand = new Random(); for( int i=0; i < m_size; i++ ) yield return rand.NextDouble(); }

int m_size = 0; } The use of 'yield return' is rather strange at first sight. It effectively synthethises an implementation of IEnumerator, something we had to do manually in .NET 1.x. 12.3 What's the problem with .NET generics? .NET generics work great for container classes. But what about other uses? Well, it turns out that .NET generics have a major limitation - they require the type parameter to be constrained. For example, you cannot do this: static class Disposer<T> { public static void Dispose(T obj) { obj.Dispose(); } } The C# compiler will refuse to compile this code, as the type T has not been constrained, and therefore only supports the methods of System.Object. Dispose is not a method on System.Object, so the compilation fails. To fix this code, we need to add a where clause, to reassure the compiler that our type T does indeed have a Dispose method static class Disposer<T> where T : IDisposable { public static void Dispose(T obj) { obj.Dispose(); } } The problem is that the requirement for explicit contraints is very limiting. We can use constraints to say that T implements a particular interface, but we can't dilute that to simply say that T implements a particular method. Contrast this with C++ templates (for example), where no constraint at all is required - it is assumed (and verified at compile time) that if the code invokes the Dispose() method on a type, then the type will support the method. In fact, after writing generic code with interface constraints, we quickly see that we haven't gained much over non-generic interface-based programming. For example, we can easily rewrite the Disposer class without generics: static class Disposer { public static void Dispose( IDisposable obj ) { obj.Dispose(); } } For more on this topic, start by reading the following articles: Bruce Eckel: http://www.mindview.net/WebLog/log-0050 Ian Griffiths: http://www.interact-sw.co.uk/iangblog/2004/03/14/generics Charles Cook: http://www.cookcomputing.com/blog/archives/000425.html Brad Wilson: http://dotnetguy.techieswithcats.com/archives/004273.shtml 12.4 What's new in the .NET 2.0 class library? Here is a selection of new features in the .NET 2.0 class library (beta 1): • Generic collections in the System.Collections.Generic namespace. • The System.Nullable<T> type. (Note that C# has special syntax for this type, e.g. int? is equivalent to Nullable<int>) • The GZipStream and DeflateStream classes in the System.IO.Compression namespace. • The Semaphore class in the System.Threading namespace. • Wrappers for DPAPI in the form of the ProtectedData and ProtectedMemory classes in the System.Security.Cryptography namespace. • The IPC remoting channel in the System.Runtime.Remoting.Channels.Ipc namespace, for optimised intra-machine communication. 13. Class Library 13.1 Threads 13.1.1 How do I spawn a thread? Create an instance of a System.Threading.Thread object, passing it an instance of a ThreadStart delegate that will be executed on the new thread. For example: class MyThread { public MyThread( string initData )

Page 73: Interview Questions ASP[1]

{ m_data = initData; m_thread = new Thread( new ThreadStart(ThreadMain) ); m_thread.Start(); }

// ThreadMain() is executed on the new thread. private void ThreadMain() { Console.WriteLine( m_data ); }

public void WaitUntilFinished() { m_thread.Join(); }

private Thread m_thread; private string m_data; } In this case creating an instance of the MyThread class is sufficient to spawn the thread and execute the MyThread.ThreadMain() method: MyThread t = new MyThread( "Hello, world." ); t.WaitUntilFinished(); 13.1.2 How do I stop a thread? There are several options. First, you can use your own communication mechanism to tell the ThreadStart method to finish. Alternatively the Thread class has in-built support for instructing the thread to stop. The two principle methods are Thread.Interrupt() and Thread.Abort(). The former will cause a ThreadInterruptedException to be thrown on the thread when it next goes into a WaitJoinSleep state. In other words, Thread.Interrupt is a polite way of asking the thread to stop when it is no longer doing any useful work. In contrast, Thread.Abort() throws a ThreadAbortException regardless of what the thread is doing. Furthermore, the ThreadAbortException cannot normally be caught (though the ThreadStart's finally method will be executed). Thread.Abort() is a heavy-handed mechanism which should not normally be required. 13.1.3 How do I use the thread pool? By passing an instance of a WaitCallback delegate to the ThreadPool.QueueUserWorkItem() method class CApp { static void Main() { string s = "Hello, World"; ThreadPool.QueueUserWorkItem( new WaitCallback( DoWork ), s );

Thread.Sleep( 1000 ); // Give time for work item to be executed }

// DoWork is executed on a thread from the thread pool. static void DoWork( object state ) { Console.WriteLine( state ); } } 13.1.4 How do I know when my thread pool work item has completed? There is no way to query the thread pool for this information. You must put code into the WaitCallback method to signal that it has completed. Events are useful for this. 13.1.5 How do I prevent concurrent access to my data? Each object has a concurrency lock (critical section) associated with it. The System.Threading.Monitor.Enter/Exit methods are used to acquire and release this lock. For example, instances of the following class only allow one thread at a time to enter method f():

Page 74: Interview Questions ASP[1]

class C { public void f() { try { Monitor.Enter(this); ... } finally { Monitor.Exit(this); } } } C# has a 'lock' keyword which provides a convenient shorthand for the code above: class C { public void f() { lock(this) { ... } } } Note that calling Monitor.Enter(myObject) does NOT mean that all access to myObject is serialized. It means that the synchronisation lock associated with myObject has been acquired, and no other thread can acquire that lock until Monitor.Exit(o) is called. In other words, this class is functionally equivalent to the classes above: class C { public void f() { lock( m_object ) { ... } }

private m_object = new object(); } Actually, it could be argued that this version of the code is superior, as the lock is totally encapsulated within the class, and not accessible to the user of the object. 13.1.6 Should I use ReaderWriterLock instead of Monitor.Enter/Exit? Maybe, but be careful. ReaderWriterLock is used to allow multiple threads to read from a data source, while still granting exclusive access to a single writer thread. This makes sense for data access that is mostly read-only, but there are some caveats. First, ReaderWriterLock is relatively poor performing compared to Monitor.Enter/Exit, which offsets some of the benefits. Second, you need to be very sure that the data structures you are accessing fully support multithreaded read access. Finally, there is apparently a bug in the v1.1 ReaderWriterLock that can cause starvation for writers when there are a large number of readers. Ian Griffiths has some interesting discussion on ReaderWriterLock here and here. 13.2 Tracing 13.2.1 Is there built-in support for tracing/logging? Yes, in the System.Diagnostics namespace. There are two main classes that deal with tracing - Debug and Trace. They both work in a similar way - the difference is that tracing from the Debug class only works in builds that have the DEBUG symbol defined, whereas tracing from the Trace class only works in builds that have the TRACE symbol defined. Typically this means that you should use System.Diagnostics.Trace.WriteLine for tracing that you want to work in debug and release builds, and System.Diagnostics.Debug.WriteLine for tracing that you want

Page 75: Interview Questions ASP[1]

to work only in debug builds. 13.2.2 Can I redirect tracing to a file? Yes. The Debug and Trace classes both have a Listeners property, which is a collection of sinks that receive the tracing that you send via Debug.WriteLine and Trace.WriteLine respectively. By default the Listeners collection contains a single sink, which is an instance of the DefaultTraceListener class. This sends output to the Win32 OutputDebugString() function and also the System.Diagnostics.Debugger.Log() method. This is useful when debugging, but if you're trying to trace a problem at a customer site, redirecting the output to a file is more appropriate. Fortunately, the TextWriterTraceListener class is provided for this purpose. Here's how to use the TextWriterTraceListener class to redirect Trace output to a file: Trace.Listeners.Clear(); FileStream fs = new FileStream( @"c:\log.txt", FileMode.Create, FileAccess.Write ); Trace.Listeners.Add( new TextWriterTraceListener( fs ) );

Trace.WriteLine( @"This will be writen to c:\log.txt!" ); Trace.Flush(); Note the use of Trace.Listeners.Clear() to remove the default listener. If you don't do this, the output will go to the file and OutputDebugString(). Typically this is not what you want, because OutputDebugString() imposes a big performance hit. 13.2.3 Can I customise the trace output? Yes. You can write your own TraceListener-derived class, and direct all output through it. Here's a simple example, which derives from TextWriterTraceListener (and therefore has in-built support for writing to files, as shown above) and adds timing information and the thread ID for each trace line: class MyListener : TextWriterTraceListener { public MyListener( Stream s ) : base(s) { }

public override void WriteLine( string s ) { Writer.WriteLine( "{0:D8} [{1:D4}] {2}", Environment.TickCount - m_startTickCount, AppDomain.GetCurrentThreadId(), s ); }

protected int m_startTickCount = Environment.TickCount; } (Note that this implementation is not complete - the TraceListener.Write method is not overridden for example.) The beauty of this approach is that when an instance of MyListener is added to the Trace.Listeners collection, all calls to Trace.WriteLine() go through MyListener, including calls made by referenced assemblies that know nothing about the MyListener class. 13.2.4 Are there any third party logging components available? Log4net is a port of the established log4j Java logging component.

These are very basic question. If find any problem u can contact me at [email protected] or [email protected]

Thanx & Regards Abhishek Saxena, India

# re: Interview Questions: ASP.NET 4/20/2006 11:15 PM Narasimha Murty Hi,

I am very new to DotNet. I just require some more clarification for question no 6: Q) Where do you store the information about the user’s locale?

Page 76: Interview Questions ASP[1]

A) System.Web.UI.Page.Culture

When viewed about the user's locale topic in msdn.microsoft.com at the following location ( http://msdn2.microsoft.com/en-us/library/system.web.ui.page.culture(VS.80).aspx) , I found the following statement:

"This property supports the .NET Framework infrastructure and is not intended to be used directly from your code".

How can I retrieve the User's Locale information from my application ?

A statement like Response.Write(System.Web.UI.Page.Culture); is generating an error due to lack of culture property in Page class.

Will some one please clarify me ?

# Session Never Expired 4/23/2006 11:42 PM Satyadeep Session Never Expired --------------------------- On Code Project, I found something very useful in which the author was discussing a very beautiful idea for preventing session timeouts Idea was to call the following function in the Page Load() event. private void ReconnectSession() { int int_MilliSecondsTimeOut = (this.Session.Timeout * 60000) - 30000; string str_Script = @" <script type='text/javascript'> function Reconnect() { window.open('reconnect.aspx','reconnect','width=5,height=5,top=180 0,left=1800,scrollbars=no,showintaskbar=no'); } window.setInterval('Reconnect()',"+int_MilliSecondsTimeOut.ToString()+ @"); </script> "; this.Page.RegisterClientScriptBlock("Reconnect", str_Script); } Using the above code the page will restore the session variables 30 seconds prior to session timeout specified in the web.config file. What it does is, calling a javascript function that opens a page in a new window. This javascript function call is "scheduled" so that the it will happen when the session is going to expire in 30 seconds. window.setInterval() is used for that purpose. In my application, some details were to be retrieved from the database at the time of session renewal. Reconnect.aspx is the page in which these things are done. You can put your own code in that page. In the actual article on Code Project, the author was trying to embed the page within a java script Image() tag. This was not suitable for my application. So 30 seconds prior to session expiry, I am opening a window with the above properties and after refreshing the session variables, it will close automatically. Since that idea is pretty straight forward, we are not discussing it here. The trickiest part of the game is yet to come. If the application consists of more than 50 or 100 pages, in order to avoid pasting the code in every page, we can make use of the inheritance feature of web forms. As we know, all the web forms are inherited from the System.Web.UI.Page class. We can add a class file to the project that inherits from System.Web.UI.Page class. public class YourNewPageClass : System.Web.UI.Page

Then add the following code to the class. override protected void OnInit(EventArgs e)

Page 77: Interview Questions ASP[1]

{ base.OnInit(e);

if (Context.Session != null) { int int_MilliSecondsTimeOut = (this.Session.Timeout * 60000) - 30000; string str_Script = @" <script type='text/javascript'> function Reconnect() { window.open('reconnect.aspx','reconnect','width=5,height=5,top=1800,left=1800,scrollbars=no,showintaskbar=no'); } window.setInterval('Reconnect()',"+int_MilliSecondsTimeOut.ToString()+ @"); </script>"; this.Page.RegisterClientScriptBlock("Reconnect", str_Script); } }

Solution 2 I recently came across some code which attempted to fix this problem but that was unsuccessful because the author had forgotten the issue of client side caching. Add to your page the following code: private void Page_Load(object sender, System.EventArgs e) { this.AddKeepAlive(); } private void AddKeepAlive() { int int_MilliSecondsTimeOut = (this.Session.Timeout * 60000) - 30000; string str_Script = @" <script type='text/javascript'> //Number of Reconnects var count=0; //Maximum reconnects setting var max = 5; function Reconnect() { count++; if (count < max) { window.status = 'Link to Server Refreshed ' + count.toString()+' time(s)' ; var img = new Image(1,1); img.src = 'Reconnect.aspx'; } } window.setInterval('Reconnect()',"+ _ int_MilliSecondsTimeOut.ToString()+ @"); //Set to length required </script> "; this.Page.RegisterClientScriptBlock("Reconnect", str_Script); } This code will cause the client to request within 30 seconds of the session timeout the page Reconnect.aspx.

The Important Part Now this works the first time but if the page is cached locally then the request is not made to the server and the session times out again, so what we have to do is specify that the page Reconnect.aspx cannot be cached at the server or client. This is done by creating the Reconnect.aspx page with this content:

Page 78: Interview Questions ASP[1]

<%@ OutputCache Location="None" VaryByParam="None" %> <html> </html> The OutputCache directive prevents this from being cached and so the request is made each time. No code behind file will be needed for this page so no @Page directive is needed either.

# Attaching access files to sql Server 4/23/2006 11:56 PM Satyadeep I am using Sql Server 2000 for my project (a reporting system for my company needs). There is so many tools currently using access database, and i need to bring those datas into the browser without migrating the same into my sql server, I tried witth addlinkedserver and OPENROWSET provided by sqlserver. is there any information on accessing MDB remotely, please let me know.

My id: [email protected]

# re: Interview Questions: ASP.NET 4/25/2006 4:00 AM K.SABARI BABU This is very useful url for the beginners to study ..Dont miss to read it ok........All The Best ..May this site be useful at its best.

# re: Interview Questions: ASP.NET 4/27/2006 3:56 AM Bijay Kumar Mandal Questions and solutions given are very very helpful for the job seekers

# re: Interview Questions: ASP.NET 5/4/2006 4:43 AM Pooja Hi.... Really usefull FAQs.

-Regrads -Pooja

# re: Interview Questions: ASP.NET 5/6/2006 4:24 AM khan very helpful. thankx to the person who initiated this thread.

# re: Interview Questions: ASP.NET 5/6/2006 12:15 PM sanat pandey Hi sir

very nice questions you hv provided . i hope i'll find a nice job by referring these questions. thanks.

# re: Interview Questions: ASP.NET 5/8/2006 6:46 AM lavakumar thanks for the useful FAQ questions.

# re: Interview Questions: ASP.NET 5/10/2006 1:37 AM anil hi i am begineer in the asp.net i read wrox for beginners .now i am prepraing for the intervies so please send me the asp.net with vb.net & c #question.

my id is [email protected]

Thanks & regards,

Page 79: Interview Questions ASP[1]

anil

# re: Interview Questions: ASP.NET 5/10/2006 2:22 AM Vinoth kumar Dear sir,

I am a fresher and seeking about a job in a reputed company.can u send me the questions of related type which were asked in the interviews.I have the knowledge of .net and no practical experience on it.. My email is [email protected]

# re: Interview Questions: ASP.NET 5/10/2006 11:10 AM sudeep sharma qustions r very usefull for any one . send me more qustions n ans. related to asp.net, remoting,socket programming, c#.

# re: Interview Questions: ASP.NET 5/10/2006 11:10 AM sudeep sharma qustions r very usefull for any one . send me more qustions n ans. related to asp.net, remoting,socket programming, c#.

#  Interview Questions: ASP.NET 5/11/2006 7:49 AM Suresh I want to which is best for codebehind technic by using either vb.net or c#

# re: Interview Questions: ASP.NET 5/13/2006 12:46 AM sai Hello, Thankyou very much for the article. Really it is very helpful for every dot net programmer. Once again thankyou

Regards, sai

# re: Interview Questions: ASP.NET 5/13/2006 10:36 PM Khyati All questions are very good.some some r tough for bignners.

# re: Interview Questions: ASP.NET 5/14/2006 10:58 PM Jayender Too good ... thanks, jay

# re: Interview Questions: ASP.NET 5/15/2006 12:05 AM dileep sir, i want to know how to add yahoo,gmail & rediffmail and access them from one page.if u have any information then pls send me on [email protected]

# re: Interview Questions: ASP.NET 5/16/2006 3:45 AM sunit tyagi Hi All,

The questions published are good.

Page 80: Interview Questions ASP[1]

I would like to refer a website which contains the basic questions and answers on .net

# re: Interview Questions: ASP.NET 5/20/2006 9:40 PM saravana selvam K. Dear sir,

Really very nice collection Your question. If You have some more questions Please send me c# and VB.net and Asp.net to my mail id.

My Mail id : [email protected]

Thanks and regards

K. saravana selvam

# re: Interview Questions: ASP.NET 5/21/2006 10:34 PM Shailesh The questions and answers in this article are quite useful in an interview.

I am very thankful to this site.

From shailesh e-mail id: [email protected] `

# re: Interview Questions: ASP.NET 5/22/2006 3:15 AM Rituparno Qustions are very usefull for Interview

# re: Interview Questions: ASP.NET 5/25/2006 9:58 PM Santu Ghosh Vey Good

# re: Interview Questions: ASP.NET 5/29/2006 11:21 PM Ashokraja Its Really Good and useful for job seekers as well as recuriters. Thanks.

# re: Interview Questions: c#.NET 5/31/2006 2:59 AM Ramya Site is really gud for freshers....

# re: Interview Questions: ASP.NET 5/31/2006 6:30 AM karthik d.s what is the default execution time for asp.net page?

pls help me.

mail:[email protected]

# re: Interview Questions: ASP.NET 6/6/2006 9:45 PM Rupesh sharma (S/W Devlpr. NIIT Ltd. Gurgaon) how does the .net framework support explicit standardized version management?

# re: Interview Questions: ASP.NET 6/8/2006 4:06 AM Aniruddha Chauhan

Page 81: Interview Questions ASP[1]

Respected Sir

I am a corprate trainner in NIIT LIMITED.I have two year experience on .NET as corporate trainner and i have good knowledge on .NET plateform.but now i am going to join interviews on .NET at the level of two year experience.I want to check whattype of question can be asked in interviews.so please send me immediatly interview question on .NET at two year experience level.I shell highly obliged to you.

My Email Id : [email protected]

Thanking You

# re: Interview Questions: ASP.NET 6/9/2006 10:36 AM madhusudhan very good

# re: Interview Questions: ASP.NET 6/10/2006 7:41 AM vishal brahamne HI I m vishal, completed BE computer (2005), Pune university and seeking for job. i m interested in .NET technologies so plz send me more & more questions and ans .....and material regarding .net interview...waiting for ur help.

# re: Interview Questions: ASP.NET 6/10/2006 7:46 AM vishal brahamne my email id: [email protected]

# Interview Questions: ASP.NET 6/11/2006 10:36 PM Kiranmai Hi,

Can you please forward me the basic quesitons and the advanced questions on ASP.net.

My id is [email protected]

Thanks in advance, Kiran

# re: Interview Questions: ASP.NET 6/12/2006 6:57 AM beneez hi friends,

i am new to ASP.net. plz send me the frequently asked interview questions and plz guide to get through some good company where i can explore my knowledge in ASP/ASP.net.

my id is : [email protected]

awaiting with anticipation, thanking you, beneez ch

# re: Interview Questions: ASP.NET 6/13/2006 10:15 PM adesh jain could any one pls send me imp questions in .Net,ASP.Net,Sqlserver 2000 mail me on [email protected] I am very thankful to you.

Page 82: Interview Questions ASP[1]

Regards

Adesh Jain

# re: Interview Questions: ASP.NET 6/13/2006 11:13 PM JHANSI RANI This site is very useful to me. Please include some more interview question and also Conduct online exam in asp.net.

I done two project in ASP.Net and I am final year student. I am searching good job in ASP.Net please help me to get good job in ASP.net

# Important questions 6/14/2006 5:21 AM kaushal whats the difference between convert.ToInt() and parse.int() a) the first does not work for null value . b) the later does not work for null value.

# re: Interview Questions: ASP.NET 6/15/2006 1:24 AM Ramu Mangena I agree with Mr. Mark Haffman... but ..... still.... this info is useful for most ......... and ...... any peice of information on .Net is highly useful ... no matter .... how small the info is..... but it is ... greatly useful........

Friends.... if u hav any usful info on .Net plz forward them to my mail id...... here it [email protected] or [email protected].

My advance thanks for those who are willing to help me........ hav a great time....

# re: Interview Questions: ASP.NET 6/15/2006 1:32 AM Ramu Mangena hai frdz.... these Faqs may help u all 1. Write a simple Windows Forms MessageBox statement. 2. System.Windows.Forms.MessageBox.Show

3. ("Hello, Windows Forms"); 4. Can you write a class without specifying namespace? Which namespace does it belong to by default?? Yes, you can, then the class belongs to global namespace which has no name. For commercial products, naturally, you wouldn’t want global namespace. 5. You are designing a GUI application with a window and several widgets on it. The user then resizes the app window and sees a lot of grey space, while the widgets stay in place. What’s the problem? One should use anchoring for correct resizing. Otherwise the default property of a widget on a form is top-left, so it stays at the same location when resized. 6. How can you save the desired properties of Windows Forms application? .config files in .NET are supported through the API to allow storing and retrieving information. They are nothing more than simple XML files, sort of like what .ini files were before for Win32 apps. 7. So how do you retrieve the customized properties of a .NET application from XML .config file? Initialize an instance of AppSettingsReader class. Call the GetValue method of AppSettingsReader class, passing in the name of the property and the type expected. Assign the result to the appropriate variable. 8. Can you automate this process? In Visual Studio yes, use Dynamic Properties for automatic .config creation, storage and retrieval. 9. My progress bar freezes up and dialog window shows blank, when an intensive background process takes over. Yes, you should’ve multi-threaded your GUI, with taskbar and main form being one thread, and the background process being the other.

Page 83: Interview Questions ASP[1]

10. What’s the safest way to deploy a Windows Forms app? Web deployment: the user always downloads the latest version of the code; the program runs within security sandbox, properly written app will not require additional security privileges. 11. Why is it not a good idea to insert code into InitializeComponent method when working with Visual Studio? The designer will likely throw it away; most of the code inside InitializeComponent is auto-generated. 12. What’s the difference between WindowsDefaultLocation and WindowsDefaultBounds? WindowsDefaultLocation tells the form to start up at a location selected by OS, but with internally specified size. WindowsDefaultBounds delegates both size and starting position choices to the OS. 13. What’s the difference between Move and LocationChanged? Resize and SizeChanged? Both methods do the same, Move and Resize are the names adopted from VB to ease migration to C#. 14. How would you create a non-rectangular window, let’s say an ellipse? Create a rectangular form, set the TransparencyKey property to the same value as BackColor, which will effectively make the background of the form transparent. Then set the FormBorderStyle to FormBorderStyle.None, which will remove the contour and contents of the form. 15. How do you create a separator in the Menu Designer? A hyphen ‘-’ would do it. Also, an ampersand ‘&\’ would underline the next letter. 16. How’s anchoring different from docking? Anchoring treats the component as having the absolute size and adjusts its location relative to the parent form. Docking treats the component location as absolute and disregards the component size. So if a status bar must always be at the bottom no matter what, use docking. If a button should be on the top right, but change its position with the form being resized, use anchoring.

AND FEEEW MORE>>>> 1. Write a simple Windows Forms MessageBox statement. 2. System.Windows.Forms.MessageBox.Show

3. ("Hello, Windows Forms"); 4. Can you write a class without specifying namespace? Which namespace does it belong to by default?? Yes, you can, then the class belongs to global namespace which has no name. For commercial products, naturally, you wouldn’t want global namespace. 5. You are designing a GUI application with a window and several widgets on it. The user then resizes the app window and sees a lot of grey space, while the widgets stay in place. What’s the problem? One should use anchoring for correct resizing. Otherwise the default property of a widget on a form is top-left, so it stays at the same location when resized. 6. How can you save the desired properties of Windows Forms application? .config files in .NET are supported through the API to allow storing and retrieving information. They are nothing more than simple XML files, sort of like what .ini files were before for Win32 apps. 7. So how do you retrieve the customized properties of a .NET application from XML .config file? Initialize an instance of AppSettingsReader class. Call the GetValue method of AppSettingsReader class, passing in the name of the property and the type expected. Assign the result to the appropriate variable. 8. Can you automate this process? In Visual Studio yes, use Dynamic Properties for automatic .config creation, storage and retrieval. 9. My progress bar freezes up and dialog window shows blank, when an intensive background process takes over. Yes, you should’ve multi-threaded your GUI, with taskbar and main form being one thread, and the background process being the other. 10. What’s the safest way to deploy a Windows Forms app? Web deployment: the user always downloads the latest version of the code; the program runs within security sandbox, properly written app will not require additional security privileges. 11. Why is it not a good idea to insert code into InitializeComponent method when working with Visual Studio? The designer will likely throw it away; most of the code inside InitializeComponent is auto-generated. 12. What’s the difference between WindowsDefaultLocation and WindowsDefaultBounds? WindowsDefaultLocation tells the form to start up at a location selected by OS, but with internally specified size. WindowsDefaultBounds delegates both size and starting position choices to the OS. 13. What’s the difference between Move and LocationChanged? Resize and SizeChanged? Both

Page 84: Interview Questions ASP[1]

methods do the same, Move and Resize are the names adopted from VB to ease migration to C#. 14. How would you create a non-rectangular window, let’s say an ellipse? Create a rectangular form, set the TransparencyKey property to the same value as BackColor, which will effectively make the background of the form transparent. Then set the FormBorderStyle to FormBorderStyle.None, which will remove the contour and contents of the form. 15. How do you create a separator in the Menu Designer? A hyphen ‘-’ would do it. Also, an ampersand ‘&\’ would underline the next letter. 16. How’s anchoring different from docking? Anchoring treats the component as having the absolute size and adjusts its location relative to the parent form. Docking treats the component location as absolute and disregards the component size. So if a status bar must always be at the bottom no matter what, use docking. If a button should be on the top right, but change its position with the form being resized, use anchoring.

Alll The Best Frndz

# re: Interview Questions: ASP.NET 6/15/2006 1:39 AM Ramu Mangena Also frnd... try to find answers.... to some unanswered questions in the above questions..... it is worth... if u can work out those questins.

If u hav any questions.... plz forward them to my id..... [email protected] or [email protected]

# re: Interview Questions: ASP.NET 6/15/2006 6:26 AM Anju V Sir,

I am working in ASP.Net using C#.Now I am looking for a job in an established concern.

Would you pls send me some Interview questions in ASP.Net and C#?

With Regards Anju

# re: Interview Questions: ASP.NET 6/16/2006 8:35 AM Frank I am looking for a C#, SQL, ASP.NET job, can you please send me some interview questions related to C#, SQL, ASP.NET? Email : [email protected] Kind Regards Frank

# re: Interview Questions: ASP.NET 6/19/2006 4:18 AM samarjit I am looking for a C#, SQL, ASP.NET interview qns. can you please send me some interview questions related to C#, SQL, ASP.NET?send it to my mail id my mail id :- [email protected]

# re: Interview Questions: ASP.NET 6/20/2006 12:05 AM deepthi send me imp questions in .Net,ASP.Net,Sqlserver 2000 mail me on

# re: Interview Questions: ASP.NET 6/20/2006 3:44 AM santosh Lonkar Thanks Admin This site is very useful to me. Please include some more interview question and answer and also Conduct online exam in asp.net.

Page 85: Interview Questions ASP[1]

thanks santosh lonkar

# re: Interview Questions: ASP.NET 6/21/2006 1:08 AM Rituparno 1.Different type of Garbage Collection? 2.How use Payment Gateway? 3.Satellite

# re: Interview Questions: ASP.NET 6/22/2006 3:23 AM Mohd. Kaif Hi Friends, Here i found good collection of Dot Net and ASP.Net questions, plz mail me more good written and interview questions N answers of Dot Net to my mail id--> [email protected] soon.

bye

# re: Interview Questions: ASP.NET 6/22/2006 4:30 AM Swarup From constructor to destructor (taking into consideration Dispose() and the concept of non-deterministic finalization), what the are events fired as part of the ASP.NET System.Web.UI.Page lifecycle. Why are they important?

What interesting things can you do at each?

What are ASHX files? What are HttpHandlers? Where can they be configured?

What is needed to configure a new extension for use in ASP.NET? For example, what if I wanted my system to serve ASPX files with a *.jsp extension?

What events fire when binding data to a data grid? What are they good for?

Explain how PostBacks work, on both the client-side and server-side. How do I chain my own JavaScript into the client side without losing PostBack functionality?

How does ViewState work and why is it either useful or evil?

What is the OO relationship between an ASPX page and its CS/VB code behind file in ASP.NET 1.1? in 2.0?

What happens from the point an HTTP request is received on a TCP/IP port up until the Page fires the On_Load event?

How does IIS communicate at runtime with ASP.NET? Where is ASP.NET at runtime in IIS5? IIS6?

What is an assembly binding redirect? Where are the places an administrator or developer can affect how assembly binding policy is applied?

Compare and contrast LoadLibrary(), CoCreateInstance(), CreateObject() and Assembly.Load().

# re: Interview Questions: ASP.NET 6/22/2006 10:39 PM Nazar Masi Hi

Thanks Admin This site is very useful to me. Please include some more interview question and answer and also Conduct online exam in asp.net. and vb.net and sql server.

Page 86: Interview Questions ASP[1]

Thanks Nazar

# Interview Questions: ASP.NET 6/23/2006 12:29 AM Yogesh Nagpal Hi to everyone, I m a new guy on the\is site.I m working in mango it solutions pvt ltd,new delhi since jan 2005.I want .net interview questions as now i want to change the company.Plz mail those interview questions at [email protected]. Thanks, With regards. Yogesh Nagpal.

# re: Interview Questions: ASP.NET 6/25/2006 10:36 PM Rituparno The DataReader loads one record from the data store at a time. Each time the DataReader's Read() method is called, the DataReader discards the current record, goes back to the database, and fetches the next record in the resultset. The Read() method returns True if a row was loaded from the database, and False if there are no more rows.

DataSets are a more complex and feature-rich object than DataReaders. Whereas DataReaders simply scuttle data back from a data store, DataSets can be thought of as in-memory databases. Just like a database is comprised of a set of tables, a DataSet is made up of a collection of DataTable objects. Whereas a database can have relationships among its tables, along with various data integrity constraints on the fields of the tables, so too can a DataSet have relationships among its DataTables and constraints on its DataTables' fields

# re: Interview Questions: ASP.NET 6/25/2006 10:38 PM Rituparno Difference between Vb.NET class & compnent? IBM

# re: Interview Questions: ASP.NET 6/26/2006 3:39 AM Rituparno NET Portable Executable File: A Windows executable, EXE or DLL, must conform to a file format called the PE file format, which is a derivative of the Microsoft Common Object File Format (COFF). Both of these formats are fully specified and publicly available. The Windows OS knows how to load and execute DLLs and EXEs because it understands the format of a PE file. Given this, any compiler that wants to generate Windows executables must obey the PE/COFF specification.

Standard Windows PE files are divided into two major sections. The first section includes the PE/COFF headers that reference the contents within the PE file. In addition to the header section, the PE file holds a number of native image sections, including the .data, .rdata, .rsrc , and .Text sections. These are the standard sections of a typical Windows executable, but Microsoft's C/C++ compiler allows you to add your own custom sections into the PE file using a compiler pragma statement. For example, you can create your own data section to hold encrypted data that only you can read. Taking advantage of this ability, Microsoft has added a few new sections to the normal PE file specifically to support the CLR's functionality. The CLR understands and manages the new sections. For example, the CLR will read these sections and determine how to load classes and execute your code at runtime.

The sections that Microsoft has added to the normal PE format are the CLR header and the CLR data sections. While the CLR header stores information to indicate that the PE file is a .NET executable, the CLR data section contains metadata and IL code, both of which determine how the program will be executed.

Metadata

Page 87: Interview Questions ASP[1]

Metadata is machine -readable information about a resource, or "data about data." Such information might include details on content, format, size, or other characteristics of a data source. In .NET, metadata includes type definitions, version information, external assembly references, and other standardized information.

In order for two components, systems, or objects to interoperate with one another, at least one must know something about the other. In COM, this "something" is an interface specification, which is implemented by a component provider and used by its consumers.

In .NET, metadata is a common mechanism or dialect that the .NET runtime, compilers, and tools can all use. Microsoft .NET uses metadata to describe all types that are used and exposed by a particular .NET assembly. Metadata includes descriptions of an assembly and modules, classes, interfaces, methods, properties, fields, events, global methods, and so forth.

.NET assemblies are deployable units and manifests are the metadata that describes the assemblies.

IL Code:

An assembly contains the IL code that the CLR executes at runtime. The IL code typically uses types defined within the same assembly, but it also may use or refer to types in other assemblies. There is one caveat: each assembly can have at most one entry point, such as DllMain( ), WinMain( ), or Main( ). You must follow this rule because when the CLR loads an assembly, it searches for one of these entry points to start assembly execution.

There are four types of assemblies in .NET:

Static assemblies: These are the .NET PE files that you create at compile time. You can create static assemblies using your favorite compiler: csc, cl, or vbc. Dynamic assemblies: These are PE-formatted, in-memory assemblies that you dynamically create at runtime using the classes in the System.Reflection.Emit namespace. Private assemblies: These are static assemblies used by a specific application. Public or shared assemblies: These are static assemblies that must have a unique shared name and can be used by any application.

Side-by-Side Execution:

The CLR allows any versions of the same-shared DLL (shared assembly) to execute at the same time, on the same system, and even in the same process. This concept is known as side-by-side execution.

Manifests: Assembly Metadata An assembly manifest is metadata that describes everything about the assembly, including its identity, a list of files belonging to the assembly, references to external assemblies, exported types, exported resources, and permission requests. In short, it describes all the details that are required for component plug-and-play. Since an assembly contains all these details, there's no need for storing this type of information in the registry, as in the COM world.

An assembly can be a single-module assembly or a multi-module assembly. In a single-module assembly, everything in a build is clumped into one EXE or DLL, an example of which is the hello.exe application that we developed earlier. This is easy to create because a compiler takes care of creating the single -module assembly for you.

A multi-module assembly is one that contains many modules and resource files. To create it you have to use the Assembly Linker (al.exe) that is provided by the .NET SDK. This tool takes one or more IL or resource files and spits out a file with an assembly manifest.

Any .NET language may be converted into IL, so .NET supports multiple languages and perhaps multiple platforms in the future (as long as the target platforms have a CLR).

Page 88: Interview Questions ASP[1]

The Common Type System (CTS): Because .NET treats all languages as equal, a class written in C# should be equivalent to a class written in VB.NET, and an interface defined in Managed C++ should be exactly the same as one that is specified in managed COBOL. Languages must agree on the meanings of these concepts before they can integrate with one another. In order to make language integration a reality, Microsoft has specified a common type system to which every .NET language must abide.

Interfaces: Interfaces support exactly the same concept as a C++ abstract base class (ABC) with only pure virtual functions. An ABC is a class that declares one or more pure virtual functions and thus cannot be instantiated. If you know COM or Java, interfaces in .NET are conceptually equivalent to a COM or Java interface. You specify them, but you don't implement them. A class that derives from your interface must implement your interface. An interface may contain methods, properties, indexers, and events. In .NET, a class can derive from multiple interfaces.

The Common Language Specification (CLS): Microsoft has published the Common Language Specification (CLS). The CLS specifies a series of basic rules that are required for language integration. Since Microsoft provides the CLS that spells out the minimum requirements for being a .NET language, compiler vendors can build their compilers to the specification and provide languages that target .NET. Besides compiler writers, application developers should read the CLS and use its rules to guarantee language interoperation.

CLR Execution: .Net PE Files(Metadata And IL) >> Class Loader >> Verifier >> JIT >> Managed Native Code

Once the class loader has found and loaded the target class, it caches the type information for the class so that it doesn't have to load the class again for the duration of this process.

The verifier is responsible for verifying that: 1. The metadata is well formed, meaning the metadata must be valid. 2. The IL code is type safe, meaning type signatures are used correctly.

The JIT compilers convert IL to native code so that it can execute on the target operating system. For optimization reasons, JIT compilation occurs only the first time a method is invoked. Recall that the class loader adds a stub to each method during class loading. At the first method invocation, the VEE reads the information in this stub, which tells it that the code for the method has not been JIT compiled. At this indication, the JIT compiler compiles the method and injects the address of the managed native method into this stub. During subsequent invocations to the same method, no JIT compilation is needed because each time the VEE goes to read information in the stub, it sees the address of the native method. Because the JIT compiler only performs its magic the first time a method is invoked, the methods you don't need at runtime will never be JIT compiled. The compiled, native code lies in memory until the process shuts down and until the garbage collector clears off all references and memory associated with the process. This means that the next time you execute the process or component, the JIT compiler will again perform its magic.

If you want to avoid the cost of JIT compilation at runtime, you can use a special tool called ngen, which compiles your IL during installation and setup time. Using ngen, you can JIT-compile the code once and cache it on the machine so that you can avoid JIT compilation at runtime (this process is referred to as Pre-JITting). In the event that the PE file has been updated, you must PreJIT the PE file again. Otherwise, the CLR can detect the update and dynamically command the appropriate JIT compiler to compile the assembly.

All .NET assemblies are essentially binary components. You can treat each .NET assembly as a component that you can plug into another component or application, without the need for source code, since all the metadata for the component is stored inside the .NET assembly. While you have to perform a ton of plumbing to build a component in COM, you need to perform zero extra work to get a component in .NET, as all .NET assemblies are components by

Page 89: Interview Questions ASP[1]

nature. Remember, we're using the term "component" as a binary, deployable unit, not as a COM class.

Shared Components: Unlike application-private assemblies, shared assemblies - ones that can be used by any client application - must be published or registered in the system Global Assembly Cache (GAC). When you register your assemblies against the GAC, they act as system components, such as a system DLL that every process in the system can use. A prerequisite for GAC registration is that the component must possess originator and version information. In addition to other metadata, these two items allow multiple versions of the same component to be registered and executed on the same machine. Again, unlike COM, we don't have to store any information in the system registry for clients to use these shared assemblies.

Object Pooling: A pool is technical term that refers to a group of resources, such as connections, threads, and objects. Putting a few objects into a pool allows hundreds of clients to share these few objects (you can make the same assertion for threads, connections, and other objects). Pooling is therefore a technique that minimizes the use of system resources, improves performance, and helps system scalability.

ADO.NET Architecture: Microsoft ADO.NET's object model encompasses two distinct groups of classes: content components and managed-provider components. The content components include the DataSet class and other supporting classes such as DataTable, DataRow, DataColumn, and DataRelation. These classes contain the actual content of a data exchange. The managed-provider components assist in data retrievals and updates. Microsoft provides two managed providers in its current release of ADO.NET: OLE DB and SQL. The OLE DB managed provider comes with OleDbConnection, OleDbCommand, OleDbParameter, and OleDbDataReader. The SQL Server managed provider comes with a similar set of objects, whose names start with SqlClient instead of OleDb. Developers can use the connection, command, and data reader objects to directly manipulate data.

We might think that setting up and tearing down connections is not a good idea since the cost of establishing a connection is usually high. This is a concern only in the absence of connection pooling. ADO.NET automatically keeps connections to a data source in a pool, so when an application thinks it is tearing down a connection, it's actually returning it to the resource pool. This allows connections to be reused, avoiding the cost of reconstructing new connections from scratch.

Because ADO.NET framework classes are managed code, developers can inherit and extend these classes to their custom needs.

A data reader is a new object providing fast, forward-only, and read-only access to data. This is similar to an ADO Recordset with server-side, forward - only, and read-only cursor types. Since this is a server –side cursor, the connection to the server is open throughout the reading of data.

Even though each DataAdapter maps only one DataTable in the DataSet, you can have multiple adapters to fill the DataSet object with multiple DataTables. Managed Code: The .Net framework provides several core run-time services to the programs that run within it. For example exception handling and security. For these services to work the code must provide a minimum level of information to runtime. Such code is called Managed Code.

Managed Data: This is data for which memory management is done by .Net runtime’s garbage collector this includes tasks for allocation de-allocation. We can call garbage collector to collect un-referenced data by executing System.GC.Collect().

What is an Assembly? Assemblies are fundamental building blocks of .Net Framework. They contain the type and resources that are useful to make an application. Assemblies enables code reuse, version

Page 90: Interview Questions ASP[1]

control, security and deployment. An assembly consist of: Manifest , Type Metadata, MSIL and resource file.

Assemblies are Private and Shared. Private are used for a single application and installed in application’s install directory or its sub-directory. Shared assembly is one that can be referenced by multiple application and resides in GAC(local cache for assemblies managed by .Net Framework). gacutil /i myDll.dll can see and %windir%\assembly

Metadata and Manifest: Manifest describes the assembly itself. Assembly name, version, culture, strong name, list of files, type reference and reference assembly. While Metadata describes contents within the assembly like classes, namespaces, interfaces, scope, properties, methods and their parameters etc.

Application Domain: It is a virtual process that serves to isolate an application. All object created within the same application scope are created within same application domain.

Garbage Collection: It is Automatic Memory Manager for .Net Framework. It manages the memory allocated to .Net Framework. When a variable is defined it gets a space in memory (stack) and when an object is created memory for the object is allocated in heap. When an object is assigned to a variable it increments the reference counts for the object and when program control comes out of the function the scope of variable gets ended Or NULL is assigned to variable it decrements the reference count of object by 1. When reference count of one object becomes zero GC acts call destructor of object and then releases the memory acquired by the object.

Can .Net Components can be used from a COM? Yes, can be used. But There are few restrictions such as COM needs an object to be created. So static methods, parameterized constructor can not be used from COM. These are used by COM using a COM Callable Wrapper (CCW). TlbImp.exe and TlbExp.exe

How does .NET Remoting work? It involves sending messages along channels. Two of the standard channels are HTTP and TCP. TCP is for LANs only and HTTP can be used on LANs or WANs (internet). TCP uses binary serialization and HTTP uses SOAP (.Net Runtime Serialization SOAP Formatter).

There are 3 styles of remote access: SingleCall: Each incoming request is handled by new instance. Singleton: All requests are served by single server object. Client-Activated Object: This is old state-full DCOM model. Where client receives reference to the remote object and keep until it finished with it.

DLL-HELL: Situations where we have to put same name Dlls in single directory where are Dlls are of different versions.

Versioning: MajorVersion.MinorVersion.BuildNumber.Revision

Boxing and Un-Boxing: Implicit(automatic) conversion of value type to reference type is known as Boxing And Explicit (manual) conversion of Reference type to value type is said to be Un-boxing. (conversion of Integer variable to object type)

.Net Object Oriented Programming Concepts

Page 91: Interview Questions ASP[1]

Class: Class is concrete representation of an entity. It represents a group of objects, which posses similar attributes and behavior. Provides Abstraction and Encapsulations. A category name that can be given to group of objects of similar kind.

Object: Object represents/resembles a Physical/real entity. An object is simply something you can give a name.

Object Oriented Programming: It is a Style of programming that represents a program as a system of objects and enables code-reuse.

Encapsulation: Binding of attributes and behaviors. Hiding the implementation and exposing the functionality.

Abstraction: Hiding the complexity. Defining communication interface for the functionality and hiding rest of the things. In .Net destructor can not be abstract. Can define Either Finalize / Destructor. For Destructor access specifiers can not be assigned. It is Private.

Overloading: Adding a new method with the same name in same/derived class but with different number/types of parameters. Implements Polymorphism.

Overriding: When we need to provide different implementation than the provide by base class, We define the same method with same signatures in the derived class. Method must be Protected/Protected-Friend/Public for this purpose. (Base class routine can be called by Mybase.Method, base.Method).

Shadowing: When the method is defined as Final/sealed in base class and not overridable and we need to provide different implementation for the same. We define method with Shadows/new.

Inheritance: Gives you ability to provide is-a relationship. Acquires attributes and behaviors from another. When a class acquires attributes and behaviors from another class. (must not be Final or sealed class in .Net)

Abstract Class: Instance can not be created. Optionally can have one or more abstract methods but not necessary. Can provide body to Classes.

Interface: What a Class must do, But not how-to. Bridge for the communication when the caller does not know to whom he is calling. Describes externally visible behavior of element. Only Public members which defines the means of the communication with the outer world. Can-be-Used-As Relationship. Can not contain data but can declare property. There can be no implementation. Interface can be derived from another interface.

Polymorphism: Mean by more than one form. Ability to provide different implementation based on different no./type of parameters. A method behaves differently based on the different input parameters. Does not depend on the Return-Type.

Pure-Polymorphism:

Page 92: Interview Questions ASP[1]

Make an method abstract/virtual in base class. Override it in Derived Class. Declare a variable of type base class and assign an object of derived class to it. Now call the virtual/abstract method. The actual method to be called is decided at runtime.

Early-Binding: Calling an non-virtual method decides the method to call at compile time is known as Early-Binding.

Late-Binding: Same as pure-polymorphism.

Identifiers/Access Specifies and scope: VB.NET: Private, Protected, Friend, Protected Friend, Public. C#: private, protected, internal, protected internal, public.

What is a Delegate? A strongly typed function pointer. A delegate object encapsulates a reference to a method. When actual function needs to be called will be decided at run-time.

Static Variable and Its Life-Time: VB.NET: Public Shared VAR As Type. C#: public static Type VAR; Life time is till the class is in memory.

Constructor: Special Method Always called whenever an instance of the class is created.

Destructor/Finalize: Called by GC just before object is being reclaimed by GC.

ASP.Net Different Types of Caching? Output Caching: stores the responses from an asp.net page. Fragment Caching: Only caches/stores the portion of page (User Control) Data Caching: is Programmatic way to Cache objects for performance.

Authentication and Authorization: Authentication is identifying/validating the user against the credentials (username and password) and Authorization performs after authentication. Authorization allowing access of specific resource to user.

Different Types of Directives: Page, Register, Control, OutputCache, Import, Implements, Assembly, Reference

Difference between Server-Side and Client-Side: Server-Side code is executed on web-server and does not transmitted to client, while client-side code executed on client(browser) and is rendered to client along with the content.

Difference Server.Transfer and Response.Redirect: Both ends the processing for the current request immediately. Server.Transfer start executing the another resource specified as parameter without acknowledgement to client(browser) while Response.Redirect intimate client that your requested resource is available at this location and then client request for that resource.

Different Types of Validators and Validation Controls: RequiredFieldValidator, RangeValidator, RegularExpressionValidator, CompareValidator, CustomValidator, ValidationSummary

How to Manage State in ASP.Net? Client based: ViewState, QueryString and Cookies Server based: Session, Application.

Page 93: Interview Questions ASP[1]

Difference between User Control and Custom Control: CUSTOM Controls are compiled code (Dlls), easier to use, difficult to create, and can be placed in toolbox. Drag and Drop controls. Attributes can be set visually at design time. Can be used by Multiple Applications (If Shared Dlls), Even if Private can copy to bin directory of webApp add reference and use. Normally designed to provide common functionality independent of consuming Application.

3 Types of Session State Modes? InProc(cookieless, timeout), StateServer (Server, Port stateConnectionString="tcpip=server:port"), SQLServer (sqlconnectionstring) and Off.

What is ViewState and How it is managed, Its Advantages/Benefits? ViewState is a special object that ASP.NET uses to maintain the state of page and all webcontrols/ServerControls within it. It is in this object preserves the states of various FORM elements during post-backs. It is rendered to client(browser) as a Hidden variable __VIEWSTATE under <form>tag. We can also add custom values to it.

What is web.config and machine.config: machine.config is default configuration for all applications running under this version, located in %WinDir%\Microsfot.Net\Framework\Version. Settings can be overridden by Web.Config for an specific application Web.Config resides in application’s root/virtual root and exists in sub-sequent folders.

Role of Global.asax: Optional file contains the code to handle Application level events raised by ASP.Net or By HttpModule. This file resides in application root directory. Application_Start, _End, _AuthenticateRequest, _Error, Session_Start, _End, BeginRequest, EndRequest. This file is parsed and compiled into dynamically generated class derived from HttpApplication.

Page Life Cycle: Init, LoadViewState, LoadPostBackData, Load, RaisePostBackDataChangedEvent, RaisePostBackEvents, Pre-Render, SaveViewState, Render, Unload, (IpostBackDataChangedEventHandler and IpostBackEventHandler) Error, CommitTransaction, AbortTransaction, Abort inetinfo.exe, aspnet_isapi.dll aspnet_wp.exe, HttpModules (OutputCache, Session, Authentication, Authorization, Custom Modules Specified) and Then HttpHandlers PageHandlerFactory for *.aspx

Can the action attribute of a server-side <form>tag be set to a value and if not how can you possibly pass data from a form to a subsequent Page? No assigning value will not work because will be overwritten at the time of rendering. We can assign value to it by register a startup script which will set the action value of form on client-side. Rest are Server.Transfer and Response.Redirect.

ASP.Net List Controls and differentiate between them? RadioButtonList, CheckBoxList, DropDownList, Repeater, DataGrid, DataList

Type Of Code in Code-Behind class: Server-Side Code.

What might be best suited to place in the Application_Start and Session_Start: Application level variables and settings initialization in App_Start User specific variables and settings in Session_Start

Difference between inline and code-behind. Which is best? Inline is mixed with html and code-behind is separated. Use code-behind, Because Inline pages are loaded, parsed, compiled and processed at each first request to page and remains in compiled code remains in cache until it expires, If expires it again load, parse and compile While code-behind allows to be pre-compiled and provide better performance.

Page 94: Interview Questions ASP[1]

Which Template must provide to display data in Repeater? ItemTemplate.

How to Provide Alternating Color Scheme in Repeater? AlternatingItemTemplate

What base class all Web Forms inherit from? System.Web.UI.Page

What method do you use to explicitly kill a user’s Session? HttpContext.Current.Session.Abandon()

How do you turn off cookies in one page of your asp.net application? We will not use it. But can not turn off cookies from server. To allow or not is a client side functionality.

Which two properties are on every validation control? ControlToValidate and Text, ErrorMessage

How do you create a permanent cookie? Set expires property to Date.MaxValue (HttpCookie.Expires = Date.MaxValue)

What is the standard you use to wrap up a call to a Web Service? SOAP

Which method do you use to redirect to user to another page without performing a round trip to Client? Server.Transfer(“AnotherPage.aspx”)

What is transport protocol you use to call a Web-Service SOAP? HTTP-POST

A Web Service can only be written in .NET? FALSE

Where on internet would you look for Web services? www.uddi.org

How many classes can a single .NET DLL contain? Unlimited

How many namespaces are in .NET version 1.1? 124

What is a bubbled event? When you have a complex control like DataGrid. Writing an event processing routine for each object (cell, button, row etc.). DataGrid handles the events of its constituents and will raise its own defined custom events.

Difference between ASP Session State and ASP.Net Session State? ASP: relies on cookies, Serialize all requests from a client, Does not survive process shutdown, Can not maintained across machines in a Web farm/garden.

Layouts of ASP.NET Pages: GridLayout and FlowLayout

Web User Control: Combines existing Server and HTML controls by using VS.Net. to create functional units that encapsulate some aspects of UI. Resides in Content Files, which must be included in project in which the controls are used.

Page 95: Interview Questions ASP[1]

Composite Custom Control: combination of existing HTML and Server Controls.

Rendered custom control: create entirely new control by rendering HTML directly rather than using composition.

Where do you store the information about user’s Locale? Page.Culture

should Validation occur on Client/Server Side for Date Input? Both. Client-side reduces extra round-trip. Server-Side ensures prevention against hacking and failure against automated requests.

HTTP GET and HTTP POST: As their names imply, both HTTP GET and HTTP POST use HTTP as their underlying protocol. Both of these methods encode request parameters as name/value pairs in the HTTP request. The GET method creates a query string and appends it to the script's URL on the server that handles the request. For the POST method, the name/value pairs are passed in the body of the HTTP request message.

Web Services Discovery: Even though advertising of a web service is important, it is optional. Web services can be private as well as public. Depending on the business model, some business-to -business (B2B) services would not normally be advertised publicly. Instead, the web service owners would provide specific instructions on accessing and using their service only to the business partner. To advertise web services publicly, authors post discovery files on the Internet. Potential web services clients can browse to these files for information about how to use the web services—the WSDL (Web Service Description Language). Think of it as the yellow pages for the web service. All it does is point you to where the actual web services reside and to the description of those web services. The process of looking up a service and checking out the service description is called Web Service discovery. There are two ways of advertising the service: static and dynamic. In both of these, XML conveys the locations of web services.

Static discovery is easier to understand because it is explicit in nature. If you want to advertise your web service, you must explicitly create the .disco discovery file and point it to the WSDL.

As opposed to explicitly specifying the URL for all web services your site supports, you can enable dynamic discovery, which enables all web services underneath a specific URL on your web site to be listed automatically. For your web site, you might want to group related web services under many different directories and then provide a single dynamic discovery file in each of the directory.

Web Services and Security: We incorporate security into web service in two ways: system security and application security. System -level security allows for restricting access to the web services from unauthorized clients. It is done in a declarative fashion, whereas application - level security is more flexible. With system-level security, you will most likely have the list of authorized clients' IP addresses that you will let access your web service through the use of some configuration - management tools. With application-level security, you will incorporate the authentication into your web service, thus providing a more flexible configuration.

In system – level security client send a user name and password to web server. This pair can be in plain text format or in some encrypted format. Once server authenticates the user it can access the services available to server.

In application – level security mode your web services involves taking security into your own hands. You can program your web services so that all of their methods require an access token, which can be obtained from the web service after sending in the client's username and password. The client credentials can be sent to the server through SSL (Secure Sockets Layer), which eliminates the risk of sending clear-text passwords across the wire. Through this SSL channel, the server returns an access token to the caller, who can use it to invoke all other

Page 96: Interview Questions ASP[1]

web service methods.

Web Form Events The first event that happens in the life of a Web Form is the Init event. This is raised so that we can have initialization code for the page. The controls on the page are not yet created at this point. This event is raised once for each user of the page.

The Load event follows the Init event. Subsequently, it is raised each time the page is requested. When this event is raised, all child controls of the Web Form are loaded and accessible. You should be able to retrieve data and populate the controls so that they can render themselves on the page when sent back to the client.

The PreRender event happens just before the page is rendered and sent back to the client. We don't often handle this event; however, it depends on the situation.

The last event in the life of a Web Form is the Unload event. This happens when the page is unloaded from memory. Final cleanup should be done here.

Lifecycle Of A Web Form: In ASP .NET, the web page starts its life when a client requests a particular page. IIS parses and runs the scripts on the ASP page to render HTML content. As soon as the page rendering is complete, the page's life ceases; only the view states of the page persist between requests to the page. These view states allow the controls on the server to appear as if they are still present to handle server events.

Using Web Services: In Visual Studio.NET IDE, you can choose Project >> Add Web Reference and then type in the URL where the web service resides. For example, we'll point to the web service we created on local server, than is PubsWS (suppose). The URL to this web service on our server is http://localhost/PubsWS/PubsWS.asmx. After adding the web reference, you can access the proxy object to the web service you are calling via the type servername.proxyObjectName. For your case, it is localhost.PubsWS.

The following code excerpt demonstrates how to use the web service through the proxy. We create an instance of the proxy object and then ask it to relay the message to the real web service to get the list of authors. The result will be streamed back in XML format, which is reconstructed into a DataSet object.

[C#] localhost.PubsWS ws = new localhost.PubsWS( ); DataSet ds = ws.GetAuthors( );

ASP.NET Session-State Management: ASP.NET improves upon ASP session-state management by moving to an out-of-process model. By having all web servers in the farm pointing to a common server that hosts the out-of-process state manager, the web client can be redirected around the farm without losing the session states. By using an out-of-process model, we no longer have the problem of losing session states when the IIS process is cycled. This means that if the web server application crashed for whatever reason and restarted within the session time-out duration, the web clients could still have all their session states intact. Of course, if the out-of-process state manager crashed, that is a whole different issue. This leads to the next improvement of ASP.NET—the ability to persist session state to a database.

There are two levels of configuration: machine and application. Machine-level configuration associates with the machine.config file stored in WinNT\Microsoft.NET\ Framework\\CONFIG\machine.config, while the application-level configuration uses the web.config file in the application root directory. The application-level configuration overrides the machine -level configuration.

Acronyms

Page 97: Interview Questions ASP[1]

CCW COM Callable Wrapper

CLI Common Language Infrastructure. This is a subset of the CLR and base class libraries that Microsoft has submitted to ECMA so that a third-party vendor can build a .NET runtime on another platform.

CLR Common Language Runtime

CLS Common Language Specification

COFF Common Object File Format

COM Component Object Model

CTS Common Type System

DISCO Discovery of Web Services. A Web Service has one or more. DISCO files that contain information on how to access its WSDL.

DNA Distributed interNet Applications Architecture.

DOM Document Object Model

GDI Graphical Device Interface

GAC Global Assembly Cache

GUID Globally Unique Identifier

HTTP Hyper Text Transfer Protocol

IDL Interface Definition Language

IL Intermediate Language

MSIL Microsoft Intermediate Language

MS-DTC Microsoft Distributed Transaction Coordinator

N-Tier

Page 98: Interview Questions ASP[1]

Multi-Tier

OLTP Online Transaction Processing

OLAP Online Analytical Processing

PE Portable Executable

RAD Rapid Application Development

RCW Runtime Callable Wrapper

SMTP Simple Mail Transfer Protocol

SOAP Simple Object Access Protocol

TCP Transport Control Protocol

TLB Type Library

UDF Uniform Data Format

UI User Interface

URL Uniform Resource Locator

UDDI Universal Description, Discovery and Integration

WAP Wireless Access Protocol

WSDL Web Services Definition Language

WML Wireless Markup Language

XML Extensible Markup Language

# re: Interview Questions: ASP.NET 6/26/2006 3:53 AM Rituparno Ganguly NET Portable Executable File: A Windows executable, EXE or DLL, must conform to a file format called the PE file format, which is a derivative of the Microsoft Common Object File Format (COFF). Both of these

Page 99: Interview Questions ASP[1]

formats are fully specified and publicly available. The Windows OS knows how to load and execute DLLs and EXEs because it understands the format of a PE file. Given this, any compiler that wants to generate Windows executables must obey the PE/COFF specification.

Standard Windows PE files are divided into two major sections. The first section includes the PE/COFF headers that reference the contents within the PE file. In addition to the header section, the PE file holds a number of native image sections, including the .data, .rdata, .rsrc , and .Text sections. These are the standard sections of a typical Windows executable, but Microsoft's C/C++ compiler allows you to add your own custom sections into the PE file using a compiler pragma statement. For example, you can create your own data section to hold encrypted data that only you can read. Taking advantage of this ability, Microsoft has added a few new sections to the normal PE file specifically to support the CLR's functionality. The CLR understands and manages the new sections. For example, the CLR will read these sections and determine how to load classes and execute your code at runtime.

The sections that Microsoft has added to the normal PE format are the CLR header and the CLR data sections. While the CLR header stores information to indicate that the PE file is a .NET executable, the CLR data section contains metadata and IL code, both of which determine how the program will be executed.

Metadata

Metadata is machine -readable information about a resource, or "data about data." Such information might include details on content, format, size, or other characteristics of a data source. In .NET, metadata includes type definitions, version information, external assembly references, and other standardized information.

In order for two components, systems, or objects to interoperate with one another, at least one must know something about the other. In COM, this "something" is an interface specification, which is implemented by a component provider and used by its consumers.

In .NET, metadata is a common mechanism or dialect that the .NET runtime, compilers, and tools can all use. Microsoft .NET uses metadata to describe all types that are used and exposed by a particular .NET assembly. Metadata includes descriptions of an assembly and modules, classes, interfaces, methods, properties, fields, events, global methods, and so forth.

.NET assemblies are deployable units and manifests are the metadata that describes the assemblies.

IL Code:

An assembly contains the IL code that the CLR executes at runtime. The IL code typically uses types defined within the same assembly, but it also may use or refer to types in other assemblies. There is one caveat: each assembly can have at most one entry point, such as DllMain( ), WinMain( ), or Main( ). You must follow this rule because when the CLR loads an assembly, it searches for one of these entry points to start assembly execution.

There are four types of assemblies in .NET:

Static assemblies: These are the .NET PE files that you create at compile time. You can create static assemblies using your favorite compiler: csc, cl, or vbc. Dynamic assemblies: These are PE-formatted, in-memory assemblies that you dynamically create at runtime using the classes in the System.Reflection.Emit namespace. Private assemblies: These are static assemblies used by a specific application. Public or shared assemblies: These are static assemblies that must have a unique shared name and can be used by any application.

Side-by-Side Execution:

The CLR allows any versions of the same-shared DLL (shared assembly) to execute at the same time, on the same system, and even in the same process. This concept is known as side-

Page 100: Interview Questions ASP[1]

by-side execution.

Manifests: Assembly Metadata An assembly manifest is metadata that describes everything about the assembly, including its identity, a list of files belonging to the assembly, references to external assemblies, exported types, exported resources, and permission requests. In short, it describes all the details that are required for component plug-and-play. Since an assembly contains all these details, there's no need for storing this type of information in the registry, as in the COM world.

An assembly can be a single-module assembly or a multi-module assembly. In a single-module assembly, everything in a build is clumped into one EXE or DLL, an example of which is the hello.exe application that we developed earlier. This is easy to create because a compiler takes care of creating the single -module assembly for you.

A multi-module assembly is one that contains many modules and resource files. To create it you have to use the Assembly Linker (al.exe) that is provided by the .NET SDK. This tool takes one or more IL or resource files and spits out a file with an assembly manifest.

Any .NET language may be converted into IL, so .NET supports multiple languages and perhaps multiple platforms in the future (as long as the target platforms have a CLR).

The Common Type System (CTS): Because .NET treats all languages as equal, a class written in C# should be equivalent to a class written in VB.NET, and an interface defined in Managed C++ should be exactly the same as one that is specified in managed COBOL. Languages must agree on the meanings of these concepts before they can integrate with one another. In order to make language integration a reality, Microsoft has specified a common type system to which every .NET language must abide.

Interfaces: Interfaces support exactly the same concept as a C++ abstract base class (ABC) with only pure virtual functions. An ABC is a class that declares one or more pure virtual functions and thus cannot be instantiated. If you know COM or Java, interfaces in .NET are conceptually equivalent to a COM or Java interface. You specify them, but you don't implement them. A class that derives from your interface must implement your interface. An interface may contain methods, properties, indexers, and events. In .NET, a class can derive from multiple interfaces.

The Common Language Specification (CLS): Microsoft has published the Common Language Specification (CLS). The CLS specifies a series of basic rules that are required for language integration. Since Microsoft provides the CLS that spells out the minimum requirements for being a .NET language, compiler vendors can build their compilers to the specification and provide languages that target .NET. Besides compiler writers, application developers should read the CLS and use its rules to guarantee language interoperation.

CLR Execution: .Net PE Files(Metadata And IL) >> Class Loader >> Verifier >> JIT >> Managed Native Code

Once the class loader has found and loaded the target class, it caches the type information for the class so that it doesn't have to load the class again for the duration of this process.

The verifier is responsible for verifying that: 1. The metadata is well formed, meaning the metadata must be valid. 2. The IL code is type safe, meaning type signatures are used correctly.

The JIT compilers convert IL to native code so that it can execute on the target operating system. For optimization reasons, JIT compilation occurs only the first time a method is invoked. Recall that the class loader adds a stub to each method during class loading. At the first method invocation, the VEE reads the information in this stub, which tells it that the code for the method has not been JIT compiled. At this indication, the JIT compiler compiles the

Page 101: Interview Questions ASP[1]

method and injects the address of the managed native method into this stub. During subsequent invocations to the same method, no JIT compilation is needed because each time the VEE goes to read information in the stub, it sees the address of the native method. Because the JIT compiler only performs its magic the first time a method is invoked, the methods you don't need at runtime will never be JIT compiled. The compiled, native code lies in memory until the process shuts down and until the garbage collector clears off all references and memory associated with the process. This means that the next time you execute the process or component, the JIT compiler will again perform its magic.

If you want to avoid the cost of JIT compilation at runtime, you can use a special tool called ngen, which compiles your IL during installation and setup time. Using ngen, you can JIT-compile the code once and cache it on the machine so that you can avoid JIT compilation at runtime (this process is referred to as Pre-JITting). In the event that the PE file has been updated, you must PreJIT the PE file again. Otherwise, the CLR can detect the update and dynamically command the appropriate JIT compiler to compile the assembly.

All .NET assemblies are essentially binary components. You can treat each .NET assembly as a component that you can plug into another component or application, without the need for source code, since all the metadata for the component is stored inside the .NET assembly. While you have to perform a ton of plumbing to build a component in COM, you need to perform zero extra work to get a component in .NET, as all .NET assemblies are components by nature. Remember, we're using the term "component" as a binary, deployable unit, not as a COM class.

Shared Components: Unlike application-private assemblies, shared assemblies - ones that can be used by any client application - must be published or registered in the system Global Assembly Cache (GAC). When you register your assemblies against the GAC, they act as system components, such as a system DLL that every process in the system can use. A prerequisite for GAC registration is that the component must possess originator and version information. In addition to other metadata, these two items allow multiple versions of the same component to be registered and executed on the same machine. Again, unlike COM, we don't have to store any information in the system registry for clients to use these shared assemblies.

Object Pooling: A pool is technical term that refers to a group of resources, such as connections, threads, and objects. Putting a few objects into a pool allows hundreds of clients to share these few objects (you can make the same assertion for threads, connections, and other objects). Pooling is therefore a technique that minimizes the use of system resources, improves performance, and helps system scalability.

ADO.NET Architecture: Microsoft ADO.NET's object model encompasses two distinct groups of classes: content components and managed-provider components. The content components include the DataSet class and other supporting classes such as DataTable, DataRow, DataColumn, and DataRelation. These classes contain the actual content of a data exchange. The managed-provider components assist in data retrievals and updates. Microsoft provides two managed providers in its current release of ADO.NET: OLE DB and SQL. The OLE DB managed provider comes with OleDbConnection, OleDbCommand, OleDbParameter, and OleDbDataReader. The SQL Server managed provider comes with a similar set of objects, whose names start with SqlClient instead of OleDb. Developers can use the connection, command, and data reader objects to directly manipulate data.

We might think that setting up and tearing down connections is not a good idea since the cost of establishing a connection is usually high. This is a concern only in the absence of connection pooling. ADO.NET automatically keeps connections to a data source in a pool, so when an application thinks it is tearing down a connection, it's actually returning it to the resource pool. This allows connections to be reused, avoiding the cost of reconstructing new connections from scratch.

Because ADO.NET framework classes are managed code, developers can inherit and extend

Page 102: Interview Questions ASP[1]

these classes to their custom needs.

A data reader is a new object providing fast, forward-only, and read-only access to data. This is similar to an ADO Recordset with server-side, forward - only, and read-only cursor types. Since this is a server –side cursor, the connection to the server is open throughout the reading of data.

Even though each DataAdapter maps only one DataTable in the DataSet, you can have multiple adapters to fill the DataSet object with multiple DataTables. Managed Code: The .Net framework provides several core run-time services to the programs that run within it. For example exception handling and security. For these services to work the code must provide a minimum level of information to runtime. Such code is called Managed Code.

Managed Data: This is data for which memory management is done by .Net runtime’s garbage collector this includes tasks for allocation de-allocation. We can call garbage collector to collect un-referenced data by executing System.GC.Collect().

What is an Assembly? Assemblies are fundamental building blocks of .Net Framework. They contain the type and resources that are useful to make an application. Assemblies enables code reuse, version control, security and deployment. An assembly consist of: Manifest , Type Metadata, MSIL and resource file.

Assemblies are Private and Shared. Private are used for a single application and installed in application’s install directory or its sub-directory. Shared assembly is one that can be referenced by multiple application and resides in GAC(local cache for assemblies managed by .Net Framework). gacutil /i myDll.dll can see and %windir%\assembly

Metadata and Manifest: Manifest describes the assembly itself. Assembly name, version, culture, strong name, list of files, type reference and reference assembly. While Metadata describes contents within the assembly like classes, namespaces, interfaces, scope, properties, methods and their parameters etc.

Application Domain: It is a virtual process that serves to isolate an application. All object created within the same application scope are created within same application domain.

Garbage Collection: It is Automatic Memory Manager for .Net Framework. It manages the memory allocated to .Net Framework. When a variable is defined it gets a space in memory (stack) and when an object is created memory for the object is allocated in heap. When an object is assigned to a variable it increments the reference counts for the object and when program control comes out of the function the scope of variable gets ended Or NULL is assigned to variable it decrements the reference count of object by 1. When reference count of one object becomes zero GC acts call destructor of object and then releases the memory acquired by the object.

Can .Net Components can be used from a COM? Yes, can be used. But There are few restrictions such as COM needs an object to be created. So static methods, parameterized constructor can not be used from COM. These are used by COM using a COM Callable Wrapper (CCW). TlbImp.exe and TlbExp.exe

How does .NET Remoting work? It involves sending messages along channels. Two of the standard channels are HTTP and TCP. TCP is for LANs only and HTTP can be used on LANs or WANs (internet). TCP uses binary

Page 103: Interview Questions ASP[1]

serialization and HTTP uses SOAP (.Net Runtime Serialization SOAP Formatter).

There are 3 styles of remote access: SingleCall: Each incoming request is handled by new instance. Singleton: All requests are served by single server object. Client-Activated Object: This is old state-full DCOM model. Where client receives reference to the remote object and keep until it finished with it.

DLL-HELL: Situations where we have to put same name Dlls in single directory where are Dlls are of different versions.

Versioning: MajorVersion.MinorVersion.BuildNumber.Revision

Boxing and Un-Boxing: Implicit(automatic) conversion of value type to reference type is known as Boxing And Explicit (manual) conversion of Reference type to value type is said to be Un-boxing. (conversion of Integer variable to object type)

.Net Object Oriented Programming Concepts Class: Class is concrete representation of an entity. It represents a group of objects, which posses similar attributes and behavior. Provides Abstraction and Encapsulations. A category name that can be given to group of objects of similar kind.

Object: Object represents/resembles a Physical/real entity. An object is simply something you can give a name.

Object Oriented Programming: It is a Style of programming that represents a program as a system of objects and enables code-reuse.

Encapsulation: Binding of attributes and behaviors. Hiding the implementation and exposing the functionality.

Abstraction: Hiding the complexity. Defining communication interface for the functionality and hiding rest of the things. In .Net destructor can not be abstract. Can define Either Finalize / Destructor. For Destructor access specifiers can not be assigned. It is Private.

Overloading: Adding a new method with the same name in same/derived class but with different number/types of parameters. Implements Polymorphism.

Overriding: When we need to provide different implementation than the provide by base class, We define the same method with same signatures in the derived class. Method must be Protected/Protected-Friend/Public for this purpose. (Base class routine can be called by Mybase.Method, base.Method).

Shadowing: When the method is defined as Final/sealed in base class and not overridable and we need to provide different implementation for the same. We define method with Shadows/new.

Inheritance: Gives you ability to provide is-a relationship. Acquires attributes and behaviors from another. When a class acquires attributes and behaviors from another class. (must not be Final or

Page 104: Interview Questions ASP[1]

sealed class in .Net)

Abstract Class: Instance can not be created. Optionally can have one or more abstract methods but not necessary. Can provide body to Classes.

Interface: What a Class must do, But not how-to. Bridge for the communication when the caller does not know to whom he is calling. Describes externally visible behavior of element. Only Public members which defines the means of the communication with the outer world. Can-be-Used-As Relationship. Can not contain data but can declare property. There can be no implementation. Interface can be derived from another interface.

Polymorphism: Mean by more than one form. Ability to provide different implementation based on different no./type of parameters. A method behaves differently based on the different input parameters. Does not depend on the Return-Type.

Pure-Polymorphism: Make an method abstract/virtual in base class. Override it in Derived Class. Declare a variable of type base class and assign an object of derived class to it. Now call the virtual/abstract method. The actual method to be called is decided at runtime.

Early-Binding: Calling an non-virtual method decides the method to call at compile time is known as Early-Binding.

Late-Binding: Same as pure-polymorphism.

Identifiers/Access Specifies and scope: VB.NET: Private, Protected, Friend, Protected Friend, Public. C#: private, protected, internal, protected internal, public.

What is a Delegate? A strongly typed function pointer. A delegate object encapsulates a reference to a method. When actual function needs to be called will be decided at run-time.

Static Variable and Its Life-Time: VB.NET: Public Shared VAR As Type. C#: public static Type VAR; Life time is till the class is in memory.

Constructor: Special Method Always called whenever an instance of the class is created.

Destructor/Finalize: Called by GC just before object is being reclaimed by GC.

ASP.Net Different Types of Caching? Output Caching: stores the responses from an asp.net page. Fragment Caching: Only caches/stores the portion of page (User Control) Data Caching: is Programmatic way to Cache objects for performance.

Authentication and Authorization: Authentication is identifying/validating the user against the credentials (username and password) and Authorization performs after authentication. Authorization allowing access of specific resource to user.

Page 105: Interview Questions ASP[1]

Different Types of Directives: Page, Register, Control, OutputCache, Import, Implements, Assembly, Reference

Difference between Server-Side and Client-Side: Server-Side code is executed on web-server and does not transmitted to client, while client-side code executed on client(browser) and is rendered to client along with the content.

Difference Server.Transfer and Response.Redirect: Both ends the processing for the current request immediately. Server.Transfer start executing the another resource specified as parameter without acknowledgement to client(browser) while Response.Redirect intimate client that your requested resource is available at this location and then client request for that resource.

Different Types of Validators and Validation Controls: RequiredFieldValidator, RangeValidator, RegularExpressionValidator, CompareValidator, CustomValidator, ValidationSummary

How to Manage State in ASP.Net? Client based: ViewState, QueryString and Cookies Server based: Session, Application.

Difference between User Control and Custom Control: CUSTOM Controls are compiled code (Dlls), easier to use, difficult to create, and can be placed in toolbox. Drag and Drop controls. Attributes can be set visually at design time. Can be used by Multiple Applications (If Shared Dlls), Even if Private can copy to bin directory of webApp add reference and use. Normally designed to provide common functionality independent of consuming Application.

3 Types of Session State Modes? InProc(cookieless, timeout), StateServer (Server, Port stateConnectionString="tcpip=server:port"), SQLServer (sqlconnectionstring) and Off.

What is ViewState and How it is managed, Its Advantages/Benefits? ViewState is a special object that ASP.NET uses to maintain the state of page and all webcontrols/ServerControls within it. It is in this object preserves the states of various FORM elements during post-backs. It is rendered to client(browser) as a Hidden variable __VIEWSTATE under <form>tag. We can also add custom values to it.

What is web.config and machine.config: machine.config is default configuration for all applications running under this version, located in %WinDir%\Microsfot.Net\Framework\Version. Settings can be overridden by Web.Config for an specific application Web.Config resides in application’s root/virtual root and exists in sub-sequent folders.

Role of Global.asax: Optional file contains the code to handle Application level events raised by ASP.Net or By HttpModule. This file resides in application root directory. Application_Start, _End, _AuthenticateRequest, _Error, Session_Start, _End, BeginRequest, EndRequest. This file is parsed and compiled into dynamically generated class derived from HttpApplication.

Page Life Cycle: Init, LoadViewState, LoadPostBackData, Load, RaisePostBackDataChangedEvent, RaisePostBackEvents, Pre-Render, SaveViewState, Render, Unload, (IpostBackDataChangedEventHandler and IpostBackEventHandler) Error, CommitTransaction, AbortTransaction, Abort inetinfo.exe, aspnet_isapi.dll aspnet_wp.exe, HttpModules (OutputCache, Session, Authentication, Authorization, Custom Modules Specified) and Then HttpHandlers PageHandlerFactory for *.aspx

Can the action attribute of a server-side <form>tag be set to a value and if not how can you

Page 106: Interview Questions ASP[1]

possibly pass data from a form to a subsequent Page? No assigning value will not work because will be overwritten at the time of rendering. We can assign value to it by register a startup script which will set the action value of form on client-side. Rest are Server.Transfer and Response.Redirect.

ASP.Net List Controls and differentiate between them? RadioButtonList, CheckBoxList, DropDownList, Repeater, DataGrid, DataList

Type Of Code in Code-Behind class: Server-Side Code.

What might be best suited to place in the Application_Start and Session_Start: Application level variables and settings initialization in App_Start User specific variables and settings in Session_Start

Difference between inline and code-behind. Which is best? Inline is mixed with html and code-behind is separated. Use code-behind, Because Inline pages are loaded, parsed, compiled and processed at each first request to page and remains in compiled code remains in cache until it expires, If expires it again load, parse and compile While code-behind allows to be pre-compiled and provide better performance.

Which Template must provide to display data in Repeater? ItemTemplate.

How to Provide Alternating Color Scheme in Repeater? AlternatingItemTemplate

What base class all Web Forms inherit from? System.Web.UI.Page

What method do you use to explicitly kill a user’s Session? HttpContext.Current.Session.Abandon()

How do you turn off cookies in one page of your asp.net application? We will not use it. But can not turn off cookies from server. To allow or not is a client side functionality.

Which two properties are on every validation control? ControlToValidate and Text, ErrorMessage

How do you create a permanent cookie? Set expires property to Date.MaxValue (HttpCookie.Expires = Date.MaxValue)

What is the standard you use to wrap up a call to a Web Service? SOAP

Which method do you use to redirect to user to another page without performing a round trip to Client? Server.Transfer(“AnotherPage.aspx”)

What is transport protocol you use to call a Web-Service SOAP? HTTP-POST

A Web Service can only be written in .NET? FALSE

Where on internet would you look for Web services? www.uddi.org

How many classes can a single .NET DLL contain? Unlimited

Page 107: Interview Questions ASP[1]

How many namespaces are in .NET version 1.1? 124

What is a bubbled event? When you have a complex control like DataGrid. Writing an event processing routine for each object (cell, button, row etc.). DataGrid handles the events of its constituents and will raise its own defined custom events.

Difference between ASP Session State and ASP.Net Session State? ASP: relies on cookies, Serialize all requests from a client, Does not survive process shutdown, Can not maintained across machines in a Web farm/garden.

Layouts of ASP.NET Pages: GridLayout and FlowLayout

Web User Control: Combines existing Server and HTML controls by using VS.Net. to create functional units that encapsulate some aspects of UI. Resides in Content Files, which must be included in project in which the controls are used.

Composite Custom Control: combination of existing HTML and Server Controls.

Rendered custom control: create entirely new control by rendering HTML directly rather than using composition.

Where do you store the information about user’s Locale? Page.Culture

should Validation occur on Client/Server Side for Date Input? Both. Client-side reduces extra round-trip. Server-Side ensures prevention against hacking and failure against automated requests.

HTTP GET and HTTP POST: As their names imply, both HTTP GET and HTTP POST use HTTP as their underlying protocol. Both of these methods encode request parameters as name/value pairs in the HTTP request. The GET method creates a query string and appends it to the script's URL on the server that handles the request. For the POST method, the name/value pairs are passed in the body of the HTTP request message.

Web Services Discovery: Even though advertising of a web service is important, it is optional. Web services can be private as well as public. Depending on the business model, some business-to -business (B2B) services would not normally be advertised publicly. Instead, the web service owners would provide specific instructions on accessing and using their service only to the business partner. To advertise web services publicly, authors post discovery files on the Internet. Potential web services clients can browse to these files for information about how to use the web services—the WSDL (Web Service Description Language). Think of it as the yellow pages for the web service. All it does is point you to where the actual web services reside and to the description of those web services. The process of looking up a service and checking out the service description is called Web Service discovery. There are two ways of advertising the service: static and dynamic. In both of these, XML conveys the locations of web services.

Static discovery is easier to understand because it is explicit in nature. If you want to advertise your web service, you must explicitly create the .disco discovery file and point it to the WSDL.

As opposed to explicitly specifying the URL for all web services your site supports, you can enable dynamic discovery, which enables all web services underneath a specific URL on your web site to be listed automatically. For your web site, you might want to group related web services under many different directories and then provide a single dynamic discovery file in

Page 108: Interview Questions ASP[1]

each of the directory.

Web Services and Security: We incorporate security into web service in two ways: system security and application security. System -level security allows for restricting access to the web services from unauthorized clients. It is done in a declarative fashion, whereas application - level security is more flexible. With system-level security, you will most likely have the list of authorized clients' IP addresses that you will let access your web service through the use of some configuration - management tools. With application-level security, you will incorporate the authentication into your web service, thus providing a more flexible configuration.

In system – level security client send a user name and password to web server. This pair can be in plain text format or in some encrypted format. Once server authenticates the user it can access the services available to server.

In application – level security mode your web services involves taking security into your own hands. You can program your web services so that all of their methods require an access token, which can be obtained from the web service after sending in the client's username and password. The client credentials can be sent to the server through SSL (Secure Sockets Layer), which eliminates the risk of sending clear-text passwords across the wire. Through this SSL channel, the server returns an access token to the caller, who can use it to invoke all other web service methods.

Web Form Events The first event that happens in the life of a Web Form is the Init event. This is raised so that we can have initialization code for the page. The controls on the page are not yet created at this point. This event is raised once for each user of the page.

The Load event follows the Init event. Subsequently, it is raised each time the page is requested. When this event is raised, all child controls of the Web Form are loaded and accessible. You should be able to retrieve data and populate the controls so that they can render themselves on the page when sent back to the client.

The PreRender event happens just before the page is rendered and sent back to the client. We don't often handle this event; however, it depends on the situation.

The last event in the life of a Web Form is the Unload event. This happens when the page is unloaded from memory. Final cleanup should be done here.

Lifecycle Of A Web Form: In ASP .NET, the web page starts its life when a client requests a particular page. IIS parses and runs the scripts on the ASP page to render HTML content. As soon as the page rendering is complete, the page's life ceases; only the view states of the page persist between requests to the page. These view states allow the controls on the server to appear as if they are still present to handle server events.

Using Web Services: In Visual Studio.NET IDE, you can choose Project >> Add Web Reference and then type in the URL where the web service resides. For example, we'll point to the web service we created on local server, than is PubsWS (suppose). The URL to this web service on our server is http://localhost/PubsWS/PubsWS.asmx. After adding the web reference, you can access the proxy object to the web service you are calling via the type servername.proxyObjectName. For your case, it is localhost.PubsWS.

The following code excerpt demonstrates how to use the web service through the proxy. We create an instance of the proxy object and then ask it to relay the message to the real web service to get the list of authors. The result will be streamed back in XML format, which is reconstructed into a DataSet object.

[C#] localhost.PubsWS ws = new localhost.PubsWS( ); DataSet ds = ws.GetAuthors( );

Page 109: Interview Questions ASP[1]

ASP.NET Session-State Management: ASP.NET improves upon ASP session-state management by moving to an out-of-process model. By having all web servers in the farm pointing to a common server that hosts the out-of-process state manager, the web client can be redirected around the farm without losing the session states. By using an out-of-process model, we no longer have the problem of losing session states when the IIS process is cycled. This means that if the web server application crashed for whatever reason and restarted within the session time-out duration, the web clients could still have all their session states intact. Of course, if the out-of-process state manager crashed, that is a whole different issue. This leads to the next improvement of ASP.NET—the ability to persist session state to a database.

There are two levels of configuration: machine and application. Machine-level configuration associates with the machine.config file stored in WinNT\Microsoft.NET\ Framework\\CONFIG\machine.config, while the application-level configuration uses the web.config file in the application root directory. The application-level configuration overrides the machine -level configuration.

Acronyms

CCW COM Callable Wrapper

CLI Common Language Infrastructure. This is a subset of the CLR and base class libraries that Microsoft has submitted to ECMA so that a third-party vendor can build a .NET runtime on another platform.

CLR Common Language Runtime

CLS Common Language Specification

COFF Common Object File Format

COM Component Object Model

CTS Common Type System

DISCO Discovery of Web Services. A Web Service has one or more. DISCO files that contain information on how to access its WSDL.

DNA Distributed interNet Applications Architecture.

DOM Document Object Model

GDI Graphical Device Interface

GAC Global Assembly Cache

GUID Globally Unique Identifier

HTTP Hyper Text Transfer Protocol

IDL Interface Definition Language

IL Intermediate Language

MSIL Microsoft Intermediate Language

MS-DTC Microsoft Distributed Transaction Coordinator

N-Tier Multi-Tier

Page 110: Interview Questions ASP[1]

OLTP Online Transaction Processing

OLAP Online Analytical Processing

PE Portable Executable

RAD Rapid Application Development

RCW Runtime Callable Wrapper

SMTP Simple Mail Transfer Protocol

SOAP Simple Object Access Protocol

TCP Transport Control Protocol

TLB Type Library

UDF Uniform Data Format

UI User Interface

URL Uniform Resource Locator

UDDI -Universal Description, Discovery and Integration

WAP- Wireless Access Protocol

WSDL- Web Services Definition Language

WML Wireless Markup Language

XML Extensible Markup Language

# re: Interview Questions: ASP.NET 6/26/2006 7:36 PM Brian I am an .NET architect for a big company. The questions listed here are totally meaningless for screening candidates. In another words, if I use these questions, I will miss lots of qualified developers. Instead, I will hire lots of junor ones who knows how to memorize ...

I won't use any of these questions at all.

# re: Interview Questions: ASP.NET 6/30/2006 2:57 AM Ashok hello dear friends,

can anybody send me all possible interview questions both for freshers as well as experienced people for asp.net also if possible please send me the available source codes or projects

thanking you ashok [email protected]

# re: Interview Questions: ASP.NET 7/3/2006 1:05 AM anusha

Page 111: Interview Questions ASP[1]

hi friends ...i have 2 years experience in .net ie vB.net ...could you guys please help me out ...plzz send interview questions in asp.net ,vb.net ,sharepoint

my email id [email protected]

thanks in advance

# re: Interview Questions: ASP.NET 7/3/2006 10:12 PM Bhupendra plz send me some questions for webservice

# re: Interview Questions: ASP.NET 7/6/2006 1:34 AM ravish This is realy a good site for interview.I have a small request that is please add the answer below the question.

# re: Interview Questions: ASP.NET 7/7/2006 6:00 AM Chintan Darji Respected Sir,

The answers of the Frequently Asked Questions are extremely helpful to me for my interview preparation.

I am very very thankful to you sir.

# re: Interview Questions: ASP.NET 7/8/2006 4:15 AM Parag These questions are really good

# re: Interview Questions: ASP.NET 7/10/2006 3:10 AM bhaskar What is a proxy in web service? How do I use a proxy server when invoking a Web service?

What are the events fired when web service called? How will do transaction in Web Services? How does SOAP transport happen and what is the role of HTTP in it? How you can access a webservice using soap? What are the different formatters can be used in both? Why?.. binary/soap How you will protect / secure a web service?

[email protected]

# re: Interview Questions: ASP.NET 7/10/2006 11:54 PM vivek sir plz snd me more interview question.

# re: Interview Questions: ASP.NET 7/12/2006 12:44 AM sakthivel Pl send me the mail regarding .net interview related questions. pl

# re: Interview Questions: ASP.NET 7/13/2006 3:51 AM Askar hi it is very imprtant question if any more question please send me id : ktaskar @gmail.com

Page 112: Interview Questions ASP[1]

# re: Interview Questions: ASP.NET 7/13/2006 10:44 AM chirag Thank u

give me other important dot net question.

email : [email protected]

# re: Interview Questions: ASP.NET 7/15/2006 8:35 AM vijay helo sir i read this interview questions its' very nice.I request you to send these updated questions and answers to my id becoz i couldnot download.so i hope as soon as u r sending to my mail.thanking you

# re: Interview Questions: ASP.NET 7/15/2006 9:24 AM Srihari i want asp.net, Vb.net, asp,c#,opps concepts Interview Questions.

# re: Interview Questions: ASP.NET 7/16/2006 10:13 PM shailendra pratap singh All the question and their answer are very good and are very useful for us.Plz send this type of more question to me on the id [email protected]

# re: Interview Questions: ASP.NET 7/17/2006 12:28 PM .net hy

# re: Interview Questions: ASP.NET 7/18/2006 7:59 AM cherkos can web server replaces application server? is web server a client of application server? what if we put all the logic or classes or domain or middle layer in the web server? what if we use web service instead of application server? what if we use ajax? guys I want to get rid of non-web at all? , [email protected]

# re: Interview Questions: ASP.NET 7/19/2006 12:00 PM Bicky Jalali The documentation above is truly great.

Can any one send me some documentation on .Net Design Patterns. at :

[email protected]

# re: Interview Questions: ASP.NET 7/20/2006 9:45 AM Joe Gakenheimer Excellent, I appreciate effort you put into your list!

# re: Interview Questions: ASP.NET 7/20/2006 10:45 PM Subhash Dome Hi All Can anybody send questions which is asked about C# my email Id [email protected]

# re: Interview Questions: ASP.NET 7/23/2006 9:42 AM Arindam Can anybody answer me:

What is the difference between delegates and pointer ?

Page 113: Interview Questions ASP[1]

mail me at [email protected]

# re: Interview Questions: ASP.NET 7/23/2006 12:22 PM Brian(ATnT) Mark u did a gr8 job man!!! this blog is jus awesome... i dont know, why dont ppl understand tht they jus need to ve an idea abt wht will be asked.... other than crammin the complete MSDN... i jus saw...ppl askin for more... when thrs already a set of arnd thousand ques in this page itself... hahahaa. Adios Amigos

# re: Interview Questions: ASP.NET 7/23/2006 10:08 PM Dilip and Harish Its really good article, nad helped us lot in understanding the concepts

# re: Interview Questions: ASP.NET 7/24/2006 6:42 PM pls help me.... pls help me in deploying my project, can you give me the step by step in deploying the project, im using visual basic .net 2003 I have 2 webforms, (asp.net)

send me thru my email: [email protected]

# re: Interview Questions: ASP.NET 7/27/2006 7:53 PM [email protected] hi

# re: Interview Questions: ASP.NET 7/29/2006 7:01 AM sumit bajpai plz send me more asp.net question

# re: Interview Questions: ASP.NET 7/30/2006 10:03 PM randhir plz send questions

# re: Interview Questions: ASP.NET 8/1/2006 10:09 PM Vinay Thanks for the question and answer..i was quite lucky in my interview that the person who was taking my interview ask me the same question

i got thru to the interview.

but i would like clear some more doubts

what does EnableViewStateMac does? what is bubble event? what is delegates?(in detail i know its like pointer in C++)

so far i can remember this much....?

thanking you, vinay

# re: Interview Questions: ASP.NET 8/6/2006 7:38 AM PaulS

Page 114: Interview Questions ASP[1]

Vinay,

1) EnableViewStateMac is designed to detect when the viewstate of a page has been tampered with. If the EnableViewStateMac attribute of the page directive is set to true then the server will perform a Machine Authentication Check on the viewstate posted back to determine if it has been tampered with on the client.

Further, if you perform a Server.Execute() on a page it is important to disable viewstate mac on the page you are executing else the server will report that the viewstate has been tampered with (since the page that has been executed' ViewState will be merged with the Viewstate of the calling page and thus wont match with what the server expects).

2) Bubbling an event is the process of passing an event upto a higher level event handler to prevent having to write an event handler for each individual object. For example, if you had lots of buttons on a row, rather than writing a handler for each button you could bubble the event up to an object higher in the hierarchy to handle. The original event data should still be available.

3) As you describe a delegate is in essence a pointer to a function. Why use delegates?

A delegate allows you to specify the format of the function that you will be calling without having to specify which function you wish to call - this then leaves it upto the function called to determine how to implement the action.

As a practical example: say you wish to design a sort method but are unsure how the sort should be implemented, you can define a sort delegate which, when called can notify any subscribers with the correct signature that the data needs to be sorted - these functions have therefore been "delegated" or assigned with the requirement to sort data without the original caller having to worry about the implementation -- as long as the signature (return type and parameters) match the delegate then the responsibility of performing a sort can be off-loaded to another function.

By seperating the algorithm it allows the code to be written in a more general way.

Think of it like a button you add to a form: onclick you want to notify the application that a click has occured but you want to offload the responsibility of handling the action to something else as you dont know how it needs to be implemented.

Anyone: feel free to correct me on these responses.

Regards,

Paul

# re: Interview Questions: ASP.NET 8/6/2006 11:20 PM Shaielsh Respected Sir

I have One year experience on .NET as Asst. Programmer and i have good knowledge on .NET plateform.but now i am going to join interviews on .NET at the level of One year experience.I want to check what type of question can be asked in interviews.so please send me immediatly interview question on .NET at one year experience level.I shell highly obliged to you.

From Shailesh Bakadia Email : [email protected]

# re: Interview Questions: ASP.NET 8/8/2006 9:30 PM swapna what is a diffgram?

Page 115: Interview Questions ASP[1]

what are the types of HTML's?

# re: Interview Questions: ASP.NET 8/10/2006 2:28 AM Murali Mohan Very helpful.. thank you for done good job

# re: Interview Questions: ASP.NET 8/10/2006 4:38 AM JAGADEESAN Respected Sir, i am jagadeesan and i am working in Neosys Technologies as .Net Developer.while i had prepared some interview pattern questions through google search,i saw ur site and i took some questions from ur site.it is really helpful for me.

but i am sorry to say that few answers are wrong in my point of view.

for example:

What data types do the RangeValidator control support? Integer, String, and Date.

my answer for this question is: Integer, String, Date, Boolean, Currency(this answer i got from asp.net unleased materials)

Name two properties common in every validation control? ControlToValidate property and Text property.

my answer for this question is:

EnableClientScript,Enabled the above two properties are commonly used in all validation control. for ex: ValidationSummary control dont have any text and controltovalidate property but it has Enableclientscript,enabled property.

enableclientscript - it means enable the clientscript

enabled - it means enable the clientscript and serverscript

sir onething i want to tell u frankly,many of the software concerns in india who are all giving ur questions.so i couldnt say my answer is correct.

if u feel my answer is correct please kindly update my answer in ur website.

if u want to say something regarding this please mail me [email protected]

sorry for the inconvenience

with regards s.jagadeesan (INDIA)

# re: Interview Questions: ASP.NET 8/10/2006 9:26 PM Samiyappan Prabakar Its a Nice Article to refresh .and for the starters.

Page 116: Interview Questions ASP[1]

# re: Interview Questions: ASP.NET 8/10/2006 11:31 PM sivakumar good and best

# problem faced with Tool Box in asp.net 8/12/2006 9:34 AM Bharat Agrawal hi . I m using visual studio web devloper 2005 express edition ..it was runnung very fine but now I dont know what changes I hve made in toolbox setting from which I m not able to use all toolbox controls ...only Html controls are highlighted to be used ..I can see all the controls but they r not highlighted ...initially all of them were working very fine ...plzzz help me out .

# re: Interview Questions: ASP.NET 8/17/2006 11:48 PM Poongkodi Thanks .............

If anyone can Pls send me VB.net Qestions also.

#  Interview Questions: ASP.NET 8/21/2006 2:28 AM Arumuga Kumar I have One year experience on .NET as Asst. Programmer and i have good knowledge on .NET plateform.but now i am going to join interviews on .NET at the level of One year experience.I want to check what type of question can be asked in interviews.so please send me immediatly interview question on .NET at one year experience level.I shell highly obliged to you.

From Arumuga kumar Email : [email protected]

# re: Interview Questions: ASP.NET 8/23/2006 4:17 AM ravi excellent collection , this plus a bit of OOP will definitly help the freshers.

# re: Interview Questions: ASP.NET 8/23/2006 5:23 AM venu this very intelictuvale for .net students

# re: Interview Questions: ASP.NET 8/23/2006 11:10 PM gaurav hello sir/mam i m one year experience asp.net developer and want to face interview for experience base. can u send me interview question.

from gaurav goel mail id [email protected]

# re: Interview Questions: ASP.NET 8/25/2006 5:02 PM Swetha Hi Sir,

These questions are useful for me.Can you plz send me frequently asked interview questions on asp.net, C#, webservices and remoting.

Please send to my email id. [email protected]

Page 117: Interview Questions ASP[1]

it will be very helpful to me.

Thanks

Swetha

# #9 doesn't answer the question 8/28/2006 5:30 AM rlively On #9, the answer doesn't answer the question:

Suppose you want a certain ASP.NET function executed on MouseOver for a certain button. Where do you add an event handler? Add an OnMouseOver attribute to the button. Example: btnSubmit.Attributes.Add("onmouseover","someClientCodeHere();");

This wouldn't execute an ASP.NET function, it would execute a client-side javascript function. In order to execute an ASP.NET function, someClientCodeHere() would have to invoke __doPostBack (or another function that would do the same) to post back the form to the server, or else it would have to use AJAX/ATLAS to make an XMLHTTPRequest to the server to invoke an ASP.NET function.

As to the example given, if I ever see a web page that does an auto post back on mouseover of a button, I'll personally strangle the developer with his own mouse cord.

# re: Interview Questions: ASP.NET 8/28/2006 9:21 PM Shah Nishit hi sir thanks but i m fresher and i want a good job in good companies so please send me a some good url from different companies i really thanks to u in advanced please help me sir

# re: Interview Questions: ASP.NET 8/30/2006 12:39 AM swaroopa I have two year experience on .NET as Asst. Programmer and i have good knowledge on .NET plateform.but now i am going to join interviews on .NET at the level of two year experience.I want to check what type of question can be asked in interviews.so please send me immediatly interview question on .NET at two year experience level.I shell highly obliged to you.

From roopa Email : [email protected]

# re: Interview Questions: ASP.NET 8/30/2006 4:06 AM swaroopa I have two year experience on .NET as Asst. Programmer and i have good knowledge on .NET plateform.but now i am going to join interviews on .NET at the level of two year experience.I want to check what type of question can be asked in interviews.so please send me immediatly interview question on .NET at two year experience level.I shell highly obliged to you.

From roopa Email : [email protected]

# Interview Questions: ASP.NET 8/31/2006 4:58 AM SM. MANIKANDAN I have two year experience on .NET as Asst. Programmer and i have good knowledge on .NET plateform.but now i am going to join interviews on .NET at the level of two year experience.I want to check what type of question can be asked in interviews.so please send me immediatly interview question on .NET at two year experience level (ASP.NET, C#).I shell highly obliged to you.

Page 118: Interview Questions ASP[1]

M.MANIKANDAN

# re: Interview Questions: ASP.NET 9/2/2006 2:30 AM Anitha Good resource

# re: Interview Questions: ASP.NET 9/4/2006 3:33 PM kamal after studying some dotnet books i searched for the interview Questions, and i found this page helpful with vast critereia. if you can send Questions via email pls send. Thanks for support.

[email protected]

# re: Interview Questions: ASP.NET 9/6/2006 10:02 PM DR PATEL Thank's to sexena sir , YOUR question answer so very well for me . so thank form all for you .

# re: Interview Questions: ASP.NET 9/14/2006 12:56 AM Krupali I have one year experience in asp.net. and This site is very useful to me. Please include some more interview question and answer on asp.net, and also sqlserver 2000 and sql server 2005 pls send me this on my mail [email protected]

# re: Interview Questions: ASP.NET 9/14/2006 4:31 AM rock good one.. got some idea

# re: Interview Questions: ASP.NET 9/16/2006 7:01 PM Mohan G Hi ... the quesions were too good and very usefull for interview.i am in searching mode... with 3+ yrs, so please send me more interview questions in asp.net,C#.net, sql server 2000.

mail me at :

[email protected] , [email protected]

# re: Interview Questions: ASP.NET 9/16/2006 7:06 PM Mohan G Hi ... the quesions were too good and very usefull for interview.i am in searching mode... with 3+ yrs, so please send me more interview questions in asp.net,C#.net, sql server 2000, along with answers

mail me at :

[email protected] , [email protected]

# re: Interview Questions: ASP.NET 9/17/2006 8:05 PM sunil patil hellow sir , my self sunil patil , a interview question on .net is very standard &i like thah question my mail account is [email protected]

Page 119: Interview Questions ASP[1]

# Interview Questions: ASP.NET 9/19/2006 2:26 AM Muthu Kumar Dear Sir,

I have one plus experience in VB.Net ..I thought of attending interviews with this experience..However I dont have any idea of how the interview questions would be?.. Pls send me frequently asked Interview questions in Vb.Net (both web and windows programming related..)..

# re: Interview Questions: ASP.NET 9/19/2006 2:30 AM Muthu Kumar This is my mail id

[email protected], [email protected]

# re: Interview Questions: ASP.NET 9/21/2006 12:18 AM Vijay hi everyone. The questions are really good. I am 2 years exp in .NET. I need some of the interview questions which might be frequently asked during the interview for a 2+ exp candidate. Plz send to my mail id asap. My mail id is [email protected] Thanks in advance

# re: Interview Questions: ASP.NET 9/21/2006 10:12 PM Srinivas The questions posted are excellent and are very helpful.

I am 2 years exp in .NET. I need some of the interview questions which might be frequently asked during the interview for a 2+ exp candidate. Plz send to my mail id [email protected]

Thanks

# re: Interview Questions: ASP.NET 9/24/2006 3:59 PM Maggie Thank all your guys very much!!!! I have 2 years experience in C#, SQL server, and ASP.NET. I am looking for some inteview questions for my upcoming interview. Please send more interview questions to my email account [email protected] . Thanks in advance.

Maggie

# re: Interview Questions: ASP.NET 9/24/2006 10:00 PM priyanka maishra hi!! i m priyanka. i m very greatful to use the interview question for asp.net .

# re: Interview Questions: ASP.NET 10/3/2006 8:17 AM Samar

Page 120: Interview Questions ASP[1]

hi!! i m samar,its really good collections of questions.

# re: Interview Questions: ASP.NET 10/6/2006 8:01 AM Purwa Hi Its indeed a good article. Please if you find any interview questions for Beginner (simple Questions also)in ASP.net please mail it to [email protected] Thanks

# re: Interview Questions: ASP.NET 10/6/2006 9:46 PM Supriya Hi,

The questions are really good. I am 2 years exp in .NET. I need some of the interview questions which might be frequently asked during the interview for a 2+ exp candidate. Plz send to my mail id given below: My mail id is [email protected] Thanks in advance

# re: Interview Questions: ASP.NET 10/7/2006 12:59 AM Ashwin any C#, sql server2000, ado.net interview questions please.

my id is [email protected]

# re: Interview Questions: ASP.NET 10/7/2006 1:51 AM Rajesh what is exe to filter the asp page in iis like isapi.exe for aspx page.Looking forward to see the reply

# re: Interview Questions: ASP.NET 10/9/2006 6:24 AM jyotsna i m mca student. i need asp.net question for interview.please send me. thanks in advanced.

# re: Interview Questions: ASP.NET 10/9/2006 6:56 AM Aneeta I have to for interview of .Net Please somebody tell me 1). what are the event which are there in datagrid for ASP.NET with csharp

2). What are object that can be placed in in datagrid

3). What is code for placing the text box in the datagird

please give me some URL or the code of the last answer you can email me on [email protected]

HELP WILL BE APPERIACATED

# re: Interview Questions: ASP.NET 10/9/2006 11:35 AM Mrs Mann Bisht

Page 121: Interview Questions ASP[1]

Hi

All the information is really useful. Keep it up and keep helping others

BEST OF LUCK

CheersL:-)

# re: Interview Questions: ASP.NET 10/9/2006 3:18 PM ramakrishna hi guys

Please send me all the interview questions necessary while applying to positions for 2 years experience

Also kindly send me some source code of a real time projects along with their description

please

# re: Interview Questions: ASP.NET&c#.net 10/12/2006 2:21 AM A.Durga prasad these questions are good. Please send the interview questions for 2 yesra exp candidates And if any body can send two ASP.net small projects with explanation .I will be great ful to you . And good resume format because i did not get the correct resume format Thanks alot fofr all who ever is sending.

# re: Interview Questions: ASP.NET 10/15/2006 9:47 PM muthuraman hai

Please send me all the interview questions necessary while applying to positions for 3+ years experience

Also kindly send me some source code of a real time projects along with their description

# re: Interview Questions: ASP.NET 10/16/2006 3:08 AM Arjyabala These questions are really very usefull.Please send the interview questions based on .NET technologies for 2 years exp candidates .I will be great ful to you And also send good resume format because i did not get the correct resume format. Thanks a lot for all who ever is sending.

Post Feedback

Title:

Name: Url:

Comments: 

Page 122: Interview Questions ASP[1]

Enter the code you see:

    Remember Me?