Monday, February 23, 2009

SDLC --INCREMENTAL MODEL



The incremental model is an intuitive approach to the waterfall model. Multiple development cycles take place here, making the life cycle a “multi-waterfall” cycle. Cycles are divided up into smaller, more easily managed iterations. Each iteration passes through the requirements, design, implementation and testing phases.
A working version of software is produced during the first iteration, so you have working software early on during the software life cycle. Subsequent iterations build on the initial software produced during the first iteration.
Advantages
--Generates working software quickly and early during the software life cycle.
--More flexible – less costly to change scope and requirements.
--Easier to test and debug during a smaller iteration.
--Easier to manage risk because risky pieces are identified and handled during its iteration.
--Each iteration is an easily managed milestone.
Disadvantages
--Each phase of an iteration is rigid and do not overlap each other.
--Problems may arise pertaining to system architecture because not all requirements are gathered up front for the entire software life cycle.
-- Total cost of the complete system is not lower

PROTOTYPE MODEL


This model allows the client to interact and experiment with a working representation of the product. The developmental process only continues once the client is satisfied with the functioning of the prototype. At that stage the developer determines the specifications of the client’s real needs.
Advantages

--The software designer and implementer can obtain feedback from the users early in the project
--The client and the contractor can compare if the software made matches the software specification, according to which the software program is built.
--It also allows the software engineer some insight into the accuracy of initial project estimates and whether the deadlines and milestones proposed can be successfully met.
DisAdvantages
--Often clients expect that a few minor changes to the prototype will more than suffice their needs. They fail to realise that no consideration was given to the overall quality of the software in the rush to develop the prototype.
--The developers may lose focus on the real purpose of the prototype and compromise the quality of the product. For example, they may employ some of the inefficient algorithms or inappropriate programming languages used in developing the prototype. This mainly due to laziness and an over reliance on familiarity with seemingly easier methods.
-- A prototype will hardly be acceptable in court in the event that the client does not agree that the developer has discharged his/her obligations. For this reason using the prototype as the software specification is normally reserved for software development within an organisation.
When to use model?
--Prototyping is very effective in the analysis and design of on-line systems.
Systems with little user interaction, such as batch processing or systems that mostly do calculations, benefit little from prototyping. Sometimes, the coding needed to perform the system functions may be too intensive and the potential gains that prototyping could provide are too small.
--Prototyping is especially good for designing good human-computer interfaces. “One of the most productive uses of rapid prototyping to date has been as a tool for iterative user requirements engineering and human-computer interface design.”

SDLC - V Shape Model



The V-model is a software development process which can be presumed to be the extension of the waterfall model. Instead of moving down in a linear way, the process steps are bent upwards after the coding phase, to form the typical V shape. The V-Model demonstrates the relationships between each phase of the development life cycle and its associated phase of testing.
The V-model deploys a well-structured method in which each phase can be implemented by the detailed documentation of the previous phase. Testing activities like test designing start at the beginning of the project well before coding and therefore saves a huge amount of the project time.

Advantages:
1.Each Deliverable must be testable
2. Works for Small Projects

3.Higher chance of success over the waterfall model due to the development of test plans early on during the life cycle.
4. Time concern in comparison with the waterfall model is low or even we can say 50% less.

Disadvantages:
1.Doesn’t handle iterations or phases.
2.No early prototypes of software are not produced, Very rigid, like the waterfall model.
3.Little flexibility and adjusting scope is difficult and expensive.

4. Software is developed during the implementation phase, so no early prototypes of the software are produced.
5. Model doesn’t provide a clear path for problems found during testing phases.

When to use such model?
where time and cost is the constraints of the project then we can use such models for quick and cost effective delivery.
In comparison with waterfall model more or less same but the activity of testing starts very early, which leads to less time, and cost of the project.

SDLC - SPIRAL MODEL



The spiral model is a software development process combining elements of both design and prototyping-in-stages, in an effort to combine advantages of top-down and bottom-up concepts.
This model of development combines the features of the prototyping model and the waterfall model. The spiral model is intended for large, expensive and complicated projects.

.Adds risks analysis, and RAD prototyping to the waterfall model.
.Each cycle involves the same sequence of steps as the waterfall process model

Objectives: functionality, performance, hardware/software interface, critical success factors, etc.
Alternatives: build, reuse, buy, sub-contract, etc.
Constraints: cost, schedule, interface etc.

Typical activities:
--- Create Design
--- Review Design
--- Develop Design
--- Inspect Design
--- Test product
--- Develop project plan
--- Develop configuration management plan
--- Develop a test plan
--- Develop an installation plan
Advantages:
. Provides early indication of insurmountable risks, without much cost
. Users see the system early because of rapid prototyping tools
. Critical high-risks functions are developed first.
. The design doesn’t have to be perfect
. Users can be closely tied to all lifecycle steps
. Early and frequent feedback from users
Disadvantages:
---Time spent for evaluating risks too large for small or low risk projects
---The model is complex
---Spiral may continue indefinitely
---Developers must be reassigned during non development phase activities.

When to use such model?
---For a typical shrink-wrap application, the spiral model might mean that you have a rough-cut of user elements (without the polished / pretty graphics) as an operable application, add features in phases, and, at some point, add the final graphics.
---The spiral model is used most often in large projects.
---The US military has adopted the spiral model for its Future Combat Systems program

RAPID ANALYSIS AND DESIGN (RAD) MODEL


RAD MODEL
This stage includes a detailed study of the business needs of the organization. Options for changing the business process may be considered. Design focuses on high level design like, what programs are needed and how are they going to interact, low-level design (how the individual programs are going to work), interface design (what are the interfaces going to look like) and data design (what data will be required). During these phases, the software's overall structure is defined. Analysis and Design are very crucial in the whole development cycle. Any glitch in the design phase could be very expensive to solve in the later stage of the software development. Much care is taken during this phase. The logical system of the product is developed in this phase

RAD model has the following phases:
Business Modeling: The information flow among business functions is defined by answering questions like what information drives the business process, what information is generated, who generates it, where does the information go, who process it and so on.
Data Modeling: The information collected from business modeling is refined into a set of data objects (entities) that are needed to support the business. The attributes (character of each entity) are identified and the relation between these data objects (entities) is defined.
Process Modeling: The data object defined in the data modeling phase are transformed to achieve the information flow necessary to implement a business function. Processing descriptions are created for adding, modifying, deleting or retrieving a data object.
Application Generation: Automated tools are used to facilitate construction of the software; even they use the 4th GL techniques.
Testing and Turn over: Many of the programming components have already been tested since RAD emphasis reuse. This reduces overall testing time. But new components must be tested and all interfaces must be fully exercised.

What are the advantages and disadvantages of RAD?
RAD reduces the development time and reusability of components help to speed up development. All functions are modularized so it is easy to work with.

For large projects RAD require highly skilled engineers in the team. Both end customer and developer should be committed to complete the system in a much abbreviated time frame. If commitment is lacking RAD will fail. RAD is based on Object Oriented approach and if it is difficult to modularize the project the RAD may not work well.

SDLC - WATERFALL MODEL




WATERFALL MODEL
The waterfall model is a popular version of the systems development life cycle model for software engineering.
Waterfall development has distinct goals for each phase of development. Imagine a waterfall on the cliff of a steep mountain. Once the water has flowed over the edge of the cliff and has begun its journey down the side of the mountain, it cannot turn back. It is the same with waterfall development. Once a phase of development is completed, the development proceeds to the next phase and there is no turning back.
Advantages:
1.Simple and easy to use.
2.Easy to manage-each phase has deliverables.
3.Milestones are well understood.
4.Requirements Stability.
5.Phases are proceeded and completed at time.
6.Works for smaller projects.
Disadvantages:
1. Adjusting scope during life cycle can kill the project.
2. Little opportunity for customer to preview the system.
3. Poor model for complex and object oriented projects.
4. Poor model for long ongoing projects.
5. Integration is big bang at the end.

When to use such model?
  • Such model is highly used where requirements are clear and there will be no changes in the development time. We can find such scenarios in defense projects, where requirements will be clear since before they write requirements they will analyses well.
  • We can also name this kind of life cycle model for migration projects, where requirements will be same only platform or languages may vary / change.
  • Also can use for projects where sponsor themselves will do testing activities, since till the completion of the coding we will not deliver the project.

SOFTWARE DEVELOPMENT LIFE CYCLE

SOFTWARE
Software development is the process of developing software through successive phases in an orderly way. It is a complicated process as it requires careful planning and execution to meet the goals. Different phases in this development process include, the actual writing of code, preparation of requirements and objectives, the design of what is to be coded, and confirmation that what is developed has met objectives. Before systems development methods came into existence, the development of new systems or products was often carried out by using the experience and intuition of management and technical personnel. However, the complexity of modern systems and computer products long ago made the need clear for some kind of orderly development process.

The different phases involved in Software Development are as follows:
1.Identification of required software
2.Analysis of the software requirements
3.Detail specification of software requirements
4.Software Design
5.Programming
6.Testing
7.Maintenance


DEVELOPMENT PROCESS
The software development process is guided by some systematic software development method (SDM). Also referred by a number of terms, like process models, development guidelines, and systems development life cycle models (SDLC). All these Software Development methods generally include the following development phases:
  • The existing system is evaluated and its drawbacks identified, usually through interaction with system users and support personnel.
  • The new system requirements are defined, the drawbacks in the existing system are addressed with specific proposals for improvement.
  • The proposed system is designed and plans are laid out concerning the physical construction, hardware, operating systems, programming, communications, and security issues.
  • The new system is developed and the new components and programs are obtained and installed. Users of the system must be trained in its use and all aspects of performance is tested. If necessary, adjustments are made at this stage.
  • The system is put into use. This can be done in different ways. The new system can phase in, according to application or location and the old system gradually replaced. In some cases it may be more cost-effective to shut down the old system and implement the new system all at once.
  • Once the new system is up and running for a while, it is exhaustively evaluated. Maintenance is kept up rigorously at all times. Users of the system are kept up-to-date concerning the latest modifications and procedures.

Systems Development Life Cycle Model

The Systems Development Life Cycle model was developed as a structured approach to information system development that guides all the processes involved from an initial feasibility study through to maintenance of the finished application. SDLC models take a variety of approaches to development. Some of these life cycle models include:

1. WATERFALL MODEL

2. V-SHAPE MODEL

3. SPIRAL MODEL

4. INCREMENTAL MODEL

5. PROTOTYPE MODEL

6. RAD MODEL

7. AGILE MODEL

(continue...)

Operating System fundamentals

The continued development of applications around the IT industry and the demand for better environments thereafter compels the operating system designers to design more and more Operating Systems that are efficient enough to keep pace with the changing times. However, the core concepts of these Operating Systems would continue to be the same irrespective of the interfaces and features that these Operating Systems would provide to the end users. This is a conceptual article that explains the important concepts and terminologies related to Operating Systems in a lucid language.

What is an Operating System?
An Operating System is a set of programs designed internally to provide an interface to the user and an environment to work on. The following are the basic functions of an Operating System.
· Processor Management
· Memory Management
· File and IO Management
· Peripheral Management
· Command Interpretation
An Operating System acts as manager of resources and controls the functioning of various components of the system. It is responsible for the proper operation of the Input Output devices in the computer system.
Processor Management

This relates to the Operating System’s activity of managing the processor in the system, i.e. allocating and de-allocating of the processor to the process. The Operating System decides the same based on the priority of the process depending if there exists any and certain pre-defined algorithms. The following section explains some related terminologies.

Process
A process may be defined as the running instance of a program characterized by a change of state and attributes. Each and every process maintains a Process Control Block or PCB of its own.

Process Control Block
A process control block (PCB) is a data structure that contains information related to a running process. These include:
· Process ID
· Processor Information
· Process State
· Process Priority
· Stack information
· Memory information at which the process has been loaded
Process States
A process changes its state from one state to another depending on its required activity. The process can be in one of the following states.
· Ready
· Running
· Suspended

Thread
A thread is a light weight process. It is the smallest unit of CPU utilization and is also the path of execution within a process. A task is an enhanced form of a thread. Each and every process should have at least one thread; this is the primary or the main thread of the application. All other user created threads run in the background and are also called worker threads. When the application’s main thread terminates so does the application.

User Level Threads
The User Level threads are those that are executed in the User’s memory context and do not make use of System calls. Therefore, Kernel switching does not occur in User Level threads.
Kernel Level Threads
The Kernel Level threads are those that are executed in the Operating System’s Kernel memory context. The threads are managed and controlled by the Kernel using System calls.
Inter Process Communication
This refers to the communication between two or more processes for the purpose of data and message transfer.
Multithreading
Multithreading is the ability of the operating system to have at the same of time multiple threads in memory that switch between the tasks. This is to provide a pseudo parallelism, as if all the tasks are running simultaneously. This illusion of concurrency is ensured by the Operating System by providing a specific time slice to each and every thread and then switching between the threads very fast once their slice is over.
Multithreading can be of the following types.
· Serial
· Cooperative
· Preemptive
In the serial mode of multithreading a thread is executed by the Operating System and until the execution of that thread is over, any other thread cannot be executed. Hence, a thread has to wait until the earlier thread's turnaround time is over. In other words, the currently executing thread monopolizes the processor. In the Cooperative mode of multithreading, a thread can have the control of the processor as long as it needs without the need to necessarily preempt them. In order words, in this type of multithreading the control of the processor lies with the executing thread. In the preemptive mode of operation however, the operating system has control over the processor and decides the time slice for each thread for which it would execute and preempt threads if and when required. Serial Multithreading is supported by the MS DOS operating system, cooperative multithreading is supported by Windows 3.11, while preemptive mode is supported by Windows 98, NT.

Thread Priorities
Thread priorities are values that can be set to distinguish one thread from another depending on their priorities. A thread with a higher priority would execute more frequently than a thread having a comparatively less priority.
Multitasking
A task is an enhanced form of a thread. Multitasking is the logical extension of multiprogramming. The following list shows the names of some commonly used Operating Systems and the type of multitasking that they support.
· DOS : Serial Multitasking
· Win 3.11 : Co-operative Multitasking
· Win 9x/NT : Preemptive Multitasking
· UNIX : Time Sliced Priority Based Multitasking

Multiprocessing
Multiprocessing or parallel processing refers to multitasking on multiple processors. It is of the following two types.
· Symmetric
· Asymmetric
File and I/O Management

This is the module of the Operating System that is responsible for creating and/or deleting files in the file system and managing the input and output of data in the file system.
File System
A File System refers to the arrangement in a secondary storage that is done by the Operating System for the purpose of data storage and retrieval. The File System of any two Operating Systems is not identical. The following are the names of the Operating Systems and the respective file systems that they follow.
· DOS : FAT File System
· Windows 9x : VFAT
· Windows XP/NT/2000/2003 : NTFS
· Windows Vista : NTFS
· UNIX : UFS (UNIX File System)
· Linux : Ext II File System
Note: Windows Vista is now built on the NTFS file system. Windows Future Storage (WinFS), a relational database based data storage engine, is currently under development and will be introduced later as a free add-on for Windows Vista in late 2006.
Root File System
The Root File System specifies the information related to the files on the disk or the secondary storage. Typical contents include the following.
· Name of the file
· Starting Cluster Number
· Size of the file
· Date and Time stamp
· File Permissions

File Control Block
A File Control Block (FCB) is a data structure that contains information related to the files that are present on a File System. Even though the contents of the FCB would vary from one Operating System to another, the following are the common parts that it contains.
· Name of the file
· Location
· Size of the file
· Date and Time stamp

Disk Fragmentation and De-Fragmentation
The files created in the secondary storage are created and deleted as needed. Allocation of the clusters for a file in the file system is non–contiguous. The Operating System maintains a free cluster list to keep track of the clusters that are available for use or re-use. Due to deletions of one or more files in the file system, the clusters that are allocated to a file are not in sequence, but rather they are scattered all over the disk with free clusters or holes in between. This concept is known as disk fragmentation. The disk de-fragmentation tools available are responsible for compacting or arranging the clusters of a file contiguously in the disk.

Memory Management
This is the module of the Operating System that manages memory in a system by deciding when to allocate and de-allocate memory to a process, how much to allocate and the scheduling of these processes. The following section lists the major concepts and terminologies that are related to Memory Management.
Contiguous and Non–Contiguous Memory Allocation
In Contiguous Memory allocation strategies, the Operating System allocates memory to a process that is always in a sequence for faster retrieval and less overhead, but this strategy supports static memory allocation only. This strategy is inconvenient in the sense that there are more instances of internal memory fragmentation than compared to Contiguous Memory Allocation strategies. The Operating System can also allocate memory dynamically to a process if the memory is not in sequence; i.e. they are placed in non–contiguous memory segments. Memory is allotted to a process as it is required. When a process no longer needs to be in memory, it is released from the memory to produce a free region of memory or a memory hole. These memory holes and the allocated memory to the other processes remain scattered in memory. The Operating System can compact this memory at a later point in time to ensure that the allocated memory is in a sequence and the memory holes are not scattered. This strategy has support for dynamic memory allocation and facilitates the usage of Virtual Memory. In dynamic memory allocation there are no instances of internal fragmentation.

Kernel
This is the core of the Operating System that is responsible for Memory and Processor Management in the system. The Kernel in MS DOS Operating System is housed in the msdos.sys file.
Bootstrap Process
This is a process by which an Operating System is loaded from the disk onto the primary memory of the system. The Bootstrap loader is the module of the Operating System that gets loaded first and is present in the first physical sector of the disk.
Paging
In Virtual Memory Systems, a program in execution or a process is divided into equal sized logical blocks called pages that are loaded into frames in the main memory. The size of a page is always in a power of 2 and is equal to the frame size. Dividing the process into pages allows non-contiguous allocation in these systems.
Segmentation
Segmentation is a memory management technique that supports Virtual Memory. The available memory is divided into segments and consists of two components- a base address that denotes the address of the base of that segment and a displacement value that refers to the length of an address location from the base of that segment. The effective physical address is the sum of the base address value and the length of the displacement value.
Page Fault
A Page Fault occurs when there is a request for a page that is not available in the main memory. The Page Map Table for such a page has its presence bit not set. When a page fault occurs, the Operating System schedules a disk read operation to retrieve the page from the secondary storage and load the same to the main memory.
Virtual Memory
Virtual Memory refers to the concept whereby a process with a larger size than available memory can be loaded and executed by loading the process in parts. The program memory is divided into pages and the available physical memory into frames. The page size is always equal to the frame size. The page size is generally in a power of 2 to avoid the calculation involved to get the page number and the offset from the CPU generated address. The virtual address contains a page number and an offset. This is mapped to the physical address by a technique of address resolution after searching the Page Map Table.
Demand Paging
In Virtual Memory Systems the pages are not loaded in memory until they are "demanded" by a process; therefore the term, demand paging. Demand paging allows the various parts of a process to be brought into physical memory as the process needs them to execute.
Thrashing
This is a condition that indicates that due to excessive paging a particular process is in the halted state or executing very slowly. It is a condition in which a multi-programmed environment is equivalent to a mono-programmed environment. The causes of thrashing can be attributed to one or more of the following.
· Increase in the degree of multi programming
· Insufficient memory at a particular point of time
· The program does not exhibit locality of reference
Thrashing can be reduced by analyzing the CPU utilization and reducing the degree of multi-programming, which in turn is a non-negative integer that indicates how many programs are in the memory at the same point of time in a multi-programmed environment waiting for its turn to get the processor.
Cache Memory
Cache Memory is a high speed memory in the Random Access Memory (RAM). The processor looks for data first in the Cache Memory and then depending on whether there is a Cache hit or miss, searches for the same in other parts of the primary memory.
A Cache hit indicates that the data searched for in the Cache by the CPU is available. The reverse is Cache miss. Typically the size of the Cache in a system is limited and varies depending on the system’s configuration.
Memory Fragmentation
This occurs in dynamic memory allocation when a process is allocated memory blocks that are non-contiguous to support multi-programming. Memory fragmentation can be of the following two types.
· Internal Fragmentation
· External Fragmentation
Internal fragmentation refers to the space that remains unused inside an allocated block. Internal fragmentation is internal to the allocated memory block and therefore the name. In dynamic memory allocation systems there are situations when the combined size of the free memory blocks is insufficient to satisfy an incoming request to load a process in the main memory. This is termed external fragmentation.
Context Switch
This refers to switching the CPU from one process to another by saving the state of the old process in the stack and executing the new process. The time required to perform this kind of a switch is an overhead as the CPU remains idle at that point of time and it varies from one Operating System to another.
Scheduling
This is an activity of the Operating System that decides the next process to be executed by the CPU. The module of the Operating System that is responsible for this activity is known as the Scheduler. There is variety of scheduling algorithms and the algorithm to be used for scheduling depends on the Operating System being used.
Semaphore
A semaphore is the name given to a protected variable that can be assessed by only one process at any point of time.
Synchronization
Synchronization guarantees that only one thread can access the synchronized block of code or synchronized object at any point of time.
Mutual Exclusion
This ensures that only one process performs a certain task to a resource at any point of time.
Critical Section
This is a block of code that can be executed by only one thread at any point of time. We say that this block is synchronized to ensure thread safety.
Deadlocks
A deadlock is a condition that occurs when two threads attempt to access a resource that has already been locked by them. In such a situation, none of the threads can execute and they are in a halted state. This situation can be avoided if both threads acquire these locks on the resources in the same order.
Race Conditions
A race condition is one that can occur due to improper thread synchronization when several threads try to access the same resource at the same time. As a consequence, the resource remains in an undefined state. A race condition can be avoided by using thread synchronization to ensure thread safety.
Real Time Operating Systems
A Real Time Operating System (RTOS) is one in which the response to an event takes place in real time (in other words, as and when it is required). A typical example of a RTOS is the operating system used for flight control. Real Time Operating Systems are typically of two types, Hard Real Time and Soft Real Time. In the former the critical tasks are completed in time, while in the latter they are executed based on their priority.

Peripheral Management
The Operating System talks to the devices in a computer system using device drivers that are special programs designed to interact with the physical devices of the system. The device manager isolates the device drivers from the Kernel of the OS and the user applications from the system’s hardware. It acts as an interface between the device drivers and both the kernel and user applications. The salient concepts and related terminologies are discussed in the section that follows.

Interrupt
An interrupt is a signal that informs the processor that a particular device wants its attention. The processor responds to the request, saves the status of the current activity, executes the requested activity and on completion, retrieves the saved activity and resumes the same. Interrupts are of two types, Hardware Interrupts and Software Interrupts.
System Call
A System call is invoked by a software interrupt that transfers the control to the Kernel. A System call is executed by a Kernel and uses a CPU instruction to execute more privileged code.
Interrupt Vector
This is an area of memory that contains an array of the addresses of the interrupt service routines that correspond to a specific interrupt number.
Command Interpretation
The Operating System contains a command interpreter that accepts and interprets a command from the user and executes the same. The command interpreter of MS DOS Operating System is contained in the command.com file. In MS DOS it is also possible to specify a different command interpreter other than command.com; in such a case the name of the command interpreter needs to be mentioned in the config.sys file.

.Net technical faqs

How do I specify break-points in my code?
Once you follow the steps that will turn on script debugging in IE and VS.Net, you can either set break points in VS.Net include the "debugger;" statement anywhere in your script code.

When I Debug ASP.NET Applications I get error message "Access Is Denied. Check the DCOM Configuration Settings for the Machine Debug Manager"?
You can get this error if you are user who is trying to remotely debug and you are not a member of the Debugger Users group on the Microsoft Internet Information Server (IIS) server. To add the appropriate user to the Debugger Users group, follow these steps on the Web server:
1. From the Windows Start menu, point to Programs, point to Administrative Tools, and then click Computer Management.
2. In the left pane, click to expand the Computer Management, System Tools, and Local Users and Groups nodes.
3. Click Groups, and then double-click Debugger Users.
4. In the Debugger Users Properties dialog box, click Add.
5. In the Select Users or Groups dialog box, select the appropriate user, and then click OK.
6. Click OK to exit the Debugger Users Properties dialog box.
7. Close the Computer Management explorer.

On Trying to Debug an application, by the F5 key I get the error: "Error while trying to run project: Unable to start debugging on the web server. Catastrophic failure"?
This issue occurs if the account that is used to run the ASP.NET Worker process (by default, the ASPNET user account) is not assigned the "Impersonate a client after authentication" user right in the "Local Security Policy" settings. This issue may occur when you install Microsoft Visual Studio .NET after you install Windows 2000 Service Pack 4 (SP4) on the computer. In this situation, the ASPNET account is not assigned the "Impersonate a client after authentication" user right in the "Local Security Policy" settings.To resolve it, please use the method at: To work around the problem, manually assign Impersonate a client after authentication to the IWAM account. To do so, follow these steps:
1. Click Start, point to Programs, point to Administrative Tools, and then click Domain Controller Security Policy.
2. Click Security Settings.
3. Click Local Policies, and then click User Rights Assignment.
4. In the right pane, double-click Impersonate a client after authentication.
5. In the Security Policy Setting window, click Define these policy settings.
6. Click Add, and then click Browse.
7. In the Select Users or Groups window, select the IWAM account name, click Add, and then click OK.
8. Click OK, and then click OK again.
9. To enforce an update of computer policy, type the following command: secedit /refreshpolicy machine_policy /enforce
How to configure my project for debugging ASP Code?
Access the Project properties window.
Select the Configuration Properties for debugging then in right Pane, under the debugger node select true for Enable ASP debugging
In Visual Studio .NET, whenever I try to debug my ASP.NET application I'm not able to stop the debugger on my breakpoints. Why?
Your ASP.NET project is not setup for debugging.
1. Open up the project's properties window and set the "Enable ASP.NET Debugging" option.
2. Open up your web.config file and make sure the Compilation tag's debug attribute is set to true.
3. Make sure the account you are logged in as and the ASP.NET Worker process is in the local "Debugger Users" group.

Why do I get the error message "Unable to start debugging on the web server..." when I debug?
There is a possibility that there is no web.config file for the project or there is no Execute permission for the project.
If you already have a web.config file, double check it's well-formedness.
If the web.config file is missing, add one to the directory that contains the ASP.NET application. You can copy one from the numerous samples applications available with the framework installation.
Make sure that the following section reads like this:
On the other hand, if your project already has a Web.config file, and the above section is set as specified, follow these steps to set the Execute Permissions property for the project folder:
1. Start Internet Services Manager, and then click the project that you are trying to debug.
2. Right-click the project, and then click Properties.
3. Click the Directory tab.
4. If None is selected in the Execute Permissions list, click Scripts only, and then click Apply
Why do I get error message "Unable to start debugging on the web server. The debugger is not properly installed. Run setup to install or repair the debugger. Would you like to disable future attempts to debug ASP.NET pages for this project ? "?

If someone has run a lockdown or other security tool on the Web server, the DEBUG method may have been removed.
Go into IIS manager to the Web application's properties and Directory >Configuration (button) > Mappings > Application mappings.
Check that for .aspx extensions, you allow GET,HEAD,POST,DEBUG
Of course you need to be a member of the Debuggers group on the remote server. To resolve error
1. Right-click the Project Name in Solution Explorer, and then click Properties.
2. In the left pane of Properties, click to select Configuration Properties.
3. Click to select Debugging.
4. In the right pane, change the value of Enable Unmanged Debugging to True (on the drop-down list).

How do I debug JavaScript and other script code in my application using Visual Studio .Net?
1) In IE go to Tools/Internet Options.../Advanced Tab and clear the "Disable Script Debugging" check box options.
2) In VS.Net in your project properties dialog, select "Debugging" under "Configuration Properties" and make sure that "Enable ASP.Net Debugging" is turned on.
3) You can then set break points in script code in VS.Net in custom script files or the application aspx file.
4) VS.Net should give you detailed debugging information for variables in the scope just like other high-level languages.

What are the different exception-handling approaches that can be used in ASP.NET?
• Using try, catch and finally block in the code
• Using the Error event procedures at the Page, Application or Global levels
• Using the Server Object's GetLastError and ClearError methods

Why do I get the "HTTP 404 - File not found." error message as "The page cannot be found.The page you are looking for might have been removed, had its name changed, or is temporarily unavailable "?
The reason for this error can be
• The requested file has been renamed.
• The requested file has been moved to another location and/or deleted.
• The requested file is temporarily unavailable due to maintenance, upgrades, or other unknown causes.
• The requested file does not exist.
• IIS 6.0: The appropriate Web service extension or MIME type is not enabled.
To resolve this refer Common reasons IIS Server returns "HTTP 404 - File not found" error

Why do I get the error message "Sql Server does not exists or access denied " whenever I try to access the data on Sql server?
• The ASP.NET worker process doesn't have the correct permissions to connect to or write to the SQL Server database. Either enable impersonation for users, or configure the ASP.NET worker process to run under the SYSTEM account.
• The ASPNET account cannot establish a named pipes connection to the database server. Try using TCP/IP instead of the Named Pipes protocol to connect to the database by adding "Network Library =dbmssocn" in your connection string

Why do I get error message "It is already opened exclusively by another user, or you need permission to view its data." when I try to open Access mdb?
The ASPNET worker process doesn't have the correct permissions to connect to or write to the Access database.
Either enable impersonation for users or configure the ASP.NET worker process to run under the SYSTEM account. You can also grant read and write permissions for the "Everyone" group on the database and the database folder.

How to Enable Remote Debugging on Windows XP Service Pack 2?
To enable remote debugging on Microsoft® Windows® XP SP2 platforms, the Internet Connection Firewall (ICF) must be configured as follows:
• If ICF is in Shielded mode, you will need to perform appropriate actions so that it is no longer in Shielded mode.
• If ICF is on, a few ports need to be opened and permissions must be granted to Microsoft® Visual Studio® and other executables that are involved in the remote debugging.
• If IFC is off, no firewall configuration is necessary.
• In addition, if the user running Visual Studio is not an Administrator on the remote machine,
DCOM settings need to be configured.

How to display errors using Page_Error event of Page Object?
VB.NET
Private Sub Page_Error(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Error
Response.Write(Server.GetLastError().ToString)
Server.ClearError()
End Sub
C#
//In InitializeComponent
this.Error += new System.EventHandler (this.Page_Error );
//
private void Page_Error(object sender, System.EventArgs e )
{
Response.Write(Server.GetLastError().ToString());
Server.ClearError ();
}

How to redirect the user to the friendly error-handler page when an Application error occurs?
Modify web.config as
The configuration section supports an inner tag that associates HTTP status codes with custom error pages.

Why do I get error message ""Parser Error Message: Access is denied: Source Error: Line xxx : ""?
The actual problem is because of the Microsoft Indexing Services which scans the Temporary ASP.NET Files and while doing so, the system puts a lock on the same.
To resolve this, the following steps need to be carried out:-
1. Start - Settings - Control Panel - Administrative Tools - Computer management.
2. Expand the services and applications node and select the Indexing service node.
3. Expand the Indexing Service Node and then select and expand the System Node.
4. Right click on Directories and select new directory. browse the path to the temporary asp.net files c:\winnt\microsoft.net\framework\v1.1.4322\.
5. Select the temporary asp.net files. give ok and then select the "NO" in the Include in index radiobutton.
6. give ok and then stop and start the indexing service.

Why do I get the error message "A potentially dangerous Request.Form value was detected from the client "?
Sounds like you are running version 1.1 of ASP.NET / .NET Framework, which added a new security feature called request validation. Request validation looks at every request and determines if it could be a possible CSS (Cross Site Scripting) attack. By default Request Validation is on for every page.
If you wish to allow users to post arbitrary HTML to you site you need to turn off request validation:

How can I test performance of the Web application?
One approach is to use the Microsoft Web Application Stress tool. It allows you to simulate load on a web server and can be used to test performance. The following kb article covers how to use it (including where to download it from).

How can I resolve the error message "Cannot access file '...' because it is being used by another process"?
You receive this error message if the following conditions are true:
• The assembly that is specified in the error message is a signed assembly and is not installed in the Global Assembly Cache (GAC); instead, the assembly is in the Bin directory of the ASP.NET Web application. -and-
• Your ASP.NET Web application has just been restarted.

Why do I get the Compiler Error Message: "CS0246: The type or namespace name '...' could not be found (are you missing a using directive or an assembly reference?) "?
This problem typically comes when:
• You do not have class with that name in your project
• You add the class later on and run the project without compiling
• You have the class but you do not specify the namespace via Imports or using keyword

Why do I get the error message "Compiler Error Message: CS1595"?
This problem occurs because the C# compiler does not have permission to access the folders in the path to the mscorlib.dll assembly
To resolve this problem, modify the compiler definition for the C# compiler to include the /nostdlib option. The /nostdlib option prevents the import of the mscorlib.dll assembly, which defines the entire System namespace. To include the /nostdlib option in the C# compiler definition on a computer, follow these steps:
1. Open the Machine.config file, and then locate the section.
2. In the definition for C#, add the compilerOptions attribute with a value of /nostdlib.

Why do I get the error message "System.InvalidOperationException: Application is restarting"?
This problem occurs because of some antivirus applications write back information to the files that they scan. Every time a user changes the Web.config configuration file, the Global.asax file, or the contents of the Bin folder, the application should restart to incorporate these changes. Because antivirus scanning changes cannot be distinguished from the user's file changes, the application restarts when the antivirus software scans these folders.
Note This problem may occur even when no error is returned. If the virus-scanning software triggers change notifications, every change notification is doubled at the very least: one real change notification and an additional change notification from the antivirus software some time later

How can I see the Trace messages?
For Page Level Tracing specify the Page Directive as
You can view the page on which trace is enabled to true to see the details.
For Application Level Tracing modify web.config as
You can view the Trace at http:////trace.axd

I have installed ASP.NET hotfix and I find that Startup Type of the ASP.NET Session State Service is set to Manual.Why?
Microsoft has acknowledged this as a Bug
To set the StartUp Type as desired refer following steps
1. In Control Panel, open Administrative Tools.
2. Click Services. The Services window appears.
3. Expand the Name column so that the complete name of each service appears.
Note A Startup Type column displays the current Startup Type value for each service.
4. Double-click the ASP.NET State Service service. The ASP.NET State Service Properties window appears.
5. On the General tab, click one of the following options in the Startup type list:
o Manual
o Automatic
o Disabled
6. Click Apply, and then click OK to save your settings.

In the Services window, notice your changes to the Startup Type in the Startup Type column.

Why do I get error message "System.Threading.ThreadAbortException: Thread was being aborted" while using Response.Redirect?
Response.Redirect will cause a ThreadAbort exception. To resolve this use
VB.NET
Response.Redirect(url,false)
C#
Response.Redirect(url,false) ;

I get error message at runtime "Value null was found where an instance of an object was required" when using Application state variables. why?
Application State variables must be initialized in C# before any operation is performed on them. For example.:
You need to assign value to Counter state variable before performing the case (int)Session["Counter"].
I installed Windows 2003 Standard Edition, then VS.NET and SQL Server 2K with SP3. When I build web project connecting to the database in VS.NET, the compiler gives me the following error:Login failed for user 'NT AUTHORITY\NETWORK SERVICE',why?
Add NT AUTHORITY\NETWORK SERVICE account to SQL Server , which will be in the local group. Make sure to give it the required database access and permissions

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.

Why am I getting the error: "Type '(OleDb or SQL)Connection' is not defined."?
You get this error when you have not imported the following namespaces in your code in the aspx file:
System.Data.SqlClient or System.Data.OleDb.

Why do I get the Error message "Operation must use an updateable query"?
If you're getting an error when Inserting or Updating an MS Access Database ('Operation must use an updateable query'), that's because the ASPNet user account needs the correct permissions on the directory where the database resides To fix this in Windows 2K:
• (Go into Accessories/Computer Management/Local Users & Groups/users You will see that there's an ASPNet user. )
• Right click on the directory where your database is - choose properties - Then the security tab - then click on permissions.
• Add the ASPNet user to the shared section
• Then, make sure it has 'Change' rights -
• Click Apply and you should be working fine then.

Whenever I browse to one of my ASP.NET web pages, Internet Explorer keeps on asking me if I want to download it, or it just displays the ASPX source. Why?
IIS does not have the correct mapping for the ASPX file extension. This can happen if you install IIS after installing the .NET Framework, or if you uninstalled and reinstalled IIS.
To repair IIS mappings for ASP.NET, you can run the Aspnet_regiis.exe utility.
When compiling I get "Could not copy temporary files to the output directory" or "The process cannot access the file because it is being used by another process" error messages. Why?

Visual Studio .NET is unable to copy your DLLs from Bin directory to a temporary ASP.NET files folder. This is due to having a trailing backslash in root web application, or in a virtual directory with child directories marked as Web applications.

Why do I get the error message "BC30451: Name 'ConfigurationSettings' is not declared"?
This is because you have not added namespace System.Configuration

Why do I get error message "Failed to Start Monitoring Directory Changes" when i try to browse ASP.NET page?
1. The ASPNET worker process doesn't have "Read & Execute", " List Folder Contents", " Read permissions" permissions to detect file changes in Web.Config, Machine.config, Bin files, or Cache dependency files.
2. Or one of the directory names in the hierarchy of that file path is greater than eight characters long.

Why do I get Compilation error " is not a member of "?
You may get this error if you have not give runat=server for a tag

How can the default focus can be set when a error occurs?
We can set SetFocusOnError="true" for the ASP.NET validators, So that the first control with the validation error will receive the default focus when the form is submitted.
First Name: *
Last Name: *
Here SetFocusOnError is set to true for the validation control, so that the TextBoxes gets focused when it is empty.

When compiling I get "Could not copy temporary files to the output directory" or "The process cannot access the file because it is being used by another process" error messages. Why?
Visual Studio .NET is unable to copy your DLLs from Bin directory to a temporary ASP.NET files folder. This is due to having a trailing backslash in root web application, or in a virtual directory with child directories marked as Web applications

Why do I get the error message "BC30451: Name 'ConfigurationSettings' is not declared"?
This is because you have not added namespace System.Configuration
How can I have a particular Web page in an ASP.NET application which displays its own error page.

This can be done by setting the ErroPage attribute of Page Directive or ErrorPage property of Page Class to the desired Custom Error Page

Why do I get error message "Unable to start debugging on the web server. The server does not support debugging of ASP.NET or ATL Server applications. ..."?
You would get this error if the application mappings for ASP.NET file name extensions (such as .aspx) are not configured correctly in Microsoft Internet Information Services (IIS).
To resolve this go to C:\Windows Directory\Microsoft.Net\Framework\Version and type aspnet_regiis -i to configure the required application mappings correctly
On Trying to Debug an application, by the F5 key I get the error: "Error while trying to run project: Unable to start debugging on the web server. Catastrophic failure"?
This issue occurs if the account that is used to run the ASP.NET Worker process (by default, the ASPNET user account) is not assigned the "Impersonate a client after authentication" user right in the "Local Security Policy" settings. This issue may occur when you install Microsoft Visual Studio .NET after you install Windows 2000 Service Pack 4 (SP4) on the computer. In this situation, the ASPNET account is not assigned the "Impersonate a client after authentication" user right in the "Local Security Policy" settings.To resolve it, please use the method at: To work around the problem, manually assign Impersonate a client after authentication to the IWAM account. To do so, follow these steps:
1. Click Start, point to Programs, point to Administrative Tools, and then click Domain Controller Security Policy.
2. Click Security Settings.
3. Click Local Policies, and then click User Rights Assignment.
4. In the right pane, double-click Impersonate a client after authentication.
5. In the Security Policy Setting window, click Define these policy settings.
6. Click Add, and then click Browse.
7. In the Select Users or Groups window, select the IWAM account name, click Add, and then click OK.
8. Click OK, and then click OK again.
To enforce an update of computer policy, type the following command: secedit /refreshpolicy machine_policy /enforce
At a command prompt, type iisreset. In case your server is a Domain Controller Refer PRB: "Catastrophic Failure" Error Message When You Try to Debug an ASP.NET Application on Windows 2000 Domain Controller

In Visual Studio .NET, whenever I try to debug my ASP.NET application I'm not able to stop the debugger on my breakpoints. Why?
Your ASP.NET project is not setup for debugging.
• Open up the project's properties window and set the "Enable ASP.NET Debugging" option.
• Open up your web.config file and make sure the Compilation tag's debug attribute is set to true.

Make sure the account you are logged in as and the ASP.NET Worker process is in the local "Debugger Users" group.

How to see the Message in the Output window using ASP.NET?
VB.NET
System.Diagnostics.Trace.Write("Your message")
C#
System.Diagnostics.Trace.Write("Your message");

How can I use Tracing in Custom Components?
In Custom Components, you can use tracing if you reference the System.Web namespace and use the HttpContext.Current object to get a reference to the current context. Eg:
VB.NET
System.Web.HttpContext.Current.Trace("xxx", "Message")
C#
System.Web.HttpContext.Current.Trace("xxx", "Message");

JAVA SCRIPT Code Samples

Question:-Some javasciprt good option?
(1) How to disable right click option body oncontextmenu="return false;"

(2)How to use Ltrim In Javascirpt?
var strTemp = " Left padded string";
alert(strTemp);
strTemp = LTrim(strTemp);
alert(strTemp);

(3)How to get A ASCII Value of ANy character ?
alert(Asc("a"));
alert(Asc("B"));

(4)Get Back Character to ASCII
alert(Chr(80));
alert(Chr(82));

(5)Use of CBool funation in javascript
var StringOne = "No";
if(CBool(StringOne))
{
alert("StringOne evaluates to true");
}
else
{
alert("StringOne evaluates to false");
}

(6)How to Add to integer in JAVSCRIPT ?
var One = CInt("17");
var two = CInt("35");
alert(One + Two);

(7)Concat two string
var One = CStr(1267);
var Two = CStr(3456);
alert(One + Two);

(8)How to add long Value in Javscript ?
var One = CSng("1267.45");
var Two = CSng("3456.67");
alert(One + Two);

(9)Get format acording to exponnet
var tal = 34.5562
alert(FormatCurrency(tal));
alert(FormatCurrency(1000));

(10)Number in the Format of Percent ?
var TheNumber = .15
alert(FormatPercent(TheNumber));

(11)How to get date in specific format ?
var date = "23/07/1983";
alert(date);
date = FormatDate(date,"mmmm/dd/yyyy")
alert(date);

(12)how to get Date ClientSide
var Date = GetDate("dd/mmmm/yyyy");
alert(Date);

(13)How to get Specific String in specific String
var StringOne = "here u can do this due to error Gitesh said ";
if(InStr(StringOne,"gitesh") > -1)
{
alert("Gites found in string");
alert("Term appears at character " + InStr(StringOne,"Gitesh"));
}

(14)How to check value is null or not ?
var EmptyVariable;
if(IsNull(EmptyVariable))
{
alert("Null value detected");
}

(15)How to check numeric value ?
var myVariable = "www.Dotnetquestion.info";
if(IsNumeric(myVariable))
{
alert("Numeric Value detected");
}

(16)how to join Array ?
var var = "dot,net ,question ";
var arr = Var.split(",");
var strTemp = Join(arr," - ");
alert(strTemp);

(17)Convert String in to Lower case ?
var strTemp = LCase("DOTNETQUESTION");
alert(strTemp);

(18)How to get first three Character of string ?
var str = "Dot Net Question";
Leftstr = Left(str,3);
alert(Leftstr);

(19)How to get a length of string ?
var i = Len("www.Dotnetquestion.info");
alert(i);

(20)How to get a substring from string ?
var Temp = "dot net programmer in dotnetquestion.info";
Temp = Mid(Temp,3,3);
alert(Temp);

(21)How to Get string in Proper Case ?
var temp = "gitesh chawla";
temp = PCase(temp);
alert(temp);

(22)Replace a string with another ?
var str = "www.dotnetquestion.com";
str = Replace(str,"com", "info");
alert(str);

(23)How to get string from right of string ?
var strTemp = "Here is javascript in dotnetquestion site";
strTemp = Right(strTemp,4);
alert(strTemp);

(24)Math function
var root = 4;
root = Sqr(root);
alert(root);

(25)How to match two string ?
var str1 = "dot net question"
var str2 = "DOT NET QUESTION"
if(strComp(str1,str2,1))
{
alert("Strings Match");
}

(26)Use of Intellisense Title Case ?
var str1 = "all about the dot net question";
str1 = TitleCase(str1);
alert(str1);

(27)How to get Number of Element in array ?
var strTemp = "dot ,net,question";
var arrTemp = strTemp.split(",");
alert("Array contains " + UBound(arrTemp) + " elements");

(28)How to get string in Upper Case ?
var str = "dot net question";
str = UCase(str);
alert(str);

dotnet faqs -II

What is Code Refactoring?
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 propertyis 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

What does the term immutable mean?
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 yousay 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 modifyingstrings 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.

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

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

How to Create Virtual Directory?
1. Click “Startàsettingsàcontrol Panel àAdministrative Toolsàinternet information services”
2. Expand Internet Information Server.
3. Expand the server name.
4. In the left pane, right-click Default Web Site, point to New, and then click Virtual Directory.
5. In the first screen of the New Virtual Directory Wizard, type an alias, or name, for the virtual directory (SiteName), and then click Next.
6. In the second screen, click Browse. Locate the content folder that you created to hold the Web content. Click Next.
7. In the third screen, click to select Read and Run scripts (such as ASP). Make sure that the other check boxes are cleared. Click Finish to complete the wizard.

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
6.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 takehelp of session through different web pages also.

ASP.NET in Linux ?
Mono provides the necessary software to develop and run .NET client and server applications on Linux, Solaris, Mac OS X, Windows, and Unix. Sponsored by Novell, the Mono open source project has an active and enthusiastic contributing community and is positioned to become the leading choice for development of Linux applications.

ArrayList in asp.net?
(1)Its capacity is increased if required as objects are added to it. So it frees programmer from the worries of array overflow.
(2)Provides methods to perform common operations -- append, insert, remove, replace etc.
(3)There is no restriction on the type of objects which can be added to an arraylist. First object could be a (4)string, second a double, third a user defined object and so on.
(5)ArrayList can be made read only after adding elements to prevent unintentional modifications.
(6)It provides an overloaded method to perform binary search on its objects.

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

How to Write to XML File ?
XmlTextWriter textWriter=new XmlTextWriter("filename.xml");
//WriteStartDocument and WriteEndDocument methods open and close a document for writing
textWriter.WriteStartDocument()
//write comment
textWriter.WriteComment("this is my first xml file.")
textWriter.WriteComment("i'm lovin it")
textWriter.WriteStartElement("studentDB")//write first element textWriter.WriteStartElement("student")
textWriter.WriteStartElement("name","");
textWriter.WriteString("sourabh");
textWriter.WriteEndElement();
textWriter.WriterEndElement();
textWriter.WriteEndDocument();
textWriter.Close();
}

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.

Define three test cases you should go through in unit testing?
1)Positive test cases (correct data, correct output).
2)Negative test cases (broken or missing data,proper handling).
3)Exception test cases (exceptions are thrown and caught properly).

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 does assert() method do?
In debug compilation, assert takes in a Boolean condition as a parameter, and shows the error dialog if the condition is false. The program proceeds without any interruption if the condition is true.

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 necessaryinformation 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 sidecore 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.

Something about Session ?
Sessions can be managed by two ways in case of webfarms:
1. Using SQL server or any other database for storing sessions regarding current logged in user.
2. Using State Server, as one dedicated server for managing sessions. State Server will run as service on web server having dotnet installed.In ASP.NET there is three ways to manage session objects. one support the in-proc mechanism and other two's support the out-proc machanism.

1) In-Proc (By Default)
2) SQL-Server (Out-proc)
3) State-Server (Out-Proc)

What is Server.Transfer and Response.Redirect ?
Server.Transfer transfers page processing from one page directly to the next page without making a round-trip back to the client's browser. This provides a faster response with a little less overhead on the server. Server.Transfer does not update the clients url history list or current url.

Response.Redirect is used to redirect the user's browser to another page or site. This performas a trip back to the client where the client's browser is redirected to the new page. The user's browser history list is updated to reflect the new address.

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

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

What is Code Refactoring?
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.

Question:-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

Question:-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.

Question:-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.

Question:-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.

Question:-Connection String ?
ODBC
Standard Security:"Driver={SQLServer};Server=UrServerName;Database=pubs;Uid=myUsername;Pwd=myPassword;"

Trusted connection:"Driver={SQLServer};Server=UrServerName;Database=pubs;Trusted_Connection=yes;"

Prompt for username and password:oConn.Properties("Prompt") = adPromptAlways
oConn.Open "Driver={SQL Server};Server=UrServerName;DataBase=pubs;"


OLE DB, OleDbConnection (.NET)

Standard Security:"Provider=sqloledb;Data Source=UrServerName;Initial Catalog=pubs;User Id=myUsername; Password=myPassword;"

Trusted Connection:"Provider=sqloledb;Data Source=UrServerName;Initial Catalog=pubs;Integrated Security=SSPI;"

(use serverName\instanceName as Data Source to use an specifik SQLServer instance, only SQLServer2000)

Prompt for username and password:
oConn.Provider = "sqloledb" oConn.Properties("Prompt") = adPromptAlways
oConn.Open "Data Source=UrServerName; Initial Catalog=pubs;"

Connect via an IP address:"Provider=sqloledb;Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;
Initial Catalog=pubs;User ID=myUsername;Password=myPassword;"
(DBMSSOCN=TCP/IP instead of Named Pipes, at the end of the Data Source is the port to use (1433 is the default))

SqlConnection (.NET)

Standard Security:"Data Source=UrServerName;Initial Catalog=pubs;User Id=myUsername;Password=myPassword;"

OR
"Server=UrServerName;Database=pubs;UserID=myUsername;Password=myPassword;
Trusted_Connection=False
(both connection strings produces the same result)

Trusted Connection:"Data Source=UrServerName;Initial Catalog=pubs;Integrated Security=SSPI;"

OR
"Server=UrServerName;Database=pubs;Trusted_Connection=True;"
(both connection strings produces the same result)
(use serverName\instanceName as Data Source to use an specific SQLServer instance, only SQLServer2000)

Connect via an IP address:
"Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;Initial Catalog=pubs;User ID=myUsername; Password=myPassword;"

(DBMSSOCN=TCP/IP instead of Named Pipes, at the end of the
Data Source is the port to use (1433 is the default))

Data Shape
MS Data Shape "Provider=MSDataShape;Data Provider=SQLOLEDB;Data Source=UrServerName;Initial Catalog=pubs;
User ID=myUsername;Password=myPassword;"


Question:-Connection string Parameter?
Provider=Microsoft.Jet.OleDb.4.0;Data Source=C:\Northwind.mdbParameters in a Connection String - The parameters depends on which data provider is being used.

Server - The name of the SQL Server we wish to access. This is usually the name of the computer that is running SQL server. We may use "local" or "localhost" for local computer. If we are using named instances of SQL server, then the parameter would contain the computer name, followed by a backslash, followed by the named instance of the SQL server.

Database - The name of the database we want to connect to.

User ID - A user ID configured in the SQL Server by the SQL Server administrator.

Password - The password associated with the user ID used.

Note that connection string can also contain the Windows NT account security settings. This is done very simple, by passing the paramater "integrated security=true".

Question:-Diffrence between HTML control and Server Control ?
ASP.NET Server Controls
Advantages:
1. ASP .NET Server Controls can however detect the target browser's capabilities and render themselves accordingly. No issues for compatibility issues of Browsers i.e page that might be used by both HTML 3.2 and HTML 4.0 browsers code to be written by you.
2. Newer set of controls that can be used in the same manner as any HTMl control like Calender controls. (No need of Activex Control for doing this which would then bring up issues of Browser compatibility).
3. Processing would be done at the server side. In built functionality to check for few values(with Validation controls) so no need to choose between scripting language which would be incompatible with few browsers.
4. ASP .NET Server Controls have an object model different from the traditional HTML and even provide a set of properties and methods that can change the outlook and behavior of the controls.
5. ASP .NET Server Controls have higher level of abstraction. An output of an ASP .NET server control can be the result of many HTML tags that combine together to produce that control and its events.

Disadvantages:
1. The control of the code is inbuilt with the web server controls so you have no much of direct control on these controls
2. Migration of ASP to any ASP.NET application is difficult. Its equivalent to rewriting your new application

HTML Server Controls
Advantages:
1. The HTML Server Controls follow the HTML-centric object model. Model similar to HTML
2. Here the controls can be made to interact with Client side scripting. Processing would be done at client as well as server depending on your code.
3. Migration of the ASP project thought not very easy can be done by giving each intrinsic HTML control a runat = server to make it HTML Server side control.
4. The HTML Server Controls have no mechanism of identifying the capabilities of the client browser accessing the current page.
5. A HTML Server Control has similar abstraction with its corresponding HTML tag and offers no abstraction.

Disadvantages:
1. You would need to code for the browser compatibility.

HTML Intrinsic Controls
Advantages:
1. Model similar to HTML
2. Here the controls can be made to interact with Client side scripting

Disadvantages:
You would need to code for the browser compatibility

Question:-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.

Question:- What is PostBack & Callback?
One technique that current ASP.NET 1.0/1.1 developers use to overcome this postback problem is to use the Microsoft XMLHTTP ActiveX object to send requests to server-side methods from client-side JavaScript. In ASP.NET 2.0, this process has been simplified and encapsulated within the function known as the Callback Manager.

The ASP.NET 2.0 Callback Manager uses XMLHTTP behind the scenes to encapsulate the complexities in sending data to and from the servers and clients. And so, in order for the Callback Manager to work, you need a web browser that supports XMLHTTP. Microsoft Internet Explorer is, obviously, one of them.

Question:-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

Question:- 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 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.

Question:what is ado.net ?
ADO.NET is the primary relational data access model for Microsoft .NET-based applications.
It may be used to access data sources for which there is a specific .NET Provider,or, via
a.NET Bridge Provider, for which there is a specific OLE DB Provider, ODBC Driver, or JDBC Driver.

Question: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 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.

Question: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.

Question: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.

Question: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.

Question:what is the difference between serializable and MarshalByRefObjec
In .net Remoting if ypu want your class to be participated in remoting it has to inherit from MarshalByRefObject class so that class definition can be passed by reference Where as [seraliazable] attribute is preceded before class that is can be seralized but this is used in conjuction with MarshalByValue class. Because when we pass by value then only we require this attribute.

Display the number of users/sessions currently active your website.
Using the Session_Start and Session_End Events

Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
' Fires when the session is started
Application("UserCount") = Application("UserCount") + 1
End Sub

Sub Session_End(ByVal sender As Object, ByVal e As EventArgs)
' Fires when the session ends
Application("UserCount") = Application("UserCount") - 1
End Sub

To Display UserCount, add a Label Control to the WebForm, name it lblUserCount

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
Me.lblUserCount.Text = "User(s) online " & Application("UserCount")
End Sub

Display the number of users/sessions currently active your website.
Using the Session_Start and Session_End Events


Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
' Fires when the session is started
Application("UserCount") = Application("UserCount") + 1
End Sub

Sub Session_End(ByVal sender As Object, ByVal e As EventArgs)
' Fires when the session ends
Application("UserCount") = Application("UserCount") - 1
End Sub

To Display UserCount, add a Label Control to the WebForm, name it lblUserCount

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
Me.lblUserCount.Text = "User(s) online " & Application("UserCount")
End Sub

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

Question:-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.

Question:How do I make a reference type parameter as a readoly parameter?Assuming that it is, and that all the data fields are only accessible via parameters, then you can create an interface for the class that only allows access to the parameters via a get. Add this interface to the class definition, then where you need the instance of the class to be read only, access it through the interface.

Question:Differnce in ASP.NET1.1 to ASP.NET2.0
In ASP.net 1.x:
function __doPostBack(eventTarget, eventArgument)
{
var theform;
if (window.navigator.appName.toLowerCase().indexOf("microsoft") > -1)
{
theform = document.Form1;
}
else
{
theform = document.forms["Form1"];
}
theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit();

---In ASP.net 2.x:
function __doPostBack(eventTarget, eventArgument)
{
if (!theForm.onsubmit || (theForm.onsubmit() != false))
{
theForm.__EVENTTARGET.value = eventTarget;
theForm.__EVENTARGUMENT.value = eventArgument;
theForm.submit();
}
}

Question:To set the culture and UI culture for an ASP.NET Web page declarativelyTo 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:

To set the UI culture and culture for an individual page, set the Culture and UICulture attributes of the @ Page
directive, as shown in the following example:
<%@ Page UICulture="es" Culture="es-MX" %>

Question:-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

Question:-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.

Question: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.

What’s the difference between System.String and System.StringBuilder classes?
System.String is immutable; System.StringBuilder was designed with the purpose of having a mutable string where a variety of operations can be performed.

Question:-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.

Question:-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.

Question: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)

{
//custom code
base.OnPreInit(e);
}
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.

Question: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 them)

Question: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.

Question:Form Authentication in ASP.NET
The web.config file




loginUrl="login.aspx" protection="All"
timeout="30" path="/" />







What you have to keep watch to is the lines with and tags. Chjeck if user is Authenticate
FormsAuthentication.RedirectFromLoginPage(MyLogin.UserId, false);

Question: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.

Question:-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.

Question:-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

Question:-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.

Question:-Describe session handling in a webfarm ?
State Server is used for handling sessions in a web farm. In a web farm, make sure you have the same in all your webservers.
Also, make sure your objects are serializable. For session state to be maintained across different web servers in the web farm, the Application Path of the website (For example \LM\W3SVC\2) in the IIS Metabase should be identical in all the web
servers in the web farm

Question:-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.

Question:-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 between method 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.

Question:-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 handled 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.

Question:-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 (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.

Question:-Diffrence between Java & Javascript ? Java and JavaScript are two completely different languages in both concept and design!

Java
Java (developed by Sun Microsystems) is a powerful and much more complex programming language - in the same category as C and C++.

Javascript
JavaScript was designed to add interactivity to HTML pages
JavaScript is a scripting language (a scripting language is a lightweight programming language)
A JavaScript consists of lines of executable computer code
A JavaScript is usually embedded directly into HTML pages
JavaScript is an interpreted language (means that scripts execute without preliminary compilation)
Everyone can use JavaScript without purchasing a license

Question:-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}

Question:-What is read only and its example ?
A read only member is like a constant in that it represents an unchanging value. The difference is that a readonly member can be initialized at runtime, in a constructor as well being able to be initialized as they are declared. For example
public class MyClass
{
public readonly double PI = 3.14159;
}
Because a readonly field can be initialized either at the declaration or in a constructor, readonly fields can have different values depending on the constructor used. A readonly field can also be used for runtime constants as in the following example
public static readonly uint l1 = (uint)DateTime.Now.Ticks;

Question:-How we know exe is developed in .net Compatible languages or not ?
using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
namespace checkingnetproj
{
class Program
{
static void Main(string[] args)
{
string FullPATHofFile;
FullPATHofFile = "";
try
{
AssemblyName assemblyName = AssemblyName.GetAssemblyName(FullPATHofFile);
Console.WriteLine("{0} - is a .NET assmbly. ", FullPATHofFile);
}
catch (BadImageFormatException)
{
Console.WriteLine("{0} - Not .NET assmbly. ", FullPATHofFile);
}
Console.ReadLine();
}
}

Question:-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.

Question:-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.

Question:-From where are custom exceptions derived from ?
SystemException and ApplicationException are both derrived from Exception.SystemException is the predefined base class for exceptions that originate from theSystem namespace.ApplicationException is the class intended as a base for any application specificexceptions that it is decided, need to be defined.If you want to define your own "exceptions" for your own specific applicationthen it is considered good practice to derrive your own "exception" class fromApplicationExceptionpublic class
CustomException : ApplicationException .

Question:-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.

Question:-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.

Question:-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 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.

Question:-Diffrence between Showding and overriding ?
1. Purpose :
Shadowing : Protecting against a subsequent base class modification introducing a member you have already defined in your derived class
Overriding : Achieving polymorphism by defining a different implementation of a procedure or property with the same calling sequence
2.Redefined element :
Shadowing : Any declared element type
Overriding : Only a procedure (Function or Sub) or property
3.Redefining element :
Shadowing : Any declared element type
Overriding : Only a procedure or property with the identical calling sequence
4.Accessibility :
Shadowing : Any accessibility
Overriding : Cannot expand the accessibility of overridden element (for example, cannot override Protected
with Public)
5.Readability and writability :
Shadowing : Any combination
Overriding : Cannot change readability or writability of overridden property
6.Keyword usage :
Shadowing : Shadows recommended in derived class;Shadows assumed neither Shadows nor Overrides specified
Overriding : Overridable required in base class; Overrides required in derived class
7.Inheritance of redefining element by classes deriving from your derived class :
Shadowing : Shadowing element inherited by further derived classes; shadowed element still hidden
Overriding : Overriding element inherited by further derived classes; overridden element still overridden

Question:-How to Get DateDiffrence ?
DateTime startTime = DateTime.Now;
DateTime endTime = DateTime.Now.AddSeconds( 75 );
TimeSpan span = endTime.Subtract ( startTime );
Console.WriteLine( "Time Difference (seconds): " + span.Seconds );
Console.WriteLine( "Time Difference (minutes): " + span.Minutes );
Console.WriteLine( "Time Difference (hours): " + span.Hours );
Console.WriteLine( "Time Difference (days): " + span.Days );

Question:-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.

Question:-How to create a cookie in C#? HttpCookie cookie;
String UserID = "dotnetquestion";
cookie = new HttpCookie("ID");
cookie.Values.Add("ID", ID);
Response.Cookies.Add(cookie);

Question:-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.

Question:-What is the different between <%# %> and <%= %> ?
The <%# %> is used for databinding where as <%= %> is used to output the result of an expression. The expression inside <%# %> will be executed only when you call the page's or control's DataBind method. The expression inside <%= %> will be executed and displayed as and when it appears in the page.

Question:-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.

Question:-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.

Question:-How to get the hostname or IP address of the server ?

HttpContext.Current.Server.MachineName
HttpContext.Current.Request.ServerVariables["LOCAL_ADDR"]
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.

Question:-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.

Question:-How to change the Page Title dynamically ?
//Declare protected System.Web.UI.HtmlControls.HtmlGenericControl Title1 ; //In Page_Load Title1.InnerText ="Page 1" ;

Question:-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.

Question:-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 >

Question:-How Server control handle events ?
ASP.NET server controls can optionally expose and raise server events, which can be handled by developers.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

Question:-Can we develop web pages directly on an FTP server ?
Yes. Visual Web Developer now has built-in support for editing and updating remote web projects using the standard File Transfer Protocol (FTP). You can quickly connect to a remote Web site using FTP within the New Web Site and Open Web Site dialog box.

Question:-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.

Question:- 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.

Question:-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)

Question:-What is RAD ?
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.

Question:-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.

Question:-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

Question:-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.

Question:-How to diplay alert on post back from javascript ? Answer:- string strScript = " "; if ((!Page.IsStartupScriptRegistered("clientScript"))) { Page.RegisterStartupScript("clientScript", strScript); }

Question:-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

Question:-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 .

Question:-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

Question:-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.

Question:-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.

Question:-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.

Question:-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. we can make daemon thread by
Thread.Isbackground=true

Question :-How to create Arraylist,HashTable in asp.net ?
Answer:-Creating Arraylist in VB.NET and sort that
dim mycountries=New ArrayList
mycountries.Add("India")
mycountries.Add("USA")
mycountries.Add("Pakisatn")
mycountries.Add("Italy")
mycountries.TrimToSize()
mycountries.Sort()
Creating Hashtable in VB.NET
dim mycountries=New Hashtable
mycountries.Add("N","Norway")
mycountries.Add("S","Sweden")
mycountries.Add("F","France")
mycountries.Add("I","Italy")

Question:-Diffrence between temp table and table variable ?
Answer:- (1)Temp Tables are created in the SQL Server TEMPDB database and therefore require more IO resources and locking. Table Variables and Derived Tables are created in memory.
(2)Temp Tables will generally perform better for large amounts of data that can be worked on using parallelism whereas Table Variables are best used for small amounts of data (I use a rule of thumb of 100 or less rows) where parallelism would not provide a significant performance improvement.
(3)You cannot use a stored procedure to insert data into a Table Variable or Derived Table. For example, the following will work: INSERT INTO #MyTempTable EXEC dbo.GetPolicies_sp whereas the following will generate an error: INSERT INTO @MyTableVariable EXEC dbo.GetPolicies_sp.
(4)Derived Tables can only be created from a SELECT statement but can be used within an Insert, Update, or Delete statement.
(5) In order of scope endurance, Temp Tables extend the furthest in scope, followed by Table Variables, and finally Derived Tables.

Question:- What do you mean by Late Binding ?
Answer:-In LateBinding compiler not have any knowledge about COM's methods and properties and it get at runtime. Actually program learns the addresses of methods and properties at execution time.
When those methods and properties are invoked. Late bound code typically refers client objects through generic data types like 'object' and relies heavily on runtime to dynamically locate method addresses. We do late binding in C# through reflection. Reflection is a way to determine the type or information about the classes or interfaces.

Question:-What are the valid parameter types we can pass in an Indexer ?
Answer:-IN,OUT,INOUT are the valid parameter types that we can pass in a Indexer.

Question:- How do you write the multiple class in one tag?
Answer:- Using the following way you can set two classes.

it will apply two css class named first and second.

Question:-What is the Relation in CSS and HTML?
Answer:- Html is just for creating Web page and CSS is for modify or Design, content of the page, as color, buttons, blur, shadow, highlight, fade atc.

Question:-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.

Question: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 collectorthis 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

Question:-How to create and removethat cookies in asp.net ?Answer:-This is the syntax for creating a cookies.

HttpCookie SiteCookies = new HttpCookie("UserInfo");
SiteCookies["UserName"] = "Pervej";
SiteCookies["sitename"] = "dotnetRed";
SiteCookies["Expire"] = "5 Days";
SiteCookies= DateTime.Now.AddDays(5);
Response.Cookies.Add(SiteCookies);

Now syntax to remove this cookie:-

HttpCookie SiteCookies= new HttpCookie("UserInfo");
SiteCookies= DateTime.Now.AddDays(-1);
Response.Cookies.AddSiteCookies

Question:-Is it possible to get vale of viewstate value on next page ?
Answer:-View state is page specific; it contains information about controls embedded
on the particular page. ASP.NET 2.0 resolves this by embedding a hidden input field
name,__POSTBACK . This field is embedded only when there is an IButtonControl on the page and its PostBackUrl property is set to a non-null value. This field contains
the view state information of the poster page. To access the view state of the poster
page, you can use the new PreviousPage property of the page:
Page poster = this.PreviousPage;
we can find any control from the previous page and read its state:
Label posterLabel = poster.findControl("myLabel");
string lbl = posterLabel.Text;
Cross-page post back feature also solves the problem of posting a Form to multiple
pages, because each control, in theory, can point to different post back URL.