Google
Showing posts with label Asp.Net Interview Questions. Show all posts
Showing posts with label Asp.Net Interview Questions. Show all posts

ASP .NET Interview Questions- Part 3

  • Differences between DLL and EXE?
  • Can an assembly have EXE?
  • Can a DLL be changed to an EXE?
  • Compare & contrast rich client (smart clients or Windows-based) & browser-based Web application
  • Compare Client server application with n-Tier application
  • Can a try block have more than one catch block?
  • Can a try block have nested try blocks?
  • How do you load an assembly at runtime?
  • If I am writing in a language like VB or C++, what are the procedures to be followed to support .NET?
  • How do you view the methods and members of a DLL?
  • What is shadowing?
  • What are the collections you’ve used?

ASP .NET Interview Questions- Part 2

  • Explain the life cycle of an ASP .NET page.

  • Explain the .NET architecture.

  • What are object-oriented concepts?

  • How do you create multiple inheritance in c# and .NET?

  • When is web.config called?

  • How many weg.configs can an application have?

  • How do you set language in weg.config?

  • What does connection string consist of?

  • Where do you store connection string?

  • What is abstract class?

  • What is difference between interface inhertance and class inheritance?

  • What are the collection classes?

  • What are the types of threading models?

  • What inheritance does VB.NET support?

  • What is a runtime host?

  • Describe the techniques for optimizing your application?

  • Differences between application and session

  • What is web application virtual directory?

  • Differences between Active.exe and Dll

  • Connection pooling in MTS?

  • If cookies is disabled in client browser, will session tracking work?

  • How do you make your site SSL-enabled?

  • Will the following code execute successfully: response.write(’value of i=’+i);

  • What are the provides available with VB.NET?

  • What is a Process, Sesion and Cookie?

  • What are Abstract base classes?

  • What are the Difference between bstract base classes and Abstrat classes

  • What are interface in .NET?

  • How is Polymorphism supports in .NET?

  • What are the 2 types of polymorphism supports in .NET?

  • Types of compatibilities and explain them.

  • What is aggregative? How can it be implements in .NET?

  • Difference between COM components and .NET components?how to register it

  • Difference between early binding and late binding?

  • ASP.NET OBJECTS?

  • Asp.NET life cycle? When request mode

  • Explain ADO and its objects.

  • What is side by side execution?

  • Explain serialization?

  • Explain a class access specifiers and method acess specifiers.

  • What is the difference between overloading and overriding ? how can this be .NET

  • Explain virtual function and its usage.

  • How do you implement inhetance in .NET?

  • If I want to override a method 1 of class A and this class B then how do you declared

  • Explain friend and protected friend.

  • Explain multiple and multi_level inheritance in .NET?

  • Name all kind of access specifiers for a class and for methods?

  • On ODP.NET

  • What is non-derterministic finalization?

  • What is isPostback property?

  • What is dictionary base class?

  • How can a class be extended and how is this mechanism difff from that of implementation an interface?

  • What are indexes .NET?

  • How can indexes be implemented in .NET?

ASP .NET Interview Questions- Part 1

What are steps in an asp .net page lifecycle?
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.

2.What is the main difference between Response.Write() and Response.Output.Write()?
With Response.Outout.Write options are available to you to write the formatted out put.

3.When implementing classes what are the specifics of an abstract method?
An Abstract method does not provide any implementation. The class containing it can not be instantiated it must be inherited. The deriving class must override abstract methods declared in parent class, unless it is an abstract class it self.

4.List all Validation Controls available in asp .net?
RequiredFieldValidator : Checks if a control has a value.
RangeValidator : Checks if the control’s value is within a certain range.
RegularExpressionValidator : Checks whether the value of an input control matches a certain pattern
CompareValidator : Checks a control’s value against a constant or another control value.
CustomValidator : Checks a control’s value against a customized validation logic.
ValidationSummary : Displays a list of all validation errors

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

6.Is C# .net case sensitive?
Yes it is.

7.What is the difference between a class and struct ?
A struct is a value type while a class is a reference type. There’s no inheritance with
struct.

8.When passing a variable by reference to a method what is the difference between keywords ref and out?
When using the key word ref the variable must be initialize before calling the method,
while initialization is not mandatory when using out.

9.What are specifics for Static class?
Static class is implemented with the Keyword Static in the class definition.
It must contain only static members and methods. Public members of static class can be accessed without the class instantiation. Static class are sealed by default therefore can not be inherited. Static class cannot be instantiated.

10.What part of the code is usually called Code-Behind?
The Server side code is usually called Code-behind as reference to the fact that in a web application it is actually the part of the code handling the large part of the execution.

11.What part of the code is called Inline Code?
The asp .net client side code is usually call inline code. From most browsers it can be
view by choosing 'View source' from the page menu.

12.What is the difference between doing a Dataset.Clone() and Dataset.Copy()?
Dataset.Clone() will copy just the dataset structure including all the datatables,
schemas, relations and constraints; it will not copy the data. Dataset.Copy() will copy
both dataset structure and data.

13.What is the role of Global.asax file?
The Global.asax include its code behind file Global.asax.cs, it is use to implement
application and session level events.

14.What utility is used to manually deploy an assembly?
The GacUtil is a utility tool that comes with visual studio, it is use to deploy an
assembly by adding it into the GAC(Global Assembly Cache).

Ex: Type at the command line prompt
C:\gacutil /i ASPMyComponent.dll
will install ASPMyComponent into the GAC

15.Define MSIL. How is it use in the .Net framework?
MSIL stand for Microsoft Intermediate Language. During the compilation process, code written in any .NET compatible languages(J#, C#, VB,C++) is converted into MSIL. MSIL then create a compatibility bridge among these language before execution by the virtual machine.

16. What are differences between ASP.Net and Classic ASP?
-ASP programming is based on scripting languages like Jscript or VBScript which evolves around a mixture of scripting and HTML. ASP .net is base on an advance structured compiled language.
-ASP .net gives the option of separating the code behind (compiled code) from the design code or client code (HTML).
-ASP .net with visual studio .net provides an advanced application and session state
management, while ASP performs poorly at providing it.
-ASP has a poor error handling capability compare to ASP .net which has it much completed and much advanced.
-ASP does not have a built-in mechanism for XML while ASP .net comes with a full XML capability support.
-ASP .net has a fully distributed data source support which is missing from classic ASP

17.What property is use to set alternate color scheme in a Repeater control?
AlternatingItemTemplate.

18.What is the base class for Web Forms?
The System.Web.UI.Page class.

19.What are the meaning of terms boxing and un-boxing?
Boxing: Implicit conversion of a value type into a reference type.
Un-Boxing: Explicit conversion of a reference type into a value type. Can also be call
casting.

20.Give a brief description of how the heap and stack are managed in .Net.
Stack and heap are memory sections of the .net application. The CLR(Common Language Runtime) is in charge of managing those sections.
Value type variables are stored in the stack where storing order is Last in first out.
When a variable is out of scope it basically fall off the stack.
Refence type variable are stored on the heap where storing order is First in first out.
When a variable becomes out of scope it is mark for collection.

The GC(Garbage Collector) is the part of the CLR responsible for cleaning up the heap releasing resources occupied by Reference type variables.

Asp.NET Interview Questions

  1. What do I need to create and run an ASP.NET application?
  • Windows 2000, Windows Server 2003 or Windows XP.
  • ASP.NET, which can be either the redistributable (included in the .NET SDK) or Visual Studio .NET.
  1. Are there any free IDEs for the .NET SDK?
    • Microsoft provides Visual Studio 2005 Express Edition Beta for free. Of particular interest to the ASP.NET developers would be the Visual Web Developer 2005 Express Edition Beta 2 available as a free download.
    • The ASP.NET Web Matrix Project (supported by Microsoft) is a free IDE for developing ASP.NET applications and is available here.
    • There is also a free open-source UNIX version of the Microsoft .NET development platform called Mono available for download here.
    • Another increasingly popular Open Source Development Environment for .NET is the #develop (short for SharpDevelop) available for download here.

  2. When was ASP.NET released?

    ASP.NET is a part of the .NET framework which was released as a software platform in 2002.

  3. Is a new version coming up?

    ASP.NET 2.0, Visual Studio 2005 (Whidbey), Visual Web Developer 2005 Express Edition are the next releases of Microsoft's Web platform and tools. They have already been released as Beta versions. They are scheduled to be released in the week of November 7, 2005.

  4. Explain Namespace.

    Namespaces are logical groupings of names used within a program. There may be multiple namespaces in a single application code, grouped based on the identifiers’ use. The name of any given identifier must appear only once in its namespace.

  5. List the types of Authentication supported by ASP.NET.
    • Windows (default)
    • Forms
    • Passport
    • None (Security disabled)
  6. What is CLR?

    Common Language Runtime (CLR) is a run-time environment that manages the execution of .NET code and provides services like memory management, debugging, security, etc. The CLR is also known as Virtual Execution System (VES).

  7. What is CLI?

    The CLI is a set of specifications for a runtime environment, including a common type system, base class library, and a machine-independent intermediate code known as the Common Intermediate Language (CIL). (Source: Wikipedia.)

  8. List the various stages of Page-Load lifecycle.
    • Init()
    • Load()
    • PreRender()
    • Unload()
  9. Explain Assembly and Manifest.

    An assembly is a collection of one or more files and one of them (DLL or EXE) contains a special metadata called Assembly Manifest. The manifest is stored as binary data and contains details like versioning requirements for the assembly, the author, security permissions, and list of files forming the assembly. An assembly is created whenever a DLL is built. The manifest can be viewed programmatically by making use of classes from the System.Reflection namespace. The tool Intermediate Language Disassembler (ILDASM) can be used for this purpose. It can be launched from the command prompt or via Start> Run.

  10. What is Shadow Copy?

    In order to replace a COM component on a live web server, it was necessary to stop the entire website, copy the new files and then restart the website. This is not feasible for the web servers that need to be always running. .NET components are different. They can be overwritten at any time using a mechanism called Shadow Copy. It prevents the Portable Executable (PE) files like DLLs and EXEs from being locked. Whenever new versions of the PEs are released, they are automatically detected by the CLR and the changed components will be automatically loaded. They will be used to process all new requests not currently executing, while the older version still runs the currently executing requests. By bleeding out the older version, the update is completed.

  11. What is DLL Hell?

    DLL hell is the problem that occurs when an installation of a newer application might break or hinder other applications as newer DLLs are copied into the system and the older applications do not support or are not compatible with them. .NET overcomes this problem by supporting multiple versions of an assembly at any given time. This is also called side-by-side component versioning.

  12. Explain Web Services.

    Web services are programmable business logic components that provide access to functionality through the Internet. Standard protocols like HTTP can be used to access them. Web services are based on the Simple Object Access Protocol (SOAP), which is an application of XML. Web services are given the .asmx extension.

  13. Explain Windows Forms.

    Windows Forms is employed for developing Windows GUI applications. It is a class library that gives developers access to Windows Common Controls with rich functionality. It is a common GUI library for all the languages supported by the .NET Framework.

  14. What is Postback?

    When an action occurs (like button click), the page containing all the controls within the tag performs an HTTP POST, while having itself as the target URL. This is called Postback.

  15. Explain the differences between server-side and client-side code?

    Server side scripting means that all the script will be executed by the server and interpreted as needed. Client side scripting means that the script will be executed immediately in the browser such as form field validation, clock, email validation, etc. Client side scripting is usually done in VBScript or JavaScript. Since the code is included in the HTML page, anyone can see the code by viewing the page source. It also poses as a possible security hazard for the client computer.

  16. Enumerate the types of Directives.
    • @ Page directive
    • @ Import directive
    • @ Implements directive
    • @ Register directive
    • @ Assembly directive
    • @ OutputCache directive
    • @ Reference directive
  17. What is Code-Behind?

    Code-Behind is a concept where the contents of a page are in one file and the server-side code is in another. This allows different people to work on the same page at the same time and also allows either part of the page to be easily redesigned, with no changes required in the other. An Inherits attribute is added to the @ Page directive to specify the location of the Code-Behind file to the ASP.NET page.

  18. Describe the difference between inline and code behind.

    Inline code is written along side the HTML in a page. There is no separate distinction between design code and logic code. Code-behind is code written in a separate file and referenced by the .aspx page.

  19. List the ASP.NET validation controls?
    • RequiredFieldValidator
    • RangeValidator
    • CompareValidator
    • RegularExpressionValidator
    • CustomValidator
    • ValidationSummary
  20. What is Data Binding?

    Data binding is a way used to connect values from a collection of data (e.g. DataSet) to the controls on a web form. The values from the dataset are automatically displayed in the controls without having to write separate code to display them.

  21. Describe Paging in ASP.NET.

    The DataGrid control in ASP.NET enables easy paging of the data. The AllowPaging property of the DataGrid can be set to True to perform paging. ASP.NET automatically performs paging and provides the hyperlinks to the other pages in different styles, based on the property that has been set for PagerStyle.Mode.

  22. Should user input data validation occur server-side or client-side? Why?

    All user input data validation should occur on the server and minimally on the client-side, though it is a good way to reduce server load and network traffic because we can ensure that only data of the appropriate type is submitted from the form. It is totally insecure. The user can view the code used for validation and create a workaround for it. Secondly, the URL of the page that handles the data is freely visible in the original form page. This will allow unscrupulous users to send data from their own forms to your application. Client-side validation can sometimes be performed where deemed appropriate and feasible to provide a richer, more responsive experience for the user.

  23. What is the difference between Server.Transfer and Response.Redirect?
    • Response.Redirect: This tells the browser that the requested page can be found at a new location. The browser then initiates another request to the new page loading its contents in the browser. This results in two requests by the browser.
    • Server.Transfer: It transfers execution from the first page to the second page on the server. As far as the browser client is concerned, it made one request and the initial page is the one responding with content. The benefit of this approach is one less round trip to the server from the client browser. Also, any posted form variables and query string parameters are available to the second page as well.

.Net Web Development Interview Questions

Which of the following languages is NOT included in the default .NET Framework installation? C#
VB.NET
JScript.NET
VBScript.NET

What are the different types of serialization supported in .NET Framework
XmlSerializer
SoapFormatter
XPathNavigator
HttpFormatter

The CLR uses which format for assembly version numbers
Major:Minor:Revision:Build
Major:Build:Minor:Revision
Major:Revision:Minor:Build
Major:Minor:Build:Revision

What tool is used to manage the GAC?
GacMgr.exe
GacSvr32.exe
GacUtil.exe
RegSvr.exe

State True or False: A single .NET dll can contain unlimited classes
True
False

State True or False: ASP.NET can currently run only on Windows Platform
True
False

Which one of the following best describes “Type-Safe”
It ensures that the data type are safely handled
It ensures that types are not mismatched when they are called so uses a typecasting before referencing any data object
It ensures that an object only references memory locations that it’s allowed to, preventing data corruption and the accidental misuse of object types
All of the above

The number of objects in ASP.NET is
6
7
9
10

The code used to turn off buffering is
Buffering = false
OutputBuffer = false
BufferOutput = false
Buffer = Off

Can you have two applications on the same machine one which is using .NET Framework 1.1 and the other using 2.0 ?
Yes
No

Depends on System configuration
Which of the following DOT.NET tools manages certificates, certificate trust lists (CTLs), and certificate revocation lists (CRLs)?
sn.exe
certnet.exe
certmgr.exe
gacutil.exe

You need to generate a public/private key pair for using in creating a shared assembly. Given the above scenario, which .NET SDK utility should be used?
certmgr.exe
gacutil.exe
sn.exe
resgen.exe

The object that contains all the properties and methods for every ASP.NET page, that is built is
Page Object
HTTPPage Object
WebPage Object
System.Web.UI.Page

In C#, which character is used to indicate a verbatim string literal?
@
!
"
#

Which of the following operators has the highest precedence?
Pre Increment (++x)
Shift bits left: <<
Bitwise Or: |
Post Increment (x++)

The uniqueId that gets generated at the start of the Session is stored in
Client computer as a cookie
Server machine
Passed to and fro on each and every request and response
Both a and b are correct

State True or False: C# supports multiple-inheritance
True
False

Bitwise AND operator in C# is
&
&&
AND
XAND

Bitwise OR operator in C# is
OR
||
|
XOR

What’s the .NET datatype that allows the retrieval of data by a unique key?
Primary
Integer
Unique Identifier
HashTable

The keyword ‘int’ maps to one of the following .NET types
System.Int16
System.Int32
System.Int64
System.Int128

What can be achieved in IL which is not possible in C# ?
Creation of an ArrayList
Creation of a Dictionary
Creation of a two dimensional array
Creation of a non-zero based array

Which of the following is the correct code for setting a Session timeout of 30 minutes
Session.Timeout = 108000
Session.Timeout = 1800
Session.Timeout = 300
Session.Timeout = 30

The process that ASP.NET uses to keep track of Sessions without cookies is
Cookie Munging
Cookie Monking
Cookie Mocking
Cookie Munching

The method that transfers ASP.NET execution to another page, but returns to the original page when it is done is
Server.Transfer()
Server.Redirect()
Server.Execute()
Server.Return()

Basic Asp.Net Questions

  1. Explain the life cycle of an ASP .NET page.
  2. Explain the .NET architecture.
  3. What are object-oriented concepts?
  4. How do you create multiple inheritance in c# and .NET?
  5. When is web.config called?
  6. How many weg.configs can an application have?
  7. How do you set language in weg.config?
  8. What does connection string consist of?
  9. Where do you store connection string?
  10. What is abstract class?
  11. What is difference between interface inhertance and class inheritance?
  12. What are the collection classes?
  13. What are the types of threading models?
  14. What inheritance does VB.NET support?
  15. What is a runtime host?
  16. Describe the techniques for optimizing your application?
  17. Differences between application and session
  18. What is web application virtual directory?
  19. Differences between Active.exe and Dll
  20. Connection pooling in MTS?
  21. If cookies is disabled in client browser, will session tracking work?
  22. How do you make your site SSL-enabled?
  23. Will the following code execute successfully: response.write(’value of i=’+i);
  24. What are the provides available with VB.NET?
  25. What is a Process, Sesion and Cookie?
  26. What are Abstract base classes?
  27. What are the Difference between bstract base classes and Abstrat classes
  28. What are interface in .NET?
  29. How is Polymorphism supports in .NET?
  30. What are the 2 types of polymorphism supports in .NET?
  31. Types of compatibilities and explain them.
  32. What is aggregative? How can it be implements in .NET?
  33. Difference between COM components and .NET components?how to register it
  34. Difference between early binding and late binding?
  35. ASP.NET OBJECTS?
  36. Asp.NET life cycle? When request mode
  37. Explain ADO and its objects.
  38. What is side by side execution?
  39. Explain serialization?
  40. Explain a class access specifiers and method acess specifiers.
  41. What is the difference between overloading and overriding ? how can this be .NET
  42. Explain virtual function and its usage.
  43. How do you implement inhetance in .NET?
  44. If I want to override a method 1 of class A and this class B then how do you declared
  45. Explain friend and protected friend.
  46. Explain multiple and multi_level inheritance in .NET?
  47. Name all kind of access specifiers for a class and for methods?
  48. On ODP.NET
  49. What is non-derterministic finalization?
  50. What is isPostback property?
  51. What is dictionary base class?
  52. How can a class be extended and how is this mechanism difff from that of implementation an interface?
  53. What are indexes .NET?
  54. How can indexes be implemented in .NET?

ASP.NET Questions

1. Explain the differences between Server-side and Client-side code?

Server side scripting means that all the script will be executed by the server and interpreted as needed. ASP doesn’t have some of the functionality like sockets, uploading, etc. For these you have to make a custom components usually in VB or VC++. Client side scripting means that the script will be executed immediately in the browser such as form field validation, clock, email validation, etc. Client side scripting is usually done in VBScript or JavaScript. Download time, browser compatibility, and visible code - since JavaScript and VBScript code is included in the HTML page, then anyone can see the code by viewing the page source. Also a possible security hazards for the client computer.

2. What type of code (server or client) is found in a Code-Behind class?

C#

3. Should validation (did the user enter a real date) occur server-side or client-side? Why? Client-side validation because there is no need to request a server side date when you could obtain a date from the client machine.

4. What does the "EnableViewState" property do? Why would I want it on or off?

Enable ViewState turns on the automatic state management feature that enables server controls to re-populate their values on a round trip without requiring you to write any code. This feature is not free however, since the state of a control is passed to and from the server in a hidden form field. You should be aware of when ViewState is helping you and when it is not. For example, if you are binding a control to data on every round trip (as in the datagrid example in tip #4), then you do not need the control to maintain it’s view state, since you will wipe out any re-populated data in any case. ViewState is enabled for all server controls by default. To disable it, set the EnableViewState property of the control to false.

5. What is the difference between Server.Transfer and Response.Redirect? Why would I choose one over the other?

Server.Transfer() : client is shown as it is on the requesting page only, but the all the content is of the requested page. Data can be persist accros the pages using Context.Item collection, which is one of the best way to transfer data from one page to another keeping the page state alive. Response.Dedirect() :client know the physical loation (page name and query string as well). Context.Items loses the persisitance when nevigate to destination page. In earlier versions of IIS, if we wanted to send a user to a new Web page, the only option we had was Response.Redirect. While this method does accomplish our goal, it has several important drawbacks. The biggest problem is that this method causes each page to be treated as a separate transaction. Besides making it difficult to maintain your transactional integrity, Response.Redirect introduces some additional headaches. First, it prevents good encapsulation of code. Second, you lose access to all of the properties in the Request object. Sure, there are workarounds, but they’re difficult. Finally, Response.Redirect necessitates a round trip to the client, which, on high-volume sites, causes scalability problems. As you might suspect, Server.Transfer fixes all of these problems. It does this by performing the transfer on the server without requiring a roundtrip to the client.

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? When to Use Web Services:

* Communicating through a Firewall When building a distributed application with 100s/1000s of users spread over multiple locations, there is always the problem of communicating between client and server because of firewalls and proxy servers. Exposing your middle tier components as Web Services and invoking the directly from a Windows UI is a very valid option.
* Application Integration When integrating applications written in various languages and running on disparate systems. Or even applications running on the same platform that have been written by separate vendors.
* Business-to-Business Integration This is an enabler for B2B intergtation which allows one to expose vital business processes to authorized supplier and customers. An example would be exposing electronic ordering and invoicing, allowing customers to send you purchase orders and suppliers to send you invoices electronically.
* Software Reuse This takes place at multiple levels. Code Reuse at the Source code level or binary componet-based resuse. The limiting factor here is that you can reuse the code but not the data behind it. Webservice overcome this limitation. A scenario could be when you are building an app that aggregates the functionality of serveral other Applicatons. Each of these functions could be performed by individual apps, but there is value in perhaps combining the the multiple apps to present a unifiend view in a Portal or Intranet.
* When not to use Web Services: Single machine Applicatons When the apps are running on the same machine and need to communicate with each other use a native API. You also have the options of using component technologies such as COM or .NET Componets as there is very little overhead.
* Homogeneous Applications on a LAN If you have Win32 or Winforms apps that want to communicate to their server counterpart. It is much more efficient to use DCOM in the case of Win32 apps and .NET Remoting in the case of .NET Apps.

7. Let’s say I have an existing application written using Visual Studio (VBInterDevand this application utilizes WindowsCOM+ transaction services. How would you approach migrating this application to .NET?

8. Can you explain the difference between an ADO.NET Dataset and an ADO Recordset?

In ADO, the in-memory representation of data is the recordset. In ADO.NET, it is the dataset. There are important differences between them.
* A recordset looks like a single table. If a recordset is to contain data from multiple database tables, it must use a JOIN query, which assembles the data from the various database tables into a single result table. In contrast, a dataset is a collection of one or more tables. The tables within a dataset are called data tables; specifically, they are DataTable objects. If a dataset contains data from multiple database tables, it will typically contain multiple DataTable objects. That is, each DataTable object typically corresponds to a single database table or view. In this way, a dataset can mimic the structure of the underlying database. A dataset usually also contains relationships. A relationship within a dataset is analogous to a foreign-key relationship in a database —that is, it associates rows of the tables with each other. For example, if a dataset contains a table about investors and another table about each investor’s stock purchases, it could also contain a relationship connecting each row of the investor table with the corresponding rows of the purchase table. Because the dataset can hold multiple, separate tables and maintain information about relationships between them, it can hold much richer data structures than a recordset, including self-relating tables and tables with many-to-many relationships.
* In ADO you scan sequentially through the rows of the recordset using the ADO MoveNext method. In ADO.NET, rows are represented as collections, so you can loop through a table as you would through any collection, or access particular rows via ordinal or primary key index. DataRelation objects maintain information about master and detail records and provide a method that allows you to get records related to the one you are working with. For example, starting from the row of the Investor table for "Nate Sun," you can navigate to the set of rows of the Purchase table describing his purchases. A cursor is a database element that controls record navigation, the ability to update data, and the visibility of changes made to the database by other users. ADO.NET does not have an inherent cursor object, but instead includes data classes that provide the functionality of a traditional cursor. For example, the functionality of a forward-only, read-only cursor is available in the ADO.NET DataReader object. For more information about cursor functionality, see Data Access Technologies.
* Minimized Open Connections: In ADO.NET you open connections only long enough to perform a database operation, such as a Select or Update. You can read rows into a dataset and then work with them without staying connected to the data source. In ADO the recordset can provide disconnected access, but ADO is designed primarily for connected access. There is one significant difference between disconnected processing in ADO and ADO.NET. In ADO you communicate with the database by making calls to an OLE DB provider. In ADO.NET you communicate with the database through a data adapter (an OleDbDataAdapter, SqlDataAdapter, OdbcDataAdapter, or OracleDataAdapter object), which makes calls to an OLE DB provider or the APIs provided by the underlying data source. The important difference is that in ADO.NET the data adapter allows you to control how the changes to the dataset are transmitted to the database — by optimizing for performance, performing data validation checks, or adding any other extra processing. Data adapters, data connections, data commands, and data readers are the components that make up a .NET Framework data provider. Microsoft and third-party providers can make available other .NET Framework data providers that can be integrated into Visual Studio.
* Sharing Data Between Applications. Transmitting an ADO.NET dataset between applications is much easier than transmitting an ADO disconnected recordset. To transmit an ADO disconnected recordset from one component to another, you use COM marshalling. To transmit data in ADO.NET, you use a dataset, which can transmit an XML stream.
* Richer data types.COM marshalling provides a limited set of data types — those defined by the COM standard. Because the transmission of datasets in ADO.NET is based on an XML format, there is no restriction on data types. Thus, the components sharing the dataset can use whatever rich set of data types they would ordinarily use.
* Performance. Transmitting a large ADO recordset or a large ADO.NET dataset can consume network resources; as the amount of data grows, the stress placed on the network also rises. Both ADO and ADO.NET let you minimize which data is transmitted. But ADO.NET offers another performance advantage, in that ADO.NET does not require data-type conversions. ADO, which requires COM marshalling to transmit records sets among components, does require that ADO data types be converted to COM data types.
* Penetrating Firewalls.A firewall can interfere with two components trying to transmit disconnected ADO recordsets. Remember, firewalls are typically configured to allow HTML text to pass, but to prevent system-level requests (such as COM marshalling) from passing.

9. Can you give an example of what might be best suited to place in the Application_Start and Session_Start subroutines?

The Application_Start event is guaranteed to occur only once throughout the lifetime of the application. It’s a good place to initialize global variables. For example, you might want to retrieve a list of products from a database table and place the list in application state or the Cache object. SessionStateModule exposes both Session_Start and Session_End events.

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?

11. What are ASP.NET Web Forms? How is this technology different than what is available though ASP? Web Forms are the heart and soul of ASP.NET. Web Forms are the User Interface (UI) elements that give your Web applications their look and feel. Web Forms are similar to Windows Forms in that they provide properties, methods, and events for the controls that are placed onto them. However, these UI elements render themselves in the appropriate markup language required by the request, e.g. HTML. If you use Microsoft Visual Studio .NET, you will also get the familiar drag-and-drop interface used to create your UI for your Web application.

12. How does VB.NET/C# achieve polymorphism?

By using Abstract classes/functions.

13. Can you explain what inheritance is and an example of when you might use it?

Inheritance is a fundamental feature of an object oriented system and it is simply the ability to inherit data and functionality from a parent object. Rather than developing new objects from scratch, new code can be based on the work of other programmers, adding only new features that are needed.

14. How would you implement inheritance using VB.NET/C#?

When we set out to implement a class using inheritance, we must first start with an existing class from which we will derive our new subclass. This existing class, or base class, may be part of the .NET system class library framework, it may be part of some other application or .NET assembly, or we may create it as part of our existing application. Once we have a base class, we can then implement one or more subclasses based on that base class. Each of our subclasses will automatically have all of the methods, properties, and events of that base class ? including the implementation behind each method, property, and event. Our subclass can add new methods, properties, and events of its own - extending the original interface with new functionality. Additionally, a subclass can replace the methods and properties of the base class with its own new implementation - effectively overriding the original behavior and replacing it with new behaviors. Essentially inheritance is a way of merging functionality from an existing class into our new subclass. Inheritance also defines rules for how these methods, properties, and events can be merged.

To link to this blog, copy and paste the code below into your site.

  © Blogger template 'Tranquility' by Ourblogtemplates.com 2008

Back to TOP