What is an abstract class?

An abstract class is a class which can't be instantiated and it may contain at least 1 abstract method (a method without any body), but it is not necessary that it should have all abstract methods. Abstract class is a class for which we can not create an instance but can be inherited. Abstract class contains both abstract methods and general methods. The methods which we declared as abstract doesn't contain any definition. We have to override the abstract methods when we are using them in other classes. Only we can derive a child class from the abstract class What is CLR? 2.1. Diff between CLR & CTS CLR is the Common Language Runtime for the dotnet frame work. CTS is the Common Type Sytem for all languages.It consists of the types(Class,Enums,Structs,Interfaces etc for any language) CTS is one of the component of CLR. CLR is run time execution environment for .Net, It provides runtime as well as compile time services. e.g Memory Management, debuging CLR works with the CLS (Common Language Specification) and CTS (Common Type Systems) to ensure language interoperability. A CLR is a construct provide by the .NET framework that provides several functionalities to all .NET applications like memory management,security,language independency etc.it is common language runtime.CTS is common type specification that consists of all the types supported by .NET like bool,struct,enum etc; and thus keeps the .net applications typesafe Common Language Runtime (CLR) manages the execution of code and provides different services like Garbage collection and support for Base Class Libraries etc. The main constituents of CLR are described below The common Language Runtime (CLR) a rich set of features for cross-language development and deployment. CLR supports both Object Oriented Languages as well as procedural languages. CLR provides security, garbage collection, cross language exception handling, cross language inheritance and so on. The Common Type System, support both Object Oriented Programming languages as well as procedural languages. Basically CTS provides rich type system that is intended to support wide range of languages. CLS (Common Language Specification) defines a subset of Common Type System, which all language compilers targeting CLR must adhere to. CLS is a subset of CTS. All compilers under .NET will generate Intermediate Language no matter what language is used to develop an application. In fact, CLR will not be aware of the language used to develop an application. All language compilers will generate a uniform, common language called Intermediate Language. For this reason IL can be called as The language of CLR A platform for cross language development. can an abstract method be overridden by a virtual ... An abstract method is a method without any method body. When a class inherits from an abstract class, the derived class must implement all the abstract methods declared in the base class. But by declaring the derived class also abstract, we can avoid the implementation of all or certain abstract methods. This is what is known as partial implementation of an abstract class. A virtual method specifies an implementation of a method than can be polymorphically override in the derived class. When we declare a virtual method, it must contain a method body. It is not necessary to override a base class virtual method inside a derived class. The abstract methods are implicitly virtual and hence they cant make explicitly virtual in c# What is the difference between html and asp.net co...

40

MCSD Kits Lists 4 Differences 1. Server Controls Trigger Server side events. Whereas HTML controls only trigger client side events. 2. State Management Server Controls provides State Management - Dataentered in a control is maintained across requests. State Management in HTML Controls can be achieved usingPage-level scripts. 3. Adaptation Server controls automatically detects & adapts display appropriately. HTML Controls - No automatic detection is possible. 4. Properties Server controls - Provides a good set of properties that can bemanipulated from server side code. HTML Controls - It has the basic set of HTML attributes attachedto each element. Diff between Dataset and Datareader? Data Reader - Forward only where as Dataset - Can loop through datas Data Reader - Connected Recordset where as DataSet - Disconnected Recordset Data Reader - Less Memory Occupying where as DataSet - It occupies more memory Data Reader - Only Single Table can be used where as Dataset - Datatable Concept allows data to be stored in multiple tables. Data Reader - Read only where as DataSet - Can add/update/delete using the dataset Data Reader - No relationship can be maintained where as DataSet - Relationship can be maintained. Data Reader - No Xml Storage available where as DataSet - Can be stored as XML. How does VB.NET/C# achieve polymorphism? Having multiple methods with different signature is not polymorphism. That is function overloading. I am afraid this is also one form of polymorphism and is called Compile-time polymorphism. Polymorphism allows you to use a particular object as multiple types, that is its own type and the base types. It is achieved through inheritance. The derived class can have the behaviour of the base class or can define its own behaviour by overriding the virtual functions of the base class. This is runtime polymorphism What are delegates? A delegate is a class that can hold a reference to a method. Unlike other classes, a delegate class has a signature, and it can hold references only to methods that match its signature. A delegate is thus equivalent to a type-safe function pointer or a callback. delegates are like refernce or pointers to the methods. A delegate is a reference type that cna be used to encapsulate a method. A Delegate is Passing a method as an Argumement to a Existing method to create an Event Which namespace is used to get assembly details? System.Reflection is used to get data about assembly

40

What is IPostBack? How to use it? IPostBack is an interface which defines the methods ASP.NET server controls must implement to handle post back events. To create a server control that captures the form submission information from the browser, you must implement this interface. what is event bubbling? Event Bubbling is nothing but events raised by child controls is handled by the parent control. Example: Suppose consider datagrid as parent control in which there are several child controls.There can be a column of link buttons right.Each link button has click event.Instead of writing event routine for each link button write one routine for parent which will handlde the click events of the child link button events.Parent can know which child actaully triggered the event.That thru arguments passed to event routine. Why Datareader is useful? Well, Dataset is used for distributed environment where the data source is often disconnected and is not available..so we fetch data and store it in memory..overhead on memory(consider each request having more than 1000 records and there are thousands of request..)But Datareader as said above is used for connected environment so it provides greater efficiency by direct menipulating the data at server...Hence it is used where DB server and application have reliable connected media...eg web..you dont need to hold 1000 records in memory in this case.... Data Reader is used to go through the records in a particular order. It can be either forward order or backward order. What is DLL hell? DDL hell is the problem of registering the DDL,.NET remove this problem by assemblies because assemblies has its own meta data thats why it dose'nt require the registration. What is an assembly Assembly is a collection of code files , types and resources. It is a unit of deployment,version cotrol and reuse.Assembly is basically collection of exe or dll files which are generated upon successfull compilation of the .Net application An assembly is a collection of one or more files grouped together to form a logical unit. The term “files” in this context generally refers to managed modules, but assemblies can include files that are not managed modules. Most assemblies contain just one file, but assemblies can and sometimes do include multiple files. All the files that make up a multifile assembly must reside in the same directory. When you use the C# compiler to produce a simple EXE, that EXE is not only a managed module, it’s an assembly. Most compilers are capable of producing managed modules that aren’t assemblies and also of adding other files to the assemblies that they create. The .NET Framework SDK also includes a tool named AL (Assembly Linker) that joins files into assemblies. Explain what a diffgram is, and a good use for one... A DiffGram is an XML format that is used to identify current and original versions of data elements. The DataSet uses the DiffGram format to load and persist its contents, and to serialize its contents for transport across a network connection. When a DataSet is written as a DiffGram, it populates the DiffGram with all the necessary information to accurately recreate the contents, though not the schema, of the DataSet, including column values from both the Original and Current row versions, row error information, and row order.When sending and retrieving a DataSet from an XML Web service, the DiffGram format is implicitly used. Additionally, when loading the contents of a DataSet from XML using the ReadXml method, or when writing the contents of a DataSet in XML using the WriteXml method, you can select that the contents be read or written as a DiffGram.

40

What is GAC? What are Strong and Weak Types? Global Assembly Cache Each computer where the common language runtime is installed has a machine-wide code cache called the global assembly cache. The global assembly cache stores assemblies specifically designated to be shared by several applications on the computer. You should share assemblies by installing them into the global assembly cache only when you need to. As a general guideline, keep assembly dependencies private, and locate assemblies in the application directory unless sharing an assembly is explicitly required. In addition, it is not necessary to install assemblies into the global assembly cache to make them accessible to COM interop or unmanaged code. What are the main differences between .net 1.1 and... ASP.NET 2.0 introduces a lot of new features. Some of this features aim to simplify the problems faced using the earlier versions and some features are introduced to provide lot of new facilities. The most important features that are incorporated in ASP.NET 2.0 are: (a) Master Pages

Master pages are introduced to remove one of the most important deficiencies of earlier version of ASP.NET. One thing that has become apparent in the earlier version of ASP.NET is the lack of architecture for applying a consistent look and feel. In earlier version of ASP.NET whenever a developer wants to replicate a common functionality of a web page in other pages, the most possible options he uses is creating a user control and then replicate the functionality in other pages. ASP.NET 2.0 aims to solve this problem by introducing the concept of Master pages. First the developer needs to define a master page containing the content that he wants to appear on other pages and then use the ContentPlaceHolder controls to define the locations where the sub pages can plug in the content of their own. The he has to build the sub pages - .aspx pages – that reference the master using directives like this one: <%@Page MasterPageFile = ~/MyMasterPage.master” %> In addition, an application can designate a default Master Page in web.config as shown here: <configuration> <system.web> <pages masterPageFile="~/ MyMasterPage.master " /> </system.web> </configuration> (b) PreCompilation

By default, ASP.NET web pages and code files are compiled dynamically when a first request is made to the page. After the initial compilation, the compiled pages is cached; the cache is used to satisfy the subsequent requests for the same page. Even though this approach is flexible, when the page is requested for the first time, it requires a bit of extra time to compile the code. You can avoid this overhead by leveraging a new feature known as precompilation; by using this feature, you can compile an ASP.NET web site before making the web site available to the users. (c) Sharing code in the application

In earlier version of ASP.NET, if you were to reference a reusable component from your dot net application, you had to compile the assembly and place it in the bin folder (or place it in the GAC) of the web application. But now with ASP.NET 2.0, creating a reusable component is very simple and straightforward. All you need to do is to create a component in a pre-defined subdirectory called code. Any component placed in this directory will be automatically compiled at runtime into a single assembly. This assembly is automatically referenced and will be available to all the page in the site. (d) Themes and Skins

ASP.NET 2.0 introduces the concepts of Themes and Skins by means of which the look and feel of the web pages can be enhanced to a great extent to make them visually catchy and attractive.

40

A skin is a set of visual attributes applied to a control type. A theme is a collection of skins. There are a lot of predefined themes in ASP.NET 2.0. One can use it by using the following line of code: <%@ Page Theme=”SmokeAndGlass” %> The page directive’s Them attribute declaratively applies a theme to a page. Themes can also be applied programmatically using the page class’s Theme property What are webservices? Web services are a core technology provided by the .NET Framework. By using web services, companies can more easily integrate internal applications, but they can also access services exposed by other businesses. By combining web services exposed on the Internet with internally built services, companies can create a wide variety of value-added applications. For example, a company could unify banking, electronic bill payment, stock trading, and insurance services into a single, seamless financial management portal. Another possibility is the integration of inventory control, fulfillment mechanisms and purchase-order tracking into a comprehensive supply chain management system.

What is the difference between struct and class in C#? Structs vs classes in C# Structs may seem similar to classes, but there are important differences that you should be aware of. First of all, classes are reference types and structs are value types. By using structs, you can create objects that behave like the built-in types and enjoy their benefits as well.

• • • •

When you call the New operator on a class, it will be allocated on the heap. However, when you instantiate a struct, it gets created on the stack. This will yield performance gains. Also, you will not be dealing with references to an instance of a struct as you would with classes. You will be working directly with the struct instance. Because of this, when passing a struct to a method, it's passed by value instead of as a reference. Structs can declare constructors, but they must take parameters. It is an error to declare a default (parameterless) constructor for a struct. Struct members cannot have initializers. A default constructor is always provided to initialize the struct members to their default values. When you create a struct object using the New operator, it gets created and the appropriate constructor is called. Unlike classes, structs can be instantiated without using the New operator. If you do not use New, the fields will remain unassigned and the object cannot be used until all the fields are initialized. There is no inheritance for structs as there is for classes. A struct cannot inherit from another struct or class, and it cannot be the base of a class. Structs, however, inherit from the base class object. A struct can implement interfaces, and it does that exactly as classes do, Structs are simple to use and can prove to be useful at times. Just keep in mind that they're created on the stack and that you're not dealing with references to them but dealing directly with them. Whenever you have a need for a type that will be used often and is mostly just a piece of data, structs might be a good option.

What is the difference between indexers and properties in C#? Comparison Between Properties and Indexers Indexers are similar to properties. Except for the differences shown in the following , all of the rules defined for property accessors apply to indexer accessors as well. Properties Identified by its name. Accessed through a simple name or a member access. Can be a static or an instance member. Indexers Identified by its signature. Accessed through an element access. Must be an instance member.

40

A get accessor of a property has no parameters. A set accessor of a property contains the implicit value parameter.

A get accessor of an indexer has the same formal parameter list as the indexer. A set accessor of an indexer has the same formal parameter list as the indexer, in addition to the value parameter.

Which interface(s) must a class implement in order to support the foreach statement? Required interface for foreach statement:

A class must implement the IEnumerable and IEnumerator interfaces to support the foreach statement. Explain Abstract, Sealed, and Static Modifiers in C#. C# provides many modifiers for use with types and type members. Of these, three can be used with classes: abstract, sealed and static. abstract Indicates that a class is to be used only as a base class for other classes. This means that you cannot create an instance of the class directly. Any class derived from it must implement all of its abstract methods and accessors. Despite its name, an abstract class can possess non-abstract methods and properties. sealed Specifies that a class cannot be inherited (used as a base class). Note that .NET does not permit a class to be both abstract and sealed. static Specifies that a class contains only static members (.NET 2.0). What's the difference between override and new in C#? This is all to do with polymorphism. When a virtual method is called on a reference, the actual type of the object that the reference refers to is used to decide which method implementation to use. When a method of a base class is overridden in a derived class, the version in the derived class is used, even if the calling code didn't "know" that the object was an instance of the derived class. For instance: public class Base { public virtual void SomeMethod() { } } public class Derived : Base { public override void SomeMethod() { } } ... Base b = new Derived(); b.SomeMethod(); will end up calling Derived.SomeMethod if that overrides Base.SomeMethod. Now, if you use the new keyword instead of override, the method in the derived class doesn't override the method in the base class, it merely hides it. In that case, code like this: public class Base { public virtual void SomeOtherMethod()

40

{ } } public class Derived : Base { public new void SomeOtherMethod() { } } ... Base b = new Derived(); Derived d = new Derived(); b.SomeOtherMethod(); d.SomeOtherMethod(); Will first call Base.SomeOtherMethod , then Derived.SomeOtherMethod . They're effectively two entirely separate methods which happen to have the same name, rather than the derived method overriding the base method. If you don't specify either new or overrides, the resulting output is the same as if you specified new, but you'll also get a compiler warning (as you may not be aware that you're hiding a method in the base class method, or indeed you may have wanted to override it, and merely forgot to include the keyword). Name two ways that you can prevent a class from being instantiated. Ways to prevent a class from instantiated:

A class cannot be instantiated if it is abstract or if it has a private constructor. Explain some features of interface in C#. Comparison of interface with class (interface vs class):

• • • • • •

An interface cannot inherit from a class. An interface can inherit from multiple interfaces. A class can inherit from multiple interfaces, but only one class. Interface members must be methods, properties, events, or indexers. All interface members must have public access (the default). By convention, an interface name should begin with an uppercase I.

Can an abstract class have non-abstract methods? An abstract class may contain both abstract and non-abstract methods. But an interface can contain only abstract methods. How do I use an alias for a namespace or class in C#? Use the using directive to create an alias for a long namespace or class. You can then use it anywhere you normally would have used that class or namespace. The using alias has a scope within the namespace you declare it in. Sample code: // Namespace: using act = System.Runtime.Remoting.Activation; // Class: using list = System.Collections.ArrayList; ... list l = new list(); // Creates an ArrayList act.UrlAttribute obj; // Equivalent to System.Runtime.Remoting.Activation.UrlAttribute obj

40

What type of class cannot be inherited? A sealed class cannot be inherited. A sealed class is used primarily when the class contains static members. Note that a struct is implicitly sealed; so they cannot be inherited. What keyword must a derived class use to replace a non-virtual inherited method? new keyword is used to replace (not override) an inherited method with one of the same name.

What is an AppDomain? What is a process? What is thread? What is the difference between AppDomain and process? Process: A computer program is a set of instructions. Operating system executes a computer program by allocating a process for a program. Several processes may be associated with the execution of a single program. A process is an instance of machine code associated with a program. It has memory for instructions, data, a call stack and a heap AppDomain: An AppDomain is a light-weight process which separates one application in .NET with another. CLR creates an AppDomain when an application is loaded. Each application will have an AppDomain associated. Each AppDomain can have different threads running in it. Each app domain will have its associated code, data and configuration. Hence when one application crashes, it does not affect other. Thread: Each process can have multiple threads. Multiple threads can share same execution code and resources. A multi-threaded process can perform several tasks concurrently. What is a runtime host? .NET framework supports different type of applications like Web, windows, console etc,. Each type of application needs a runtime host to start it. This runtime host loads the runtime into a process, creates the application with in the process and loads the application code into the process. Runtime hosts included in .NET framework are ASP.NET: It loads the runtime that can handle a web request into the process. ASP.NET also creates an application domain for each Web application that will run on a Web server. Microsoft Internet Explorer: It creates an application domain to run managed controls. Shell executables: When ever a runtime executable is launched from the shell, this executable invokes the corresponding runtime host. What is the difference between manageable and unmanageable code? Code which targets the .NET framework CLR is manageable meaning CLR can provide its services like type safety, memory management, exceptional handling etc to this type of code. Managed code is always compiled into MSIL. When a .NET application is run this compiled MSIL is compiled to native code using JIT (Just In Time compiler). This JIT generates the native code as per the hardware specification on the system. Since all this process happens under the control of a managed environment CLR, CLR provides all its rich functionality. Managed code provides platform independence since the code is converted to MSIL and then converted to native code depending on the system architecture. The code that does not target CLR is unmanageable. It cannot run under CLR. This code directly runs under OS control. Applications written in traditional applications like C++, VB, C generate unmanaged code. This targets the computer architecture. Unmanaged code is always compiled to target a specific architecture and will only run on the intended platform. This means that if you want to run the same code on different architecture then you will have to recompile the code using that particular architecture. Unmanaged code is always compiled directly to the

40

native code which is architecture specific. This code cannot be executed on other platforms that are different than the one on which the code was compiled. All the features provided by CLR are unavailable and are to be taken care by the code. Hence this causes memory leaks in traditional applications. ExplainValue and reference types? “System.Object” is the base class from all the .NET classes. Value types: Value types inherit from the System.ValueType class, which in turn, inherits from System.Object. Value types are stored on stack. They are implicitly sealed. Structs and Enumerations are value types and they are always stored on stack. A value type cannot contain a null value. Variables that are value types store data. Reference types: Variables to reference types referred to as object, store reference to actual data. Actual data is stored on the heap and reference is stored on the stack. This allows the garbage collector to track outstanding references to a particular instance and free the instance when no references remain.

Integral types : sbyte, byte, char, short, ushort, int, uint, long, ulong Floating Point types: float, double Decimal types: decimal

What is the role of garbage collector in .NET? Objects created are stored on heap. Since the memory (here heap) is exhaustible, .NET identifies a mechanism to collect the unused memory(heap). GC does an automatic sweep of heap once it is full. GC can only destroy managed objects. GC will finalize all the objects in the memory that are not being used anymore and thereby freeing the memory allocated to them. .NET uses a three-generation approach to collecting memory. Newly allocated memory tends to be freed more frequently than older allocations, which tend to be more permanent. Gen 0 (Zero) is the youngest generation and, after a garbage collection, any survivors go on to Gen 1. Likewise, any survivors of a Gen 1 collection go on to Gen 2. Usually garbage collection will occur only on Gen 0, and only if after it has reached some limit. Until memory is exhausted, the cost of allocating each new object is that of incrementing a pointer--which is close to the performance of advancing the stack pointer. CLR calls the GC when there is a high memory pressure and it is not able to find any exact place to allocate a new object or the applied threshold is reached.

40

Can you force Garbage collection if so how? In applications with significant memory requirements, you can force garbage collection by invoking the GC.Collect method from the program. What is CLR? CLR is a runtime environment provided by .NET framework. Developers write code in either C# or VB.NET. .NET compilers convert this high level code into Microsoft Intermediate Language(MSIL). At runtime JIT compiler converts the MSIL into native code specific to the OS. CLR runs MSIL. CLR provides memory management, exceptional handling, security etc to the .NET code. Explain CLS and CTS? CLS: Common Language specification is a set of rules that are to be followed by a language in order to be .NET complaint. This facilitates cross-language integration. Programs written in one .NET language can interoperate with programs written in another .NET language. CTS: Common Type System Common Type System (CTS) describes how types are declared, used and managed. CTS facilitates cross-language integration, type safety, and high performance code execution. What is Type safety in .NET? Type-safe code accesses only the memory locations it is authorized to access. For example, type-safe code cannot read values from another object's private fields. It accesses types only in well-defined, allowable ways. If we want to work directly with memory addresses and can manipulate bytes at these addresses then we have to declare that code chunk as unsafe using the unsafe Keyword in C#. So that CLR will not do any extra verification on this code. Actually during just-in-time (JIT) compilation, an optional verification process examines the metadata and Microsoft intermediate language (MSIL) of a method to be JIT-compiled into native machine code to verify that they are type safe. This process is skipped if the code has permission to bypass verification. For example, the runtime cannot prevent unmanaged code from calling into native (unmanaged) code and performing malicious operations. When code is type safe, the runtime's security enforcement mechanism ensures that it does not access native code unless it has permission to do so. All code that is not type safe must have been granted Security Permission with the passed enum member SkipVerification to run. What is an assembly? An assembly is a basic building block for an application. It can be a DLL or EXE. An assembly contains IL. It consists of metadata about the types inside the assembly. What is the diffrence between Pivot an Unpivot ? Answer:-These tow are th opertor in Sql Server 2005 these are used to manupulate a expression from one table into another table but bothe are opposite of each other Pivot take rows and put them into the column but on the other hand Unpivot take column and put them into the row.Pivots helps in rotating unique in one column from mutliple columns. What is database replication? What are the different types of replication ? Answer:-Replication is a process from which we copying/moving data between databases on the same or different servers.There are three types of replication which i have define bellow. (1)Snapshot replication:This replication means data doennot get changed or updateIt can be used when data changes are infrequent its mainly used when we have to view data or some information. (2)Transactional replication :-This would happen when change is done to the data. (3)Merge replication - It is the process of distributing the data between publisher and subscriber, it allows the publisher and subscriber to update the data while connected or disconnected, and then merging the updates between the sites when they are connected Web.config file in ASP.NET? Web.config file, as it sounds like is a configuration file for the Asp .net web application. An Asp .net application has one web.config file which keeps the configurations required for the corresponding application. Web.config file

40

is written in XML with specific tags having specific meanings. We have Machine.config file also. As web.config file is used to configure one asp .net web application, same way Machine.config file is used to configure the application according to a particular machine. That is, configuration done in machine.config file is affected on any application that runs on a particular machine. Usually, this file is not altered and only web.config is used which configuring applications. Something about Session or Session Management & Application? sessions can stored in cookies . cookieless session is also available. for cookie less session it wil create unique session id for each session. it wil be automatically retrieved in URL. state management can be like, user sessions can be stored in 3 ways . Inproc - stored in asp.net worker process, stateserver- stored in window service . sqlserver- user sessions can be stored in sqlserver also. Application Start This Event is fired when the server which holding application starts whereas Session Start event is fired when any User has access that page or Session has been created. Suppose we want to track that how many users have accessed our sites today then Application Start is the best place to do so or we want to give some personalised view to User than Session is the best place. What is Boxing & Unboxing ? Value Types are stored on the stack and Reference types are stored on the heap. The conversion of value type to reference type is known as Boxing. Converting reference type back to value type is known as Unboxing. Value Types - Value types are primitive types that are mapped directly to the FCL. Like Int32 maps to System.Int32, double maps to System.double. All value types are stored on stack and all the value types are derived from System.ValueType. All structures and enumerated types that are derived from System.ValueType are created on stack, hence known as ValueType. Reference Types - Reference Types are different from value types in such way that memory is allocated to them from the heap. All the classes are of reference type. C# new operator returns the memory address of the object. What debugging tools come with the .NET SDK? 1. CorDBG – command-line debugger. To use CorDbg, you must compile the original C# file using the /debug switch. 2. DbgCLR – graphic debugger. Visual Studio .NET uses the DbgCLR. What is DiffGram? A DiffGram is an XML format that is used to identify current and original versions of data elements. The DataSet uses the DiffGram format to load and persist its contents, and to serialize its contents for transport across a network connection. When a DataSet is written as a DiffGram, it populates the DiffGram with all the necessary information to accurately recreate the contents, though not the schema, of the DataSet, including column values from both the Original and Current row versions, row error information, and row order. Diffrence Between ServerSide and ClientSideCode? server side code is responsible to execute and provide the executed code to the browser at the client side. the executed code may be either in XML or Plain HTML. the executed code only have the values or the results that are executed on the server. The clients browser executes the HTML code and displays the result. where as the client side code executes at client side and displays the result in its browser. it the client side core consist of certain functions that are to be executed on server then it places request to the server and the server responses as the result in form of HTML. What is EnabledViewState? "EnableViewState" property - holds the state of the web control. View state holds the proprty details as a group of a particular web control. And can be sent via HTTPEnable view state must eb enableed for transfering throught he HTTP requests.If, the webserver control is using the database request, then it is advisable to make the Enable viewState = false, to improve the processor performance, cause the database will overide the state. Server Control and User Control ? An ASP.NET control (sometimes called a server control) is a server-side component that is shipped with .NET Framework. A server control is a compiled DLL file and cannot be edited. It can, however, be manipulated through its public properties at design-time or runtime. It is possible to build a custom server control (sometimes called a custom control or composite control). (We will build these in part 2 of this article). In contrast, a user control will consist of previously built server controls (called constituent controls when used within a user control). It has an interface that can be completely edited and changed. It can be manipulated at design-time and runtime via properties that you are responsible for creating. While there will be a multitude of controls for every possible function built by third-party vendors for ASP.NET, they will exist in the form of compiled server controls, as mentioned above. Custom server controls may be the .NET answer to ActiveX Web controls.

40

Diffrence Between ASP ASp.NET ? The points of difference are as follows: ASP.Net web forms have a code behind file which contains all event handling code. ASP does not have such facility to separate programming logic from design. ASP.Net web forms inherit the class written in code behind. ASP does not have the concept of inheritance. ASP.Net web forms use full fledged programming language, while ASP pages use scripting language. ASP.Net web applications are configurable (web.config) while ASP applications are not. ASP.Net webforms can use custom controls through the @register directive, which is not available with ASP. ASP.Net web forms have ADO.Net which supports XML integration and integration of data from two or more data sources, while ASP has ADO which is a simple COM object with limited facilities. ACID in transactions. Ans.A transaction must be: 1.Atomic - it is one unit of work and does not dependent on previous and following transactions. 2.Consistent - data is either committed or roll back, no “in-between” case where something has been updated and something hasn’t. 3.Isolated - no transaction sees the intermediate results of the current transaction). 4.Durable - the values persist if the data had been committed even if the system crashes right after. What is correlated sub-query ? A correlated sub-query is dependent upon the outer query. The outer query and the sub-query are related typically through a WHERE statement located in the sub-query. The way a correlated sub-query works is when a reference to the outer query is found in the sub-query, the outer query will be executed and the results returned to the sub-query.The sub-query is executed for every row that is selected by the outer query. What is Cursor? Cursor is a database object used by applications to manipulate data in a set on a row-by-row basis, instead of the typical SQL commands that operate on all the rows in the set at one time. For example, you can use cursor to include a list of all user databases and make multiple operations against each database by passing each database name as a variable Types of Directive? Directives in ASP.NET control the settings and properties of page and user control compilers. They can be included anywhere on a page, although it is standard to place them at the beginning. Directives are used in both .aspx files (ASP.NET pages) and .ascx files (user control pages). ASP.NET pages actually support eight different directives. @ Page, @ Control, @ Import, @ Implements, @ Register, @ Assembly, @ OutputCache, @ Reference What is AUTOEVENTWIREUP? AutoEventWireup is a Boolean attribute that indicates whether the ASP.NET pages events are auto-wired. Note: In the above case, ASP.NET compiles the code-behind page on the fly. We have to note that this compilation step only occurs when the code-behind file is updated. Whether the file has been updated or not, well this is detected through a timestamp change. The AutoEventWireup attribute may have a value of true or false. When an ASP.NET Web Application is created by using Microsoft Visual Studio .NET, the value of the AutoEventWireup attribute is set as false. We can specify the default value of the AutoEventWireup attribute in the following locations: The Machine.config file. The Web.config file. Individual Web Forms (.aspx files). Web User Controls (.ascx files) The value of the AutoEventWireup attribute can be declared in the <pages> section in the Machine.config file or the Web.config file. We must not set the value of the AutoEventWireup attribute to true if performance is key consideration. If we set the value of the AutoEventWireup attribute to true, the ASP.NET page framework must make a call to the CreateDelegate method for every Web Form (.aspx page), and instead of relying on the automatic hookup, manually override the events from the page. Diffrence between Code Directory and Bin Directory With the introduction of this new Code directory, you might be wondering when to use which directory . If you have an assembly that you want to use in your Web site, create a Bin subdirectory and then copy the . dll to that subdirectory. If you are creating reusable components that you want to use from your ASP.NET pages, all you need to do is to create those components under the Code directory. Whenever a change occurs in the Code

40

directory, ASP.NET will dynamically recompile the components and automatically make them available to all the pages in the Web site. Note that you should put only components into the Code subdirectory . You should not put pages, Web user controls, or other non-code files ontaining non-code elements into this subdirectory. Diffrence between DataReader and DataAdapter DateReader is an forward only and read only cursor type if you are accessing data through DataRead it shows the data on the web form/control but you can not perform the paging feature on that record(because it's forward only type).Reader isbest fit to show the Data (where no need to work on data) DataAdapter is not only connect with the Databse(through Command object) it provide four types of command (InsertCommand, UpdateCommand, DeleteCommand, SelectCommand), It supports to the disconnected Architecture of .NET show we can populate the records to the DataSet. where as Dataadapter is best fit to work on data. Does SQLClient and OLEdb class share the same function ? No they are entirely different. Each has its own functionality. With OLEDB we can connect to any Datasource while SqlClient can be used to connect to Sql Server Database Only. Diffrence between function and StoreProcedure ? Both functions and stored procedures can be custom defined and part of any application.Functions, on the other hand, are designed to send their output to a query or T-SQL statement. For example, User Defined Functions (UDFs) can run an executable file from SQL SELECT or an action query,while Stored Procedures (SPROC) use EXECUTE or EXEC to run. Both are instantiated using CREATE FUNCTION. stored procedures are designed to return its output to the application. A UDF returns table variables, while SPROC can't return a table variable although it can create a table. Another significant difference between them is that UDFs can't change server environment or your operating system environment, while a SPROC can. Operationally, when T-SQL encounters an error the function stops, while T-SQL will ignore an error in a SPROC and proceed to the next statement in your code (provided you've included error handling support). You'll also find that although a SPROC can be used in an XML FOR clause, a UDF cannot be. Type of garbage collector? There are two types of Garbage Collector Managed Garbage Collector see we will declaring variable ,object in our programes once this kind of variable,object goes out of the scope ,they are put into the heap and they are checked for the further existence.once its beeing no longer used garbage collector wil deallcate mem for that variable and objects. Umanaged Garbage Collector this was done mannually and u will be happen to open a connection with database,will be open the file etc. while this kind of the thing goes out of the scope we have to explicitly call the garage colector by calling the closecommand of the datbase once the connection is closed it puts this memmory ino the heep and process follws the same How many records can take clustured index in sql ? A clustered index is a special type of index that reorders the way the records in the table are physically stored . therefore the table can have only one clustered index. Option statements that are supported in VB.NET? Option Explicit:- By default, Option Explicit is on for VB.NET projects. It's a good programming practice to set Option Explicit on because it helps developers avoid implicitly declaring variables, and thus write better code.This forces developers to explicitly declare variables utilizing the Dim keyword and specifying the datatype for the variable. Option Compare:-By default,the Option Compare is Binary;however,you can set Option Compare to Text instead. Option Strict:- Option Strict Off is the default mode for the code in VB.NET; however, it's preferable to write code with Option Strict on. Option Strict On prevents implicit type conversions by the compiler. It's also a safer way to develop code, which is why most developers prefer it. Relationship between a Process/Application Domain/Application? A process is only a instance of running application. An application is an executable on the hard drive or network. There can be numerous processes launched of the same application (5 copies of Word running), but 1 process can run just 1 application. To set the culture and UI culture for an ASP.NET Web page declaratively To set the UI culture and culture for all pages, add a globalization section to the Web.config file, and then set the uiculture and culture attributes, as shown in the following example: <globalization uiculture="es" culture="es-MX" /> To set the UI culture and culture for an individual page, set the Culture and UICulture attributes of the @ Page

40

directive, as shown in the following example: <%@ Page UICulture="es" Culture="es-MX" %> What is the managed and unmanaged code in .net? The .NET Framework provides a run-time environment called the Common Language Runtime, which manages the execution of code and provides services that make the development process easier. Compilers and tools expose the runtime's functionality and enable you to write code that benefits from this managed execution environment. Code that you develop with a language compiler that targets the runtime is called managed code; it benefits from features such as cross-language integration, cross-language exception handling,enhanced security, versioning and deployment support, a simplified model for component interaction, and debugging and profiling services What is serialization in .NET? What are the ways to control serialization? Serialization is the process of converting an object into a stream of bytes. Deserialization is the opposite process of 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)Serialization can be defined as the process of storing the state of an object to a storage medium. During this process, the public and private fields of the object and the name of the class, including the assembly containing the class, are converted to a stream of bytes, which is then written to a data stream. When the object is subsequently deserialized, an exact clone of the original object is created. Binary serialization preserves type fidelity, which is useful for preserving the state of an object between different invocations of an application. For example, you can share an object between different applications by serializing it to the clipboard. You can serialize an object to a stream,disk,memory,over the network,and so forth.Remoting uses serializatn. to pass objects "by value" from one computer or application domain to another. XML serialization serializes only public properties and fields and does not preserve type fidelity. This is useful when you want to provide or consume data without restricting the application that uses the data. Because XML is an open standard,it is an attractive choice for sharing data across the Web. SOAP is an open standard,which makes it an attractive choice. There are two separate mechanisms provided by the .NET class library-XmlSerializer and SoapFormatter/BinaryFormatter.Microsoft uses XmlSerializer for Web Services, and uses SoapFormatter/BinaryFormatter for remoting. Both are available for use in your own code. What is Global Assembly Cache (GAC) and what is the purpose of it? Each computer where the common language runtime is installed has a machine-wide code cache called the global assembly cache. The global assembly cache stores assemblies specifically designated to be shared by several applications on the computer. You should share assemblies by installing them into the global assembly cache only when you need to. Write a SQL Query to find first Week Day of month? SELECT DATENAME(dw, DATEADD(dd, - DATEPART(dd, GETDATE()) + 1, GETDATE())) AS FirstDay How to find 6th highest salary from Employee table SELECT TOP 1 salary FROM (SELECT DISTINCT TOP 6 salary FROM employee ORDER BY salary DESC) a ORDER BY salary How to rename a table from query exec sp_rename 'oldTableName' , 'newTableName' What is Reflection in .NET? 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. What are Namespaces? The namespace keyword is used to declare a scope. This namespace scope lets you organize code and gives you a way to create globally-unique types. Even if you do not explicitly declare one, a default namespace is created.This unnamed namespace, sometimes called the global namespace, is present in every file. Any identifier in the global namespace is available for use in a named namespace. Namespaces implicitly have public access and this is not modifiable. The ASP.NET page Lifecycle ? (1) PreInit() In Page level event, all controls created during design time are initialized with their default values. For e.g., if you have a TextBox control with Text property = “Hello”, it would be set by now. We can create dynamic controls here. This event occurs only for the Page class not for UserControl/MasterPage protected override void OnPreInit(EventArgs e)

40

{

} we can set theme programaticaly in preInit. If the page is MasterPage after the Init() event starts, you can access these controls directly from the page class. Why? The reason being that all controls placed in the Content Page are within a ContentPlaceholder which is a child control of a MasterPage. Now Master Page is merged and treated like a control in the Content Pages. As I mentioned earlier, all events except the Init() and Unload() are fired from outermost to the innermost control. So PreInit() in the Page is the first event to fire but User Controls or MasterPage (which is itself a Usercontrol) do not have any PreInit event . Therefore in the Page_PreInit() method, neither the MasterPage nor any user control has been initialized & only the controls inside the Page class are set to their default values.Only after the Page_PreInit() event the Init() events of other controls fire up. (2)OnInit() In this event, we can read the controls properties (which is set at design time). We cannot read control values changed by the user because that changed value will get loaded after LoadPostData() event fires. But we can access control values from the forms POST data as: string selectedValue = Request.Form[controlID].ToString(); (3)LoadViewState This will only fire if the Page has posted back.Here the runtime de-serializes the view state data from the hidden form element and loads all controls who have view state enabled. (4)LoadPostBackData In this event the controls which implement IPostBackDataHandler interface gets loaded by the values from the HTTP POST data. Note that a textbox control does not gets its value from the view state but from the post data in the form in this event. So even if you disable view state for a particular control, it can get its value from the HTTP POST data if it implements IPostBackDataHandler interface. Also,an important point to note is that if we have a DropDownList control and we have dynamically added some items to it, the runtime cannot load those values unless the view state is enabled (even if the control derives from IPostBackDataHandler). The reason being that HTTP Post data has only one value per control,and the entire value collection is not maintained in the PostData but in view state. (5)Page_Load This method isfirst one for all beginner developers to put their code. Beginners may also think that this is the first method which fires for a Page class. This can lead to a lot of confusion which makes understanding the Page lifecycle all the more important. Note:If the page has user control, then it's Load method will fire after the Page class's Load method. The reason as explained earlier is the fact that all method except the Init() are fired from the outermost control to the innermost. So after Page_Load(), load methods of all other controls are fired recursively. (6)Control Event Handlers These are basically event handlers(like Button1_Click()) which are defined for controls in the ASPX markup. Another source of confusion arises when the developer thinks that an event handler like Button_Click() should fire independently (like in windows apps) as soon as he clicks a Button on the web form, forgetting that Page_Load will fire first before any event handlers. (7)PreRender This event is again recursively fired for all child controls in the Page. If we want to make any changes to control values, this is the last event we have to peform the same. (8)SaveViewState Here, the ViewState of the controls gets saved in the form's hidden control. (9)Render In this method all controls are rendered recursively (i.e. Render method of each control is called). (10)Unload Here you can have the page and controls perform clean-up operations. This event has no relevance besides clean up operations because the Page has already rendered. Diffrence between instance and object instance means just creating a reference(copy) . object :means when memory location is associated with the object( is a runtime entity of the class) by using the new operator interface is a set of abstract methods, all of which have to be overriden by the class whichever implements the interface abstract class is a collection of data and methods which are abstact (not all of the ASP.NET Globalization and Localization Globalization is the process of designing and developing applications that function for multiple cultures, and localization is the process of customizing your application for a given culture and locale. The topics in this section describe how to create ASP.NET Web applications that can be adapted to different languages and cultures.

//custom code base.OnPreInit(e);

40

What is DLL Hell ? Dll hell problem is actualy registation and versionig probelem which is occure in vb6.0.this problem is solve in .netframework in this every project has its own dll(dynamic link library) file.and this file is not overwrite by dll file of another project when we instaling .netproject on machine where already install a .netframework project. What’s the difference between a primary key and a unique key? Both primary key and unique enforce uniqueness of the column on which they are defined. But by default primary key creates a clustered index on the column, where are unique creates a nonclustered index by default. Another major difference is that, primary key doesn’t allow NULLs, but unique key allows one NULL only. can you explain difference between .Net framework and .Net Compact Framework ? Answer:-As the name suggest to us that .Net compact framework has been created with enabling managed code on devices just like PDAs,mobiles etc. These are compact devices for which a .NET compact framework is used.This is main diffrence between these two. What is Pull and Push Model in ado.net ? Answer:- Pull model is used to pick out the element or we can also say objects from Database tabel. Push model is used to insert the element only at the top position in table to database with the help of object. But when we have to delete the top most record pull method is used over push. Similar to stack operation What is Managed Heap? The .NET framework includes a managed heap that all .NET languages use when allocating reference type objects. Lightweight objects known as value types are always allocated on the stack, but all instances of classes and arrays are created from a pool of memory known as the managed heap. What is Delegate? A delegate is a class that can hold a reference to a method. Unlike other classes, a delegate class has a signature, and it can hold references only to methods that match its signature. A delegate is thus equivalent to a type-safe function pointer or a callback. What is singlecall and singleton ? Differneces between Single Call & Singleton. Single Call objects service one and only one request coming in. Single Callobjects are useful in scenarios where the objects are required to do afinite amount of work. Single Call objects are usually not required tostore state information, and they cannot hold state information betweenmethod calls. However, Single Call objects can be configured in aload-balanced fashion.Singleton objects are those objects that service multiple clients and henceshare data by storing state information between client invocations. Theyare useful in cases in which data needs to be shared explicitly betweenclients and also in which the overhead of creating and maintaining objectsis substantial. What r the ASP.NET List Control ? ASP.NET List controls ==> There are 3 . 1. DropDownList, 2. ListBox and 3.HTMLSelect. 1. System.Web.UI.WebControls. DropDownList this control renders a drop-down list in the page at runtime. Only the selected item is visible when the user is not interacting with the list, and the other items become visible when the user clicks the control to see items that can be selected. Only one item can be selected in this control. This control must be inserted into a server side form (runat="server") applied. 2. System.Web.UI.WebControls.ListBoxthis control renders a list of items within a scrolling box, multiple items can be selected in this control if required. This control must be inserted into a server side form (runat="server") applied. 3. System.Web.UI.HTMLControls.HTMLSelectthis control can be used to render a drop-down list or a scrolling list of items. This control has less built in functionality when compared with controls above (It lacks many of the properties that can be used to influence the display style such as ForeColor and BackColor to name a couple),but it is still capable of performing most common uses of a list control. This control can be inserted anywhere, and does not require a server side form. What is event bubbling? Event Bubbling is nothing but events raised by child controls is handled by the parent control. Example: Suppose consider datagrid as parent control in which there are several child controls.There can be a column of link buttons right.Each link button has click event.Instead of writing event routine for each link button write one routine for parent which will handlde the click event of the child link button events.Parent can know which child actaully triggered the event.That thru arguments passed to event routine. which dll handles the request of .aspx page ? When the Internet Information Service process (inetinfo.exe) receives an HTTP request, it uses the filename extension of the requested resource to determine which Internet Server Application Programming Interface

40

(ISAPI) program to run to process the request. When request is for an ASP.NET page (.aspx file), IIS passes the request to the ISAPI DLL capable of handling the request for ASP.NET pages, which is aspnet_isapi.dll. What is datacube technology? A multi-dimensional structure called the data cube. it is a data abstraction that allows one to view aggregated data from a number of perspectives.Conceptually,the cube consists of a core or base cuboid, surrounded by a collection of sub-cubes/cuboids that represent the aggregation of base cuboid along one or more dimensions. We refer to the dimension to be aggregated as the measure attribute, while the remaining dimensions are known as the feature attributes. What is data modeling and data mining ? Data modeling is the process of designing a data base model. In this data model data will be stored in two types of table fact table and dimention table.fact table contains the transaction data and dimention table contains the master data. Data mining is process of finding the hidden trends is called the data mining. what is MSIL? MSIL supports OO programming, so we can have a class which has public and private methods. The entry point of the program needs to be specified. In fact it doesn't really matter whether the method is called Mam or Dad. The only thing that matters here is that .entrypoint is specified inside method. MSIL programs are compiled with ilasm compiler. Since we are writing a managed assembly code, we have to make sure that no variables are allocated in memory when the program goes out of scope. Here is a more complicated program that, once again, does not do anything but has some dataThe sample MSIL program.method static void main(){ .entrypoint .maxstack 1 ldstr "Hello world!" call void [mscorlib]System.Console::WriteLine(string) ret} What is Sealed class ? A class can be made sealed in c# using the sealed keyword. When you do that, it implies that the class cannot be inhereted. You can extend this functionality to the individual methods as well. In case you want a class to be inhereted, excluding one of its methods, just make that particular method sealed. Diffrence bteween Shadowing and Hiding ? Shadowing :-This is VB.Net Concept by which you can provide a new implementation for base class member without overriding the member. You can shadow a base class member in the derived class by using the keyword "Shadows". The method signature, access level and return type of the shadowed member can be completely different than the base class member. Hiding : - This is a C# Concept by which you can provide a new implementation for the base class member without overriding the member. You can hide a base class member in the derived class by using the keyword "new". The method signature,access level and return type of the hidden member has to be same as the base class member.Comparing the three :1) The access level , signature and the return type can only be changed when you are shadowing with VB.NET. Hiding and overriding demands the these parameters as same. 2) The difference lies when you call derived class object with a base class variable.In class of overriding although you assign a derived class object to base class variable it will call derived class function. In case of shadowing or hiding the base class function will be called. Why multiple Inheritance not work in C# ? When we use the Multiple inherutance we use more than one class. Lets one condition class A and class B are base classes and class c is is multiple inherting it.And where class c is inheriting a function .It may be possible that this function with same name and same signature can present in both class A and Class B . That time how the compiler will know that which function it should take wherether from class A or class B.So Multiple inheritance show's an error. What is SQL injection ? SQL injection is a security vulnerability that occurs in the database layer of an application. The vulnerability is present when user input is either incorrectly filtered for string literal escape characters embedded in SQL statements or user input is not strongly typed and thereby unexpectedly executed. It is in fact an instance of a more general class of vulnerabilities that can occur whenever one programming or scripting language is embedded inside another. What is Web Application ? Web application consists of document and code pages in various formats. The simplest kind of document is a static HTML page, which contains information that will be formatted and displayed by a Web browser. An

40

HTML page may also contain hyperlinks to other HTML pages.A hyperlink(or just link) contains an address, or a Uniform Resource Locator (URL), specifying where the target document is located. The resulting combination of content and links is sometimes called hypertext and provides easy navigation to a vast amount of information on the World Wide Web. what is Cold Backup ? Offline or cold backups are performed when the database is completely shutdown. The disadvantage of an offline backup is that it cannot be done if the database needs to be run 24/7. Additionally, you can only recover the database up to the point when the last backup was made unless the database is running in ARCHIVELOG mode. How to detect the User's culture ? string sLang ; sLang = Request.UserLanguages[0]; Response.Write (sLang); what is Deep Coy and Shallow copy ? Shallow copy create a new reference to the same object. Deep copy create a new reference to a new object. Difference between DELETE TABLE and TRUNCATE TABLE commands ? DELETE TABLE is a logged operation, so the deletion of each row gets logged in the transaction log, which makes it slow. TRUNCATE TABLE also deletes all the rows in a table, but it won't log the deletion of each row, instead it logs the deallocation of the data pages of the table, which makes it faster. Of course, TRUNCATE TABLE can be rolled back. Define candidate key, alternate key, composite key? candidate key is one that can have row of a table unique. Generally a candidate key is primary key of the table. If the table has more than one candidate key, one of them will become the primary key, and the rest are called alternate keys.A key formed by combining at least two or more columns is called composite key. what is Early & Late Binding ? Early binding is to know the type of an object at compile time. The compiler have all the needed element at compile time to build the call into the excutable code. late binding, the type of an object is known only at runtime. It will need extra instructions to find out where is the method to be called before calling it. What is exception handling ? When an exception occurs, the system searches for the nearest catch clause that can handle the exception, as determined by the run-time type of the exception. First, the current method is searched for a lexically enclosing try statement, and the associated catch clauses of the try statement are considered in order. If that fails, the method that called the current method is searched for a lexically enclosing try statement that encloses the point of the call to the current method.This search continues until a catch clause is found that can handle the current exception, by naming an exception class that is of the same class, or a base class, of the run-time type of the exception being thrown. A catch clause that doesn't name an exception class can handle any exception.Once a matching catch clause is found, the system prepares to transfer control to the first statement of the catch clause. Before execution of the catch clause begins, the system first executes, in order, any finally clauses that were associated with try statements more nested that than the one that caught the exception.Exceptions that occur during destructor execution are worth special mention. If an exception occurs during destructor execution, and that exception is not caught, then the execution of that destructor is terminated and the destructor of the base class (if any) is called. If there is no base class or if there is no base class destructor, then the exception is discarded. What is an extended stored procedure ? Extended stored procedure is a function within a DLL (written in a language like C, C++ using Open Data Services (ODS) API) that can be called from T-SQL, just the way we call normal stored procedures using the EXEC statement. See books online to learn how to create extended stored procedures and how to add them to SQL Server. what is Hot Backup ? An online backup or hot backup is also referred to as ARCHIVE LOG backup. An online backup can only be done when the database is running in ARCHIVELOG mode and the database is open. When the database is running in ARCHIVELOG mode, the archiver (ARCH) background process will make a copy of the online redo log file to archive backup location. How to get the hostname or IP address of the server ? HttpContext.Current.Server.MachineName HttpContext.Current.Request.ServerVariables["LOCAL_ADDR"]

40

The first one should return the name of the machine, the second returns the local ip address. Note that name of the machine could be different than host, since your site could be using host headers. What is a parser error ? Its basically a syntax error in your ASPX page. It happens when your page is unreadable for the part of ASP.NET that transforms your code into an executable. What is xxx(src As Object, e As EventArgs)? xxx is an event handler src is the object that fires the event e is an event argument object that contains more information about the event. Isolation levels in SQL SERVER? Isolation level get the condition to which data is isolated for use by one process and secured against interference from other processes. Read Committed SQL Server applied a share lock while reading a row into a cursor but frees the lock immediately after reading the row. Because a shared lock request is blocked by an exclusive lock, a cursor is prevented from reading a row that another task has updated but not yet committed. Read committed is the default isolation level setting for both SQL Server and ODBC. Read Uncommitted When no locks while reading a row into a cursor and honors no exclusive locks. Cursors can be populated with values that have already been updated but not yet committed. The user is bypassing all of SQL Server’s locking transaction control mechanisms. Repeatable Read or Serializable SQL Server requests a shared lock on each row as it is read into the cursor as in READ COMMITTED, but if the cursor is opened within a transaction, the shared locks are held until the end of the transaction instead of being freed after the row is read. This has the same effect as specifying HOLDLOCK on a SELECT statement. What is Collate in SQL SERVER-2000 ? The COLLATE clause can be applied only for the char, varchar, text, nchar, nvarchar, and ntext data types. The physical storage of character strings in Microsoft® SQL Server™ 2000 is controlled by collations. A collation specifies the bit patterns to represent each character and the rules by which characters are sorted and compared with another character. How to register Assemblies in GAC ? The assemblies are stored in the global assembly cache, which is a versioned repository of assemblies made available to all applications on the machine not like Bin and App_Code. Several assemblies in the Framework are automatically made available to ASP.NET applications. You can register additional assemblies by registration in a Web.config file in your application. <configuration > <compilation > <assemblies > < add assembly="System.Data, Version=1.0.2411.0,Culture=neutral,PublicKeyToken=b77a5c561934e089"/ > </assemblies > </compilation > </configuration > How Server control handle events ? ASP.NET server controls can optionally expose and raise server events, which can be handled by evelopers.Developer may accomplish this by declaratively wiring an event to a control (where the attribute name of an event wireup indicates the event name and the attribute value indicates the name of a method to call). Private Sub Btn_Click(Sender As Object, E As EventArgs) Message.Text = "http://www.dotnetquestion.info" End Sub What is Machine.config File ? As web.config file is used to configure one asp .net web application, same way Machine.config file is used to configure application according to a particular machine. That is, configuration done in machine.config file is affected on any application that runs on a particular machine. Usually, this file is not altered and only web.config is used which configuring applications. What is Store Procedure ? A stored procedure is a set of structured query language statements that you assign a name and store it in

40

to the database in a compiled form so that it can share between no of programs. Some advantage of Store Procedure. they allow faster execution they can reduce network traffic What are Indexes in SQL SERVER? Microsoft SQL Server index helps in creating the structure of table that helps in speeds retrieval of the rows in the table. An index create a keys from one or more columns in the table. These keys are stored in a structure that allows SQL Server to find the row or rows created with the key values quickly and efficiently.If a table doest not containeated indexes,the data rows are not stored in any specific order.This structure is stored on heap. There are two types of SQL Server indexes: (1)Clustered:Clustered indexes helps in sorting and storeing the data rows in the table take key values as base. Because the data rows are stored in sorted order on the clustered index key, clustered indexes more efficient for finding rows. There is only one clustered index per table. The data rows themselves form the lowest level of the clustered index. The only time the data rows in a table are stored in sorted order is when table contains a clustered index. If a table has no clustered index, its data rows are stored in a heap. (2)Nonclustered:Nonclustered indexes having structure that is diffrent from the data rows . The lowest rows of a nonclustered index have the nonclustered index key values and each key value entry has pointers to the data rows containing the key value. The data rows are not stored in order based on the nonclustered key. The pointer from an index row in a nonclustered index to a data row is called a row locator. The structure of the row locator depends on whether the data pages are stored in a heap or are clustered. In heap,a row locator is a pointer that point to the row. For a table with a clustered index, the row locator is the clustered index key. What is Code Refactoring? Ans.Its a feature of Visual Web Express & Visual Studio 2005. Code Refactoring Code Refactoring enables you to easily and systematically make changes to your code. Code Refactoring is supported everywhere that you can write code including both code-behind and single-file ASP.NET pages. For example, you can use Code Refactoring to automatically promote a public field to a full property. What is Property ? A property is a thing that describes the features of an object. A property is a piece of data contained within class that has an exposed interface for reading/writing. Looking at that definition, you might think you could declare a public variable in a class and call it a property. While this assumption is somewhat valid, the true technical term for a public variable in a class is a field. The key difference between a field and a property is in the inclusion of an interface. We make use of Get and Set keywords while working with properties. We prefix the variables used within this code block with an underscore. Value is a keyword, that holds the value which is being retrieved or set. Private _Color As String Public Property Color() Get Return _Color End Get Set(ByVal Value) _Color = Value End Set End Property Gave an idea about NameSpace and Assembly ? Answer:-Namespace is not related to that of an assembly. A single assembly may contain many types whose hierarchical names have different namespace roots, and a logical namespace root may span multiple assemblies. In the .NET Framework, a namespace is a logical design-time naming convention, whereas an assembly establishes the name scope for types at run time. Namespace:-(1)Namespace is logical grouping unit. (2)It is a Collection of names wherein each name is Unique. (3)They form the logical boundary for a Group of classes. (4)Namespace must be specified in Project-Properties. Assembly:-(1)Assembly is physical grouping unit. (2)It is an Output Unit. It is a unit of Deployment & a unit of versioning. Assemblies contain MSIL code. (3)Assemblies are Self-Describing.

40

What does the term immutable mean? Ans.It means to create a view of data that is not modifiable and is temporary of data that is modifiable.Immutable means you can't change the currrent data,but if you perform some operation on that data, a new copy is created. The operation doesn't change the data itself. Like let's say you have a string object having "hello" value. Now if you say temp = temp + "new value" a new object is created, and values is saved in that. The temp object is immutable, and can't be changed. An object qualifies as being called immutable if its value cannot be modified once it has been created. For example, methods that appear to modify a String actually return a new String containing the modification. Developers are modifying strings all the time in their code. This may appear to the developer as mutable - but it is not. What actually happens is your string variable/object has been changed to reference a new string value containing the results of your new string value. For this very reason .NET has the System.Text.StringBuilder class. If you find it necessary to modify the actual contents of a string-like object heavily, such as in a for or foreach loop, use the System.Text.StringBuilder class. Diffrence between Abstract and Interface? 1.We can't create instances for both 2.Single inheritance in abstract class, multible inheritance in interface 3.We can have concrete method in abstact class but not in the interface. 4.Any class that needs to use abstract must extent 5.Any class that needs to use interface must implement 5.Interface all the variables are static and final. Diffrence between Viewstate and Session? View State are valid mainly during postbacks and information is stored in client only. Viewstate are valid for serializable data only. Moreover Viewstate are not secured as data is exposed to client. although we can configure page directive and machine key to make view state encrypted. Where in case of session this is user specific data that is stored in server memory . Session state is valid for any type of objects. We can take help of session through different web pages also. Define basic functions for master, msdb, tempdb databases in Sql Server ? 1)master:-It contains system level information for a SQL Server system and also contains login accounts and all system configuration settings. master is the database that records the existence of all other databases, including the location of the database files. (2) tempdb - This database holds all temporary tables and temporary stored procedures. It also fills any other temporary storage needs such as work tables generated by SQL Server. tempdb is re-created every time SQL Server is started so the system starts with a clean copy of the database. (3)model - The model database is used as the template for all databases created on a system. When a CREATE DATABASE statement is issued, the first part of the database is created by copying in the contents of the model database, then the remainder of the new database is filled with empty pages. Because tempdb is created every time SQL Server is started, the model database must always exist on a SQL Server system. (4)msdb - The msdb database is used by SQL Server Agent for scheduling alerts and jobs, and recording operators. What is LDAP ? LDAP is a networking protocol for querying and modifying directory services running over TCP/IP.To explain LDAP we take a example of telephone directory, which consists of a series of names organized alphabetically, with an address and phone number attached.To start LDAP on client it should be connect with server at TCP/IP port 389.The client can send multiple request to the server.The basic operations are:Start TLS - protect the connection with Transport Layer Security (TLS), to have a more secure connection Bind - authenticate and specify LDAP protocol version Search - search for and/or retrieve directory entries Compare - test if a named entry contains a given attribute value Add a new entry Delete an entry Modify an entry Modify DN - move or rename an entry Abandon - abort a previous request Extended Operation - generic operation used to define other operations Unbind - close the connection (not the inverse of Bind) What is RAD ?

40

Rapid application development (RAD), is a software development process developed initially by James Martin in the 1980s. The methodology involves iterative development, the construction of prototypes, and the use of Computer-aided software engineering (CASE) tools. Traditionally the rapid application development approach involves compromises in usability, features,& /or execution speed.Increased speed of development through methods including rapid prototyping,virtualization of system related routines, the use of CASE tools, and other techniques. Increased end-user utility Larger emphasis on simplicity and usability of GUI design.Reduced Scalability, and reduced features when a RAD developed application starts as prototype and evolves into a finished application Reduced features occur due to time boxing when features are pushed to later versions in order to finish a release in a short amount of time. What are publisher,distributor and subscriber in "Replication" ? Answer:-Publisher is main source of data and we can say its the owner of the database. And its takes decision how to distribute data accross. Distributor is a bridge between publisher and the subscriber.Distributor is one who gathers all the data which is published by publisher and take it before send it to subscriber. So it is clear that it is bridge between publisher and subscriber and its supports multiple publisher and subscriber concepts. Subscriber is end source or the final place where data has to be transmitted. When we create a connection in ADO.NET a metadata is created what information it contains ? Answer:- Metadata collections contains information about items whose schema can be retrieved. These collections are as follows: Tables : Provides information of tables in database. Views : Provides information of views in the database. Columns : Provides information about column in tables. ViewColumns : Provides information about views created for columns. Procedures : Provides information about stored procedures in database. ProcedureParameters : Provides information about stored procedure parameters. Indexes : Provides information about indexes in database. IndexColumns : Provides information about columns of the indexes in database. DataTypes : Provides information about datatypes. Users : Provides information about database users. what is a jitter and how many types of jitters are there ? Answer:-JIT is just in time complier.it categorized into three:1 Standard JIT : prefered in webApp-----on diamand 2 Pre JIT : only one time------only use for window App 3 Economic JIT : use in mobile App What is the difference between Dataset.clone and Dataset.copy ? Answer:-The one and the main diffrenet between these two is clone only copy the structure but not the data on the other hand copy copies all the data and also the structure. How does .NET and SQL SERVER thread is work ? Answer :-There are two types of threading pre-emptive and Non-preemptive but Sql Server support Non-preemptive and .NET thread model is different. Because Sql have to handle thread in different way for SQLCLR this different thread are known as Tasking of Threads . In this thread there is a switch between SQLCLR and SQL SERVER threads .SQL SERVER uses blocking points for transition to happen between SQLCLR and SQL SERVER threads. What is CUBE and define its functioning ? Answer:- Its return all the combination total of group by result Syntax:- select firstcol,secondcol,sun(thirdcol) from tablename group by firstcol,secondcol with cube order by firstcol. What are the GLOBAL and LOCAL cursor in SQL SERVER 2005 ? Answer:-When we are creating a cursor by default it is Global. When is global by default we can access it from outside also. But on the other side local cursor are only accesible inside the objects these objects can be anything just like Stored Procedure,Trigger and funtion. we can also declare cusror as local or global its up to us. Can you define ROLLUP in SQL SERVER 2005 ? Answer:-ROLLUP work with the "Group By " clause its main functioning comes into existance when we use Group by. We can get sub-total of row by using the Rollup funtion.When result is return by Group By class first row display the grand total or we can say that the main total. syntax:-select firstcolumn,secondcolumn,sum(thirdcolumn) from tablename group by firstcolumn, secondcolumn with rollup order by firstcolumn.

40

Can You explain the syntax of ISNULL() in SQL SERVER ? Answer:-Returns a Boolean value that indicates whether an expression contains no valid data we can also use this as conditional operator and also as if else loop. syntax:isNull("dotnet","SQL") if condition is true then its return dotnet if not then SQL How ROW_NUMBER function helps and what is its functioning ? Answer:-Row_NUMBEr functions add a column that display a number column to and correspondance column althogh the column is not unique it takes order by clause also with it. Syntax:- select firstcol,secondcol,row_number() over(order by secondcol) as rownumber from tablename How to Add a Assembly in GAC ? Answer:-There are three ways to add an assembly to the GAC: (1)Install them with the Windows Installer 2.0 (2)Use the Gacutil.exe tool (3)Drag and drop the assemblies to the cache with Windows Explorer - Create a strong name using sn.exe tool eg: sn -k keyPair.snk - with in AssemblyInfo.cs add the generated file name eg: [assembly: AssemblyKeyFile("dotnet.snk")] - recompile project, then install it to GAC by either drag & drop it to assembly folder (C:\WINDOWS\assembly OR C:\WINNT\assembly) (shfusion.dll tool) or gacutil -i abc.dll What is Class ? A class is an organized store-house in object-oriented programming that gives coherent functional abilities to a group of related code. It is the definition of an object, made up of software code. Using classes, we may wrap data and behaviour together (Encapsulation).We may define classes in terms of classes (Inheritance).We can also override the behaviour of a class using an alternate behaviour (Polymorphism). What are the methods provided by command object ? Answer:-There are the different method are provided by command objects. (1)ExecuteNonQuery:-This methods executes the commandtext property which is passed with the connection object and this does not return any rows.It will used for UPDATE,INSERT or DELETE.Its return the integer value. (2)ExecuteReader:-Its execute the command text.But its return reader object that is read only. (3)ExecuteScalar:-Its execute the command text but this return only single value only the first value of first column. And any other returned column return are discarded.This is fast and efficent for singleton value . Why it is preferred not to use finalize for cleanup ? Answer:-There is problem with the finalize regards to object when we use finalize to destroy the object it will take two round to remove the objects.To understand it we will take a simple example let there are three objects obj1,obj2,obj3 we use finalize for obj2.Now when garbage collector is run first time it will only clean obj1,obj3 becuase obj2 is pushes to the finalization queue. Now when garbage collector runs second time it will take if any object is pending for finalization then it will check the finalization queue if any item it will destroy that one. What are advantage and disadvantage of Hidden fields ? Answer:-Some of advantage of Hidden field as follows. -These are quite simple to implement. -We can work with the Web-Farm because data is cached on client side. -One other reason is all browser support hidden field. -Server resoucres not required. And disadvantage are as follows -Security reason not secure -Performance decrease if data is too large. -These are single valued and cannot handle havvy structure. What is Daemon threads what's its purpose ? Answer:- When a process is executing there are some threads that's run in background one of this thread is daemon thread. The simple example of this thread is Garbadge collector its run when any of .NET code is running if not running then it is in idle condition.

40

we can make daemon thread by Thread.Isbackground=true ADO .NET How ADO.NET come into existence ? Answer: DAO (data access model) is the first Data Access Model that is created for local databases which contains built-in Jet engine which overcome with some problem like performance and functionality issues. After this RDO (Remote Data Object) and ADO (Active Data Object) comes in market which basically designed for Client Server applications but soon ADO is more comfort then RDO. ADO a good architecture. ADO contained all the data in a recordset object which creates problems when implemented on the network where firewalls exist. Because ADO was a connected data access, which make connection open until the application is closed. This creates issue like database security and network traffic. Because open database connections use system resources to a maximum extent making the system performance less effective. This helps in developing of ADO.NET. What is Asynchronous Database Commands ? Answer:- When we execute any database. Thread that executing the command waits before the command get fully executing before executing any additional code. Thread is blocked for another process. But Asynchronous Database Commands solve this problem when database command is executing the current thread can continue on other process.Thread can execute a no of database command. There are two benefits of using Asynchronous Database Commands. 1) Executing Multiple Databse Commands simultaneously improve performance. 2) Because ASP.Net framework uses a limited pool service for request. Whenany request for a page is comes its assign a thread to handle the request. If framework is out of thread then job is in gueses we get error 503. But if we are using asynchronous database command then current thread is release back to current thread pool. What is Concurrency and its types? Answer: When two or more people try to update same type of data then Concurrency helps how to handle this situation there are two types of concurrency Pessimistic:-When one user try to change the data with pessimistic concurrency a lock is placed on the data so that another user cannot change that one after one another can change. Optimistic:-In this if two user works on the same data and one change that data first then second user cannot change that same data becasue the which he have using is allready changed so he cannot do the change becasue change apply to another data that is changed by first user. How to start Outlook,NotePad file in AsP.NET with code ? Answer: Here is the syntax to open outlook or notepad file in ASP.NET VB.NET Process.Start("Notepad.exe") Process.Start("msimn.exe"); C#.NET System.Diagnostics.Process.Start("msimn.exe"); System.Diagnostics.Process.Start("Notepad.exe"); How to get result from two table in SqlDataReader ? Answer: string str="Select * from table1;Select * from table2"; cmd.commandtext=str; dr=cmd.executereader(); What is Ref Cursor in .NET and how it is link with ExecuteReader ? Answer: Ref cursor play its role when doing with the oracle database these comes in ODP.NET. Ref Cursors are objects that link to Oracle server-side cursors.These Ref Cursor can be converted in oracle datareader with this Ref cursor we can get result with query written to pl/sql and the result can be get in .net.Now the question arise why we use Ref Cursor when we have an option of ExceuteReader reson is simple when we need more query in pl/sql means our work is done in pl/sql then we need this ref cursor for getting result set because doennot have direct connection to that table.Becasue advantage of pl/sql we can take two opertion in one query. Define tool Manage Statistics in SQL Serevr 2000 query ? Answer: SQL Server creates internal statistics on the rows in all of our tables that is used by the Query Optimizer to select the optimal execution plan for our query. And Query Optimizer helps in doing this.Soome time when statistics isnot maintains then this is done by tool Manage Statistics.We can add,edit or delete for statistics that is maintained by SQL Server.We can experiment with different sets of statistics and see how it affects the query otimizer execution plans. Some important instruction regarding ADO.NET connection string ? Answer: When we are making connection string always use Server's IP address not the DNS name if we use IP address it will reduce the time taken for connection to establish.Becasue server IP address is used to get a default or named instance of Sql Server that ls running. if we are running the cluster we have to use the Virtual SQL Server IP address. How to get database schema information when connection object is establish in ADO.NET ? Answer: There is a method that helps in getting schema information that is GetSchema() and this method is called

40

in three different ways first way when we call this method without any parameter its return the metadata(table, view, stored procedure.indexes etc).When method is called by passing metadata collection name and filter criteria returns the items from the collection after applying the filter criteria and last way is when we called by passing a metadata collection name returns information about items found in the specified collection. Which one is better WebService and Remoting ? Answer: Both of these have little difference WebService helpfull where the user who is using WebService doesnot have the .NET plateform. On the otherside for remoting we need .Net plateform on the both side so from both of this remoting is faster then webservice.So keep in mind which of these are you using if you have .net plateform or other. What is DataGrid wheater its a Server Control or something else ? Answer:DataGrid is Web server control a powerful tool for displaying information from a data source. we can display editable data in a professional-looking grid by setting only a few properties. The grid has a sophisticated object model that provides you with great flexibility in how you display the data. Define different execute methods of ADO.NET command object ? Answer: ExecuteScalar:- This method returns a single value from the first row and first column of the result get from the execution of SQL query. ExecuteNonQuery:- This method executes the DML SQL query just like insert, delete or update and then returns the number of rows affected by the action. ExecuteReader:- This method returns DataReader object which is a forward-only resultset. ExecuteXMLReader:- This method is available for SQL Server 2000 or later. Upon execution it builds XMLReader object from standard SQL query. What DataReader class do in ADO.NET ? Answer:To get read-only and forward only access to data we use DataReader .the DataReader object reduces the system overhead because one row at a time is taken into memory so it is quite lightweight. To get second object connection is reconnected. We can create a DataReader object by execute Execute readre() method. There are two Data Reader class one is SqlDataReader and other is OleDbDataReader. Why is ADO.NET serialization slower than ADO ? Answer: ADO uses binary serialization while ADO.NET uses text based serialization. Since the text takes more space, it takes longer to write it out. Is XML is a component of ADO.NET ? Answer: The answer of this question is always Yes because XML is an important component of ADO.NET architecture .ADO.NET use XML to store and transfer data.We not have to convert data to XML format.Datasets helps XML to integrate with ADO.NET. XML schema plays a role to get table definition,column,datatypes and constraints helps DataSet. How to check if the Dataset has records ? Answer: if ds.Tables(0).Rows.Count= 0 then 'No record else 'record found What is the significance of CommandBehavior.CloseConnection ? Answer: To avoid having to explicitly close the connection associated with the command used to create either a SqlDataReader or and OleDbDataReader, pass the CommandBehavior.CloseConnection argument to the ExecuteReader method of the Connection. dr= cmd.ExecuteReader(CommandBehavior.CloseConnection); The associated connection will be closed automatically when the Close method of the Datareader is called. This makes it all the more important to always remember to call Close on your datareaders. Which method do you invoke on the DataAdapter control to load your generated dataset with data? Answer: The Fill() method. What is Dataset and Diffgram? Answer: When sending and retrieving a DataSet from an XML Web service, the DiffGram format is implicitly used. Additionally, when loading the contents of a DataSet from XML using the ReadXml method, or when writing the contents of a DataSet in XML using the WriteXml method, you can select that the contents be read or written as a

40

DiffGram. For more information, see Loading a DataSet from XML and Writing a DataSet as XML Data. While the DiffGram format is primarily used by the .NET Framework as a serialization format for the contents of a DataSet, you can also use DiffGrams to modify data in tables in a Microsoft SQL Server™ 2000 database. What is typed dataset ? Answer: A typed dataset is very much similar to a normal dataset. But the only difference is that the sehema is already present for the same. Hence any mismatch in the column will generate compile time errors rather than runtime error as in the case of normal dataset. Also accessing the column value is much easier than the normal dataset as the column definition will be available in the schema. How can you provide an alternating color scheme in a Repeater control? Answer: AlternatingItemTemplate Like the ItemTemplate element, but rendered for every other row (alternating items) in the Repeater control. You can specify a different appearance for the AlternatingItemTemplate element by setting its style properties. What are good ADO.NET object(s) to replace the ADO Recordset object? Answer: There are alot...but the base once are SqlConnection, OleDbConnection, etc... Can you explain the difference between an ADO.NET Dataset and an ADO Recordset? Answer: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.

What are the differences between Datalist DataGrid and datarepeater ? Answer:DataList

• • • • • • • • •

Has table appearence by default Has no autoformat option has no default paging & sorting options can define separators between elements using template DataGrid Has a grid appearence by default has a autoformat option has default paging and sorting has no separator between elements DataRepeater simple,read-only output, has no built in support for selecting or editing items, has no DEFAULT APPEARENCE, has no default paging.

DOT NET ASSEMBLY What is purpose of Assembly Linker or define SDK Tool in .NET Framework? Answer: In .NET whole the working should be with the helps of DLLs.So all of Visual Studio .Net compilers gernate assemblies or u can say dll.If we want to create an assembly with manifest of a module.We can also put this assembly in seprate file.This AL tol gernate a file with an assembly manifest from modules or resources fles.The syntax of using Al.exe is al [sources] [options] This tool helps in creating multi-file assembly outside Visual Studio .Net .This multi file can contain modules that are written in diffrenet langauage in one application. Can you have two files with the same file name in GAC?

40

Answer: GAC is just a Folder that contains .dll that have strong name.We can say that GAC is a very special folder, and it is not possible two place two files with the same name into a Windows folder,But GAC differentiates by version number as well, so it’s possible for MyApp.dll and MyApp.dll to co-exist in GAC if the first one is version 1.0.0.0 and the second one is 1.1.0.0. In Assembly which work as GacBrowser ? Answer: The GACPicker class allows the user to select an assembly from the Global Assembly Cache. It does this by looking at the filesystem representation of the GAC, since there appears to be no actual API in the current .NET environment. What do u mean by Satellite Assemblies ? Answer: The assemblies which contains only culture information are known as satellite assemblies.This assembly is used to get language specific resources for an application . What’s the difference between private and shared assembly? Answer: Privateassembly is used inside an application only and does not have to be identified by a strong name. Shared assembly can be used by multiple applications and has to have a strong name. What do you know about .NET assemblies? Answer: Assemblies are the smallest units of versioning and deployment in the .NET application. Assemblies are also the building blocks for programs such as Web services, Windows services, serviced components, and .NET remoting applications. What is Version Number and Culture in Assembly Manifest ? Answer:- Version number:- A major and minor version number, and a revision and build number. The common language runtime uses these numbers to enforce version policy.Means we can say it’s a primary key. Culture:- This relates to Satellite assembly. This information should be used only to Pick an assembly as a satellite assembly containing culture- or language-specific information. (We can also that assembly with culture information is automatically assumed to be a satellite assembly.) What do you know about BCL? Answer:- The BCL (Base Class Library) is a combination of classes or we can say that it’s a library of functionalities and types available to all languages that used in .NET Framework. To make the programmer job more easier dot net gave a advantage to includes the BCL in order to collect a large number of common functions, just like to read a file and write to file, graphic rendering, database interaction, and XML document manipulation at one place . The scope of this is large and standard libraries for most other languages, including C++, and would be comparable in scope to the standard libraries is just like Java. The BCL is sometimes incorrectly referred to as the Framework Class Library (FCL), which is a superset including the Microsoft namespaces. What’s a strong name ? Answer: A strong name includes the name of the assembly, version number, culture identity, and a public key token. Whats an assembly ? Answer: Assemblies are the building blocks of .NET Framework applications; they form the fundamental unit of deployment, version control, reuse, activation scoping, and security permissions. An assembly is a collection of types and resources that are built to work together and form a logical unit of functionality. An assembly provides the common language runtime with the information it needs to be aware of type implementations. To the runtime, a type does not exist outside the context of an assembly. How can you debug failed assembly binds ? Answer: Use the Assembly Binding Log Viewer (fuslogvw.exe) to find out the paths searched. Where are shared assemblies stored ? Answer: Global assembly cache. How can you tell the application to look for assemblies at the locations other than its own install ? Answer: Use the directive in the XML .config file for a given application. <probing privatePath="c:\mylibs; bin\debug” /> should do the trick. Or you can add additional search paths in the Properties box of the deployed application.

40

Where’s global assembly cache located on the system ? Answer: Usually C:\winnt\assembly or C:\windows\assembly. How do you specify a custom attribute for the entire assembly (rather than for a class) ? Answer: Global attributes must appear after any top-level using clauses and before the first type or namespace declarations. An example of this is as follows: using System; [assembly : MyAttributeClass] class X {} Note that in an IDE-created project, by convention, these attributes are placed in AssemblyInfo.cs. What is delay signing ? Answer:Delay signing allows you to place a shared assembly in the GAC by signing the assembly with just the public key. This allows the assembly to be signed with the private key at a later stage, when the development process is complete and the component or assembly is ready to be deployed. This process enables developers to work with shared assemblies as if they were strongly named, and it secures the private key of the signature from being accessed at different stages of development. ASP .NET What do you mean by Share Point Portal ? Answer: Here I have taken information regarding Share Point Portal Server 2003 provides mainly access to the crucial business information and applications.With the help of Share Point Server we can server information between Public Folders, Data Bases, File Servers and the websites that are based on Windows server 2003. This Share Point Portal is integrated with MSAccess and Windows servers,So we can get a Wide range of document management functionality. We can also create a full featured portal with readymade navigation and structure. What is cross page posting in ASP.NET2.0 ? Answer: When we have to post data from one page to another in application we used server.transfer method but in this the URL remains the same but in cross page posting there is little different there is normal post back is done but in target page we can access values of server control in the source page.This is quite simple we have to only set the PostBackUrl property of Button,LinkButton or imagebutton which specifies the target page.In target page we can access the PreviousPage property.And we have to use the @PreviousPageType directive.We can access control of PreviousPage by using the findcontrol method.When we set the PostBackURL property ASP.NET framework bind the HTML and Javascript function automatically. What you thing about the WebPortal ? Answer: Web portal is nothing but a page that allows a user to customize his/her homepage. We can use Widgets to create that portal we have only to drag and drop widgets on the page. The user can set his Widgets on any where on the page where he has to get them. Widgets are nothing but a page area that helps particular function to response. Widgets example are address books, contact lists, RSS feeds, clocks, calendars, play lists, stock tickers, weather reports, traffic reports, dictionaries, games and another such beautiful things that we can not imagine. We can also say Web Parts in Share Point Portal. These are one of Ajax-Powered. How to start Outlook,NotePad file in AsP.NET with code ? Answer: Here is the syntax to open outlook or notepad file in ASP.NET VB.NET Process.Start("Notepad.exe") Process.Start("msimn.exe"); C#.NET System.Diagnostics.Process.Start("msimn.exe"); System.Diagnostics.Process.Start("Notepad.exe"); What is the purpose of IIS ? Answer: We can call IIS(Internet Information Services) a powerful Web server that helps us creating highly reliable, scalable and manageable infrastructure for Web application which runs on Windows Server 2003. IIS helps development center and increase Web site and application availability while lowering system administration costs. It also runs on Windows NT/2000 platforms and also for above versions. With IIS, Microsoft includes a set of programs for building and administering Web sites, a search engine, and support for writing Web-based applications that access database. IIS also called http server since it process the http request and gets http response. What is main difference between GridLayout and FormLayout ? Answer: GridLayout helps in providing absolute positioning of every control placed on the page.It is easier to devlop page with absolute positioning because control can be placed any where according to our requirement.But FormLayout is little different only experience Web Devloper used this one reason is it is helpful for wider range browser.If there is absolute positioning we can notice that there are number of DIV tags.But in FormLayout whole

40

work are done through the tables. How Visual SourceSafe helps Us ? Answer: One of the powerful tool provided by Microsoft to keep up-to-date of files system its keeps records of file history once we add files to source safe it can be add to database and the changes ade by diffrenet user to this files are maintained in database from that we can get the older version of files to.This also helps in sharing,merging of files. Can you define what is SharePoint and some overview about this ? Answer: SharePoint helps workers for creating powerful personalized interfaces only by dragging and drop predefined Web Part Components. And these Web Parts components also helps non programmers to get information which care and customize the appearance of Web pages. To under stand it we take an example one Web Part might display a user's information another might create a graph showing current employee status and a third might show a list of Employees Salary. This is also possible that each functions has a link to a video or audio presentation.So now Developers are unable to create these Web Part components and make them available to SharePoint users.

What is different between WebUserControl and in WebCustomControl ? Answer: Web user controls :- Web User Control is Easier to create and another thing is that its support is limited for users who use a visual design tool one gud thing is that its contains static layout one more thing a seprate copy is required for each application. Web custom controls:-Web Custom Control is typical to create and gud for dynamic layout and another thing is it have full tool support for user and a single copy of control is required because it is placed in Global Assembly cache. What is Sandbox in SQL server and explain permission level in Sql Server ? Answer: Sandbox is place where we run trused program or script which is created from the third party. There are three type of Sandbox where user code run. Safe Access Sandbox:-Here we can only create stored procedure,triggers,functions,datatypes etc.But we doesnot have acess memory ,disk etc. External Access Sandbox:-We cn access File systems outside the box. We can not play with threading,memory allocation etc. Unsafe Access Sandbox:-Here we can write unreliable and unsafe code. How many types of cookies are there in .NET ? Answer: Two type of cookeies. a) single valued eg request.cookies(”UserName”).value=”dotnetquestion” b)Multivalued cookies. These are used in the way collections are used example request.cookies(”CookiName”)(”UserName”)=”dotnetquestionMahesh” request.cookies(”CookiName”)(”UserID”)=”interview″ When we get Error 'HTTP 502 Proxy Error' ? Answer: We get this error when we execute ASP.NET Web pages in Visual Web Developer Web server, because the URL randomly select port number and proxy servers did not recognize the URL and return this error. To resolve this problem we have to change settings in Internet Explorer to bypass the proxy server for local addresses, so that the request is not sent to the proxy. What do you mean by three-tier architecture? Answer: The three-tier architecture was comes into existence to improve management of code and contents and to improve the performance of the web based applications.There are mainly three layers in three-tier architecture.the are define as follows (1)Presentation (2)Business Logic (3)Database (1)First layer Presentation contains mainly the interface code, and this is shown to user. This code could contain any technology that can be used on the client side like HTML, JavaScript or VBScript etc. (2)Second layer is Business Logic which contains all the code of the server-side .This layer have code to interact with database database and to query, manipulate, pass data to user interface and handle any input from the UI as well. (3)Third layer Data represents the data store like MS Access, SQL Server, an XML file, an Excel file or even a text file containing data also some addtional database are also added to that layers. What is Finalizer in .NET define Dispose and Finalize ? Answer: We can say that Finalizer are the methods that's helps in cleanp the code that is executed before object is

40

garbage collected .The process is called finalization . There are two methods of finalizer Dispose and Finalize .There is little diffrenet between two of this method . When we call Dispose method is realse all the resources hold by an object as well as all the resorces hold by the parent object.When we call Dispose method it clean managed as well as unmanaged resources. Finalize methd also cleans resources but finalize call dispose clears only the unmanged resources because in finalization the garbase collecter clears all the object hold by managed code so finalization fails to prevent thos one of methd is used that is: GC.SuppressFinalize. Define SMTPclient class in DotNet framework class libarary ? Answer: Each classes in dotnet framework inclue some properties,method and events.These properties ,methods and events are member of a class.SMTPclient class mainly concern with sending mail.This class contain the folling member. Properties:Host:-The name or IP address of email server. Port:-Port that is use when sending mail. Methods:Send:-Enables us to send email synchronously. SendAsynchronous:-Enables us to send an email asynchronously. Event:SendCompleted:-This event raised when an asynchronous send opertion completes. What is late binding ? Answer: When code interacts with an object dynamically at runtime .because our code literally doesnot care what type of object it is interacting and with the methods thats are supported by object and with the methods thats are supported by object .The type of object is not known by the IDE or compiler ,no Intellisense nor compile-time syntax checking is possible but we get unprecedented flexibilty in exchange.if we enable strict type checking by using option strict on at the top of our code modules ,then IDE and compiler will enforce early binding behaviour .By default Late binding is done. Does .NET CLR and SQL SERVER run in different process ? Answer: Dot Net CLR and all .net realtes application and Sql Server run in same process or we can say that that on the same address because there is no issue of speed because if these two process are run in different process then there may be a speed issue created one process goes fast and other slow may create the problem. What is Com Marshler and its importance in .NET ? Answer: Com Marshler is one of useful component of CLR. Its Task is to marshal data between Managed and Unmanaged environment .It helps in representation of data accross diffrenet execution enviroment.It performs the conversion of data format between manage and unmanaged code.By the helps of Com Marshlar CLR allows manage code to interoperate with unmanaged code. What is CSU and its description ? Answer: CSU stands for comma separate values also called comma delimited.It is plain text file which stores spreadsheets or basic datatype in very simple format.One record in each line and each field separted with comma's it is often used to transfer large ammount spreadsheet data or database information between program. The IHttpHandler and IHttpHandlerFactory interfaces ? Answer: The IHttpHandler interface is implemented by all the handlers. The interface consists of one property called IsReusable. The IsReusable property gets a value indicating whether another request can use the IHttpHandler instance. The method ProcessRequest() allows you to process the current request. This is the core place where all your code goes. This method receives a parameter of type HttpContext using which you can access the intrinsic objects such as Request and Response. The IHttpHandlerFactory interface consists of two methods GetHandler and ReleaseHandler. The GetHandler() method instantiates the required HTTP handler based on some condition and returns it back to ASP.NET. The ReleaseHandler() method allows the factory to reuse an existing handler. what is Viewstate? Answer:View state is used by the ASP.NET page framework to automatically save the values of the page and of each control just prior to rendering to the page. When the page is posted, one of the first tasks performed by page processing is to restore view state. State management is the process by which you maintain state and page information over multiple requests for the same or different pages. Client-side options are: * The ViewState property * Hidden fields * Query strings * Cookies

40

Server-side options are: * Application state * Session state * DataBase

Use the View State property to save data in a hidden field on a page. Because ViewState stores data on the page, it is limited to items that can be serialized. If you want to store more complex items in View State, you must convert the items to and from a string. ASP.NET provides the following ways to retain variables between requests: Context.Handler object Use this object to retrieve public members of one Web form’s class from a subsequently displayed Web form. Query strings Use these strings to pass information between requests and responses as part of the Web address. Query strings are visible to the user, so they should not contain secure information such as passwords. Cookies Use cookies to store small amounts of information on a client. Clients might refuse cookies, so your code has to anticipate that possibility. View state ASP.NET stores items added to a page’s ViewState property as hidden fields on the page. Session state Use Session state variables to store items that you want keep local to the current session (single user). Application state Use Application state variables to store items that you want be available to all users of the application. DOTNET PAGE LIFECYCLE ? Answer: While excuting the page, it will go under the fallowing steps(or fires the events) which collectivly known as Page Life cycle. Page_Init -- Page Initialization LoadViewState -- View State Loading LoadPostData -- Postback data processing Page_Load -- Page Loading RaisePostDataChangedEvent -- PostBack Change Notification RaisePostBackEvent -- PostBack Event Handling Page_PreRender -- Page Pre Rendering Phase SaveViewState -- View State Saving Page_Render -- Page Rendering Page_UnLoad -- Page Unloading What is Satellite Assemblies ? Answer: Satellite assemblies are often used to deploy language-specific resources for an application. These language-specific assemblies work in side-by-side execution because the application has a separate product ID for each language and installs satellite assemblies in a language-specific subdirectory for each language. When uninstalling, the application removes only the satellite assemblies associated with a given language and .NET Framework version. No core .NET Framework files are removed unless the last language for that .NET Framework version is being removed. For example, English and Japanese editions of the .NET Framework version 1.1 share the same core files. The Japanese .NET Framework version 1.1 adds satellite assemblies with localized resources in a \ja subdirectory. An application that supports the .NET Framework version 1.1, regardless of its language, always uses the same core runtime files. What is CAS ? Answer:CAS: CAS is the part of the .NET security model that determines whether or not a piece of 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. 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.) Automatic Memory Management ? Answer: Automatic Memory Management: From a programmer's perspective, this is probably the single biggest benefit of the .NET Framework. No, I'm not kidding. Every project I've worked on in my long career of DOS and Windows development has suffered at some point from memory management issues. Proper memory management is hard. Even very good programmers have difficulty with it. It's entirely too easy for a small mistake to cause a program to chew up memory and crash, sometimes bringing the operating system to a screeching halt in the process. Programmers understand that they're responsible for releasing any memory that they allocate, but they're not very

40

good at actually doing it. In addition, functions that allocate memory as a side effect abound in the Windows API and in the C runtime library. It's nearly impossible for a programmer to know all of the rules. Even when the programmer follows the rules, a small memory leak in a support library can cause big problems if called enough. The .NET Framework solves the memory management problems by implementing a garbage collector that can keep track of allocated memory references and release the memory when it is no longer referenced. A large part of what makes this possible is the blazing speed of today's processors. When you're running a 2 GHz machine, it's easy to spare a few cycles for memory management. Not that the garbage collector takes a huge number of cycles--it's incredibly efficient. The garbage collector isn't perfect and it doesn't solve the problem of mis-managing other scarce resources (file handles, for example), but it relieves programmers from having to worry about a huge source of bugs that trips almost everybody up in other programming environments. On balance, automatic memory management is a huge win in almost every situation. What do u mean by Function Overloading ? Answer: When more than one function is created with the same name, but different is of there arguments . In other words, function names can be overloaded. A function may also have the same name as an attribute. In the case that there is an ambiguity between a function on a complex type and an attribute of the complex type, the attribute will always be used. What Is OOPS ? Answer: OOPs is an Object Oriented Programming language,which is the extension of Procedure Oriented programming language.OOPS reduce the code of the program because of the extensive feature of Polymorphism. OOPS have many properties such as Data-Hiding,Inheritence,Data Absraction,Data Encapsulation and many moreEverything in the world is an object. The type of the object may vary. In OOPS, we get the power to create objects of our own, as & when required. what is Class ? Answer:A group of objects that share a common definition and that therefore share common properties, operations, and behavior. A user-defined type that is defined with the class-key 'class,' 'struct,' or 'union.' Objects of a class type consist of zero or more members and base class objects.Classes can be defined hierarchically, allowing one class to be an expansion of another, and classes can restrict access to their members. What is Constructor? Answer:When we create instance of class a special method of that class, called that is constructor. Similarly, when the class is destroyed, the destructor method is called. These are general terms and usually not the actual member names in most object-oriented languages. It is initialized using the keyword New, and is destroyed using the keyword Finalize. What is Abstract Class ? Answer:Classes that cannot be instantiated. We cannot create an object from such a class for use in our program. We can use an abstract class as a base class, creating new classes that will inherit from it. Creating an abstract class with a certain minimum required level of functionality gives us a defined starting point from which we can derive non-abstract classes. An abstract class may contain abstract methods & non-abstract methods. When a class is derived from an abstract class, the derived class must implement all the abstract methods declared in the base class. We may use accessibility modifiers in an abstract class.An abstract class can inherit from a non-abstract class. In C++, this concept is known as pure virtual method. What is ValueType? Answer:Value Types - Value types are primitive types. Like Int32 maps to System.Int32, double maps to System.double.All value types are stored on stack and all the value types are derived from System.ValueType. All structures and enumerated types that are derived from System.ValueType are created on stack, hence known as ValueType.In value type we create a copy of object and uses there value its not the original one. What is diff. between abstract class and an interface? Answer: An abstract class and Interface both have method only but not have body of method.The difference between Abstract class and An Interface is that if u call Ablstract class then u have to call all method of that particular Abstract class but if u call an Interface then it is not necessary that u call all method of that particular interface.Method OverLoading:-Return type, Parameter type, parameter and body of method number may be different.Method Overriding:- Return type, Parameter type, Parameter Number all must be same . Only body of method can change. SQL SERVER

40

What is Cascade and Restrict when we use DROP table in SQL SERVER ? Answer:- When we are using Drop table in SQL the syntax is simple. Drop table table_name(CASCADE / RESTRICT) We use cascade to drop table although it have some dependencies just like triggers,stroeprocrdure,primarykey,foreignkey it will delete first. But if we use restrict a error message is shown on using of DROP if the table have relation Trigger,storeprocedure. What is COMMIT & ROLLBACK statement in SQL ? Answer: Commit statement helps in termination of the current transaction and do all the changes that occur in transaction persistent and this also commits all the changes to the database.COMMIT we can also use in store procedure. ROLLBACK do the same thing just terminate the currenct transaction but one another thing is that the changes made to database are ROLLBACK to the database. What is diffrence between OSQL and Query Analyzer ? Answer:-Both are the same but ther eis little diffrence OSQL is command line tool whic is execute qery and display the result same a query analyzer but query analyzer is graphical and OSQL is a command line tool.OSQL have not ability like query analyzer to analyze queries and show statics on speed of execution and other usefull thing about OSQL is that its helps in scheduling. What is SQL whats its uses and its component ? Answer: The Structured Query Language (SQL) is foundation for all relational database systems. Most of the largescale databases use the SQL to define all user and administrator interactions. QL is Non-Procedural language . Its allow the user to concentrate on specifying what data is required rather than concentrating on the how to get it. The DML component of SQL comprises four basic statements: * SELECT to get rows from tables * UPDATE to update the rows of tables * DELETE to remove rows from tables * INSERT to add new rows to tables What is DTS in SQL Server ? Answer: If a organization is big then it is also there that there is multiple option to store data some people are using EXCEL some are using ACCESS and some of they are using SQL SERVER and in some other format also but there a problem is arise that how to merge that data into one format there is diffrent tool are there for doing this funtion. One of product of SQL SERVER-2000 DTS helps in this problem it provides a set of tool from that tool we can customise are database acording to our need DTSRun is a command-prompt utility used to execute existing DTS packages. What is the diffrence between SQL and Pl/Sql ? Answer: We can get modify, Retrieve by single command or statement in SQL but PL/SQL process all SQL statements one at a time. With PL/SQL, an entire block of statements process in a single command line.sql is structured query language ,various queries are used to handle the database in a simplified manner. while pl/sql is procedural language contains various types of variable,functions and procedures and other major diffrence is Sql as the name suggest it is just structured query language wheareas PLSQL is a commbination of Programming language & SQL. Can You explain integration between SQL Server 2005 and Visual Studio 2005 ? Answer: This intergration provide wider range of development with the help of CLR for database server.Becasue CLR helps developers to get flexibility for developing database applications and also provides language interoperability just like Visual C++, Visual Basic .Net and Visual C# .Net. The CLR helps developers to get the arrays, classes and exception handling available through programming languages such as Visual C++ or Visual C# which is use in stored procedures, functions and triggers for creating database application dynamically and also provide more efficient reuse of code and faster execution of complex tasks. We particularly liked the error-checking powers of the CLR environment, which reduces run-time errors What are Checkpoint in SQL Server ? Answer: When we done operation on SQL SERVER that is not commited directly to the database.All operation must be logged in to Transaction Log files after that they should be done on to the main database.CheckPoint are the point which alert Sql Server to save all the data to main database if no check point is there then log files get full we can use Checkpoint command to commit all data in the SQL SERVER.When we stop the SQL Server it will take long time because Checkpoint is also fired. What is the difference between UNION ALL Statement and UNION ? Answer:- The main difference between UNION ALL statement and UNION is UNION All statement is much faster than UNION,the reason behind this is that because UNION ALL statement does not look for duplicate rows, but on

40

the other hand UNION statement does look for duplicate rows, whether or not they exist. Write some disadvantage of Cursor ? Answer:- Cursor plays there row quite nicely but although there are some disadvantage of Cursor . Because we know cursor doing roundtrip it will make network line busy and also make time consuming methods. First of all select query gernate output and after that cursor goes one by one so roundtrip happen.Another disadvange of cursor are ther are too costly because they require lot of resources and temporary storage so network is quite busy. What is Log Shipping and its purpose ? Answer: In Log Shipping the transactional log file from one server is automatically updated in backup database on the other server and in the case when one server fails the other server will have the same DB and we can use this as the DDR(disaster recovery) plan. What are the null values in SQL SERVER ? Answer: Before understand the null values we have some overview about what the value is. Value is the actual data stored in a particular field of particular record. But what is done when there is no values in the field.That value is something like <null>.Nulls present missing information. We can also called null propagation. What is difference between OSQL and Query Analyzer ? Answer: Both are same for functioning but there is a little difference OSQL is command line tool which execute query and display the result same a Query Analyzer do but Query Analyzer is graphical.OSQL have not ability like Query Analyzer to analyze queries and show statistics on speed of execution .And other useful thing about OSQL is that its helps in scheduling which is done in Query Analyzer with the help of JOB. Write a Role of Sql Server 2005 in XML Web Services? Answer:- SQL Server 2005 create a standard method for getting the database engine using SOAP via HTTP. By this method, we can send SOAP/HTTP requests to SQL Server for executing T-SQL batch statements, stored procedures, extended stored procedures, and scalar-valued user-defined functions may be with or without parameters. What are the different types of Locks ? Answer: There are three main types of locks that SQL Server (1)Shared locks are used for operations that does not allow to change or update data, such as a SELECT statement. (2)Update locks are used when SQL Server intends to modify a page, and later promotes the update page lock to an exclusive page lock before actually making the changes. (3)Exclusive locks are used for the data modification operations, such as UPDATE, INSERT, or DELETE. What is 'Write-ahead log' in Sql Server 2000 ? Answer: Before understanding it we must have an idea about the transaction log files. These files are the files which holds the data for change in database . Now we explain when we are doing some Sql Server 2000 query or any Sql query like Sql insert query,delete sql query,update sql query and change the data in sql server database it cannot change the database directly to table .Sql server extracts the data that is modified by sql server 2000 query or by sql query and places it in memory.Once data is stores in memory user can make changes to that a log file is gernated this log file is gernated in every five mintues of transaction is done. After this sql server writes changes to database with the help of transaction log files. This is called Write-ahead log. Question: What do u mean by Extents and types of Extends ? Answer: An Extent is a collection of 8 sequential pages to hold database from becoming fregmented. Fragment means these pages relates to same table of database these also holds in indexing. To avoid for fragmentation Sql Server assign space to table in extents. So that the Sql Server keep upto date data in extents. Because these pages are continously one after another. There are usually two types of extends:-Uniform and Mixed. Uniform means when extent is own by a single object means all collection of 8 ages hold by a single extend is called uniform. Mixed mean when more then one object is comes in extents is known as mixed extents. What is different in Rules and Constraints ? Answer: Rules and Constraints are similar in functionality but there is a An little diffrence between them.Rules are used for backward compatibility . One the most exclusive diffrence is that we an bind rules to a datatypes whereas constraints are bound only to columns.So we can create our own datatype with the help of Rules and get the input according to that.

40

What is defaults in Sql Server and types of Defaults ? Answer: Defaults are used when a field of columns is allmost common for all the rows for example in employee table all living in delhi that value of this field is common for all the row in the table if we set this field as default the value that is not fill by us automatically fills the value in the field its also work as intellisense means when user inputing d it will automatically fill the delhi . There are two types of defaults object and definations. Object deault:-These defaults are applicable on a particular columns . These are usually deined at the time of table designing.When u set the object default field in column state this column in automatically field when u left this filed blank. Defination default:-When we bind the datatype with default let we named this as dotnet .Then every time we create column and named its datatype as dotnet it will behave the same that we set for dotnet datatype. What Is Database ? Answer: A database is similar to a data file in that it is a storage place for data. Like a data file, a database does not present information directly to a user; the user runs an application that accesses data from the database and presents it to the user in an understandable format.Database systems are more powerful than data files in that data is more highly organized. In a well-designed database, there are no duplicate pieces of data that the user or application must update at the same time. Related pieces of data are grouped together in a single structure or record, and relationships can be defined between these structures and records.When working with data files, an application must be coded to work with the specific structure of each data file. In contrast, a database contains a catalog that applications use to determine how data is organized. Generic database applications can use the catalog to present users with data from different databases dynamically, without being tied to a specific data format. A database typically has two main parts: first, the files holding the physical database and second, the database management system (DBMS) software that applications use to access data. The DBMS is responsible for enforcing the database structure, including: · Maintaining relationships between data in the database. Ensuring that data is stored correctly, and that the rules defining data relationships are not violated. · Recovering all data to a point of known consistency in case of system failures. what is Relational Database ? Answer: Although there are different ways to organize data in a database, relational databases are one of the most effective. Relational database systems are an application of mathematical set theory to the problem of effectively organizing data. In a relational database, data is collected into tables (called relations in relational theory). A table represents some class of objects that are important to an organization. For example, a company may have a database with a table for employees, another table for customers, and another for stores. Each table is built of columns and rows (called attributes and tuples in relational theory). Each column represents some attribute of the object represented by the table. For example, an Employee table would typically have columns for attributes such as first name, last name, employee ID, department, pay grade, and job title. Each row represents an instance of the object represented by the table. For example, one row in the Employee table represents the employee who has employee ID 12345. When organizing data into tables, you can usually find many different ways to define tables. Relational database theory defines a process called normalization, which ensures that the set of tables you define will organize your data effectively. What is Data Integrity and it's categories ? Answer: Enforcing data integrity ensures the quality of the data in the database. For example, if an employee is entered with an employee_id value of 123, the database should not allow another employee to have an ID with the same value. If you have an employee_rating column intended to have values ranging from 1 to 5, the database should not accept a value of 6. If the table has a dept_id column that stores the department number for the employee, the database should allow only values that are valid for the department numbers in the company. Two important steps in planning tables are to identify valid values for a column and to decide how to enforce the integrity of the data in the column. Data integrity falls into these categories: 1) Entity integrity 2) Domain integrity 3) Referential integrity 4) User-defined integrity Entity Integrity: Entity integrity defines a row as a unique entity for a particular table. Entity integrity enforces the integrity of the identifier column(s) or the primary key of a table (through indexes, UNIQUE constraints, PRIMARY KEY constraints, or IDENTITY properties). Domain Integrity: Domain integrity is the validity of entries for a given column. You can enforce domain integrity by restricting the type (through data types), the format (through CHECK constraints and rules), or the range of possible values (through FOREIGN KEY constraints, CHECK constraints, DEFAULT efinitions, NOT NULL definitions, and rules). Referential Integrity: Referential integrity preserves the defined relationships between tables when records are entered or deleted. In Microsoft® SQL Server™ 2000, referential integrity is based on relationships between foreign keys and primary keys or between foreign keys and unique keys (through FOREIGN KEY and CHECK constraints). Referential integrity ensures that key values are consistent across tables. Such consistency requires that there be no references to nonexistent values and that if a key value changes, all references to it change consistently throughout the database. When you enforce referential integrity, SQL Server prevents users from:

40

· Adding records to a related table if there is no associated record in the primary table. · Changing values in a primary table that result in orphaned records in a related table. · Deleting records from a primary table if there are matching related records. For example, with the sales and titles tables in the pubs database, referential integrity is based on the relationship between the foreign key (title_id) in the sales table and the primary key (title_id) in the titles table. User-Defined: Integrity User-defined integrity allows you to define specific business rules that do not fall into one of the other integrity categories. All of the integrity categories support user-defined integrity (all column- and table-level constraints in CREATE TABLE, stored procedures, and triggers). SQL Server runs on which TCP/IP port and From where can you change the default port? Answer: SQL Server runs on port 1433 but we can also change it for better security and From the network Utility TCP/IP properties -->Port number.both on client and the server. What is the use of DBCC commands? Answer: DBCC stands for database consistency checker. We use these commands to check the consistency of the databases, i.e., maintenance, validation task and status checks.DBCC CHECKDB - Ensures that tables in the db and the indexes are correctly linked.and DBCC CHECKALLOC To check that all pages in a db are correctly allocated. DBCC SQLPERF - It gives report on current usage of transaction log in percentage. DBCC CHECKFILEGROUP Checks all tables file group for any damage. What is the difference between a HAVING CLAUSE and a WHERE CLAUSE? Answer: Having Clause is basically used only with the GROUP BY function in a query. WHERE Clause is applied to each row before they are part of the GROUP BY function in a query. When do you use SQL Profiler? Answer: SQL Profiler utility allows us to basically track Connections to the SQL Server and also determine activities such as which SQL Scripts are running, failed jobs etc. Can you explain the role of each service? Answer: SQL SERVER - is for running the databases SQL AGENT - is for automation such as Jobs, DB Maintenance, Backups DTC - Is for linking and connecting to other SQL Servers. What is Normalization ? Answer: The logical design of the database, including the tables and the relationships between them, is the core of an optimized relational database. A good logical database design can lay the foundation for optimal database and application performance. A poor logical database design can impair the performance of the entire system. Normalizing a logical database design involves using formal methods to separate the data into multiple, related tables. A greater number of narrow tables (with fewer columns) is characteristic of a normalized database. A few wide tables (with more columns) is characteristic of an nonnomalized database. Reasonable normalization often improves performance. When useful indexes are available, the Microsoft® SQL Server™ 2000 query optimizer is efficient at selecting rapid, efficient joins between tables. Some of the benefits of normalization include: ·Faster sorting and index creation. ·A larger number of clustered indexes. For more information, Narrower and more compact indexes. ·Fewer indexes per table, which improves the performance of INSERT, UPDATE, and DELETE statements. ·Fewer null values and less opportunity for inconsistency, which increase database compactness. As normalization increases, so do the number and complexity of joins required to retrieve data. Too many complex relational joins between too many tables can hinder performance. Reasonable normalization often includes few regularly executed queries that use joins involving more than four tables. Sometimes the logical database design is already fixed and total redesign is not feasible. Even then, however, it might be possible to normalize a large table selectively into several smaller tables. If the database is accessed through stored procedures, this schema change could take place without affecting applications. If not, it might be possible to create a view that hides the schema change from the applications. Can you explain what View is in SQL ? Answer: View is just a virtual table nothing else which is based or we can say devlop with SQL SELECT query.So we can say that its a real database table (it has columns and rows just like a regular table),but one difference is that real tables store data,but views can’t. View data is generated dynamically when the view is referenced.And view can also references one or more existing database tables or other views. We can say that it is filter of database.

40

How to get which Process is Blocked in SQL SERVER ? Answer:- There are two ways to get this sp_who and sp_who2 . You cannot get any detail about the sp_who2 but its provide more information then the sp_who . And other option from which we can find which process is blocked by other process is by using Enterprise Manager or Management Studio, these two commands work much faster and more efficiently than these GUI-based front-ends. Can you tell me the difference between DELETE &TRUNCATE commands? Answer: Delete command removes the rows from a table based on the condition that we provide with a WHERE clause. Truncate will actually remove all the rows from a table and there will be no data in the table after we run the truncate command. VB .NET

Can you define what is Jagged Array in VB.NET ? Answer: Jagged array is multidimensional array.If jagged array is two dimensinal it also contain a table where each row can have a different number of columns. A jagged array is really an array of arrays. To create a jagged array, you declare the array of arrays with multiple sets of parentheses or brackets and indicate the size of the jagged array in the first set of brackets. What is DataType conversion in VB.NET ? Answer: Convert one variable type to another one is called datatype conversion we can also caleed this casting in VB.NET some automatically conversion is also there. Cbool CByte CChar Cdate CDec CDbl CInt CLng CObj CShort CSng CStr CType Asc. What do u mean by Redim in VB.NET ? Answer: In vb.net we use Redim and erase to manipulate Array. Once we declare an array the size set to array its makes limited to that range but with the help of redim we used to change the array size. Redim arr(6) we can also used preserve to save these values. Redim Preserve arr(6) What is branching logic control in vb.net ? Answer: Function and subroutines are the answer.The diffrence in two of them is function send information back from where it is called means function can return a value but subroutines can not do this. Write the role of New keyword ? Answer: New is used to initialize a new object. We sets a variable to any dattype with help of New keyword .The New keyword gives a value to the variable.We can also uses new keyword to initialize an object variable. Example:- dim obj as new SqlDataAdapter. What is diffrenet between import System.Data.SqlClient,System.Data.Oledb ? Answer: System.Data.OleDB It contains the objects that we use to connect to a data source via an OleDB provider , such as OleDbConnection, OleDBCOmmand. System.Data.SqlClient It contains objects that we use to connect to a data source via Tabular data stream interface provided by Microsoft Sql Server. This can be generally used to provide better performance because it removes some of the intermediate layers required by the OleDB provider. What is the difference between DataTable and DataSet Answer: Dataset: Represents an in-memory cache of data we can also say data set is a collection of data table it is based on xml format ,it is used for data storing in cache as a disconnected recordset dataset is using data manipulation in cache wthout connection to database. DataTable: Represents one table of in-memory data data table can have one table only or we can say Data table is a collection of record's that consist the single table What is the difference between VB and VB.NET ? Answer: Object-based language and Does not support inheritance also ADO.Net does not give support for disconnected data architecture and there is No interoperability function and No support for threading. On the other hand VB.NET is Object-Oriented Programming language and ADO.Net gives support for disconnected data architecture also provides interoperability and Its uses managed code and supports threading also provides access to third-party controls like COM, DCOM What is Dot Net Framework? Here is this topic I tried to cover whole .net framework all its components and some tools that's come under it. Here I have explained CLR (Common Language Runtime) in .NET framework and also covers managed and

40

unmanaged program execution. We will also learn .NET framework provides highly secure and fault-tolerant execution environment. Now to start .Net Framework we have to cover Microsoft .NET we can say that Microsoft .NET is a software that helps us to create application for different environment and for different devices for example we can create a application for mobile so it's a device application and also can create a XML Web Services for highly distributed environment just like Internet. In .NET we can also create traditional window-based application as well as server components and device application too .net helps to exchange data between various applications and devices. Here .NET provides tools, environment, infrastructure and impressive software which help us to build application for different platform and for devices too. We can integrate between various application and devices by using standard just like hypertext transfer protocol (HTTP),XML and soap (Simple Object Access Protocol). Another good feature is to exchange data by using XML Web Services that really changes the environment .Another good feature is .NET provides remoting that work in two different platform .By using binary or HTTP protocols. Here i have discuss some enhancement that is done in different version of dot net. (1) .NET Framework 1.0 The first release of the .NET Framework. Was on February 13, 2002. Its helpsfull in Windows 98, NT 4.0, 2000, and XP. (2).NET Framework 1.1 - New mobile controls are taken in ASP.NET. - Security changes - Code Access Security in ASP.NET applications is done in new ways. - A new Built-in support for ODBC and Oracle databases are comes in existing manner . - Compact framework is taken as new version for small devices. - Internet Protocol version 6 (IPv6) support. - Numerous API changes. (3).NET Framework 2.0 - Numerous API changes extend the limit. - A new hosting API for native applications wishing to host an instance of the .NET runtime. The new API gives a fine grain control on the behavior of the runtime with regards to multithreading, memory allocation, assembly loading and more (detailed reference). It was initially developed to efficiently host the runtime in Microsoft SQL Server, which implements its own scheduler and memory manager. - Full 64-bit support for both the x64 and the IA64 hardware platforms. - Language support for Generics built directly into the .NET CLR. - Many additional and improved ASP.NET web controls. - New data controls with declarative data binding. - New personalization features for ASP.NET, such as support for themes, skins and webparts. - .NET Micro Framework - a version of the .NET Framework related to the Smart Personal Objects Technology initiative. (3) .NET Framework 3.0 .NET Framework 3.0 consists of four major new components: - Windows Presentation Foundation (WPF) This based on XML and vector graphics, we can also say its uses 3D computer graphics hardware and Direct3D technologies. - Windows Communication Foundation (WCF),It is a messaging system which helps programs to interoperate locally or remotely similar to web services. - Windows Workflow Foundation (WF) this helps in task just like automation and integrated transactions using workflows. - Windows CardSpace, It is software component to securely stores a person's digital identities and provides a unified interface for choosing the identity. .NET Framework 3.5 This include new features that’s are in C# 3.0 and VB.NET 9.0 compiler Also have support for expression trees and lambda method. Language Integrated Query (LINQ) -LINQ to Objects -LINQ to XML -LINQ to SQL Also include new feature in ADO.NET that is paging . ADO.NET synchronization API to synchronize local caches and server side datastores Peer-to-peer networking stack, including a managed PNRP resolver[17] Managed wrappers for WMI and Active Directory APIs[18] Enhancements to the WCF and WF runtimes that let WCF work with POX and JSON data, as well as expose WF workflows as WCF services.[19]

40

-

Support for HTTP pipelining and syndication feeds.[19] ASP.NET AJAX is included

Microsoft visual Studio .NET and .NET Framework provides a solution a variety of programming environment and languages that provides a single point access to all the tool that's we need. Now turn of .NET framework what is can do what it can do what it do and area that covers under it explain here . The .NET framework provides environment to create object-oriented programming model that's helps us to create all type of application .Here the methods of creating window-based application or we can say window-based components is same as creating XML Web Services is same. When we create a .NET application we create a class that class contains or define the functionality of the application in term of properties event and methods of that class .Also in web application the code that control on web application comes under that class. These classes can take advantage of Object oriented popular feature just like Inheritance, encapsulation and polymorphism. So we can also say that classes are the fundamental for programming in .Net environment .We can also create classes in any of language that supported by .NET another factor is reusable of class whether it is different language. We can inherit classes across languages because .NET framework allows language interoperability and also supports crosslanguage inheritance. There is CLS(common language specification) which contains the rules for different language interoperability .The code that is written in CLS-complaint language is interoperable with code contains in cls-complaint different language .The .NET framework provide four CLS-complaint language just like Visual Basic .NET,Micosoft Visual C#,Microsoft Visual C++ .NET and Microsoft J# .NET. When we complies these languages its gernate an intermediate code called (MSIL) which helps program to be interoperable .The .NET framework provides the infrastructure and services per the CLI (Common Language Infrastructure) specification.There are the following services: *Common Language Runtime:- This contains CLI (common language infrastructure) and provides a environment or we can say provides execution environment .Because all .NET language compiler compile the source code into MSIL code and this code is loads and executes when we run application by CLR. *Common Type System:-This provides the data type value and object types, which helps in developing application in different language , because all .NET languages share CTS .This means when we take string in Visual Basic it is same in Visual C# and in other .NET languages means there is no superior language all are similar . *Type Safety:-This means as the name suggest any operation is performed on one value or object is only perform on that value or object not for other. *Managed Code Execution:-When we loads and execute .NET application and objects state are managed when application is in execution .NET framework automatically allocates memory and provides an automatic garbage collection mechanism. *Side-By-Side execution:-The .Net framework helps in deployment of multiple versions of same application by using assembly. The CLR uses the version information in the metadata to get application and helps in getting multiple version of an application side-by-side. After this we are unable to understand about what .NET framework is and define its architecture:The .NET framework consists of two main components first we can say .Net Framework class library and the second we can say is Common Language Runtime .The framework class library contains the library that provides the types that are common to all .NET languages. This libraries helps in developing different types of application such as console application, window and the Web Form and also help full in creation of Web Services. And another component is common language runtime consists of components that loads the IL code of program in to the runtime and soon after this IL code convert into native code, this execute and mange the code and helps in enforcing security and also helps in type safety and provide thread support and some other useful services .The code that is run in common language runtime is called managed code on the other hand that is not run in common language runtime is called unmanaged code .The CLR provides an interoperability layers ,which helps in both managed code and in unmanaged code. Now we explain various components of CLR that's make them useful component of .Net Framework.

40

• • • • • • • • • •

Class Loader:-its helps CLR to load classes in runtime environment. Complier:-its helped in converting MSIL to native code Code Manager:-This helps in managing the code during execution Garbage Collector:-Its perform automatic memory management. Security Engine:-This helps in enforcing security restrictions. Type Checker:-It performs type checking. Thread Support:-Its helps in doing Multiple threading concepts. Exception Manager:- Its provides a method to handle the exception at runtime Debug Engine:-Its allowed debug different types of applications Com Marshler:- Its allows .Net Application to exchange data with com application.

.Net Framework 2.0 Advantages The .Net Framework (version 2.0) includes 51 assemblies. The .Net Framework (version 2.0) includes 18,619 types; 12,909 classes; 401,759 public methods; 93,105 public properties and 30,546 public events. It includes a new feature called Control State. Control state is similar to view state except that is used to preserve only critical information. For example the gridview control uses control state to store the selected row. Even if you disable the viewstate, the gridview control remembers which row is selected. We can precompile an entire ASP.Net application by using the aspnet_compiler.exe command line tool. If you precompile an application, users do not experience the compilation delay resulting from the first page request.

40

40

Master your semester with Scribd & The New York Times

Special offer for students: Only $4.99/month.

Master your semester with Scribd & The New York Times

Cancel anytime.