Posts Tagged ‘dotnet’

General Dot Net Interview Questions

Friday, December 12th, 2008

Key differences in features of .NET 2.0 and 3.5? 
.NET 3.5 has more advanced feature than .NET 2.0.They are WCF, WPF, WCS,WF and LINQ.

Is Dot-Net platform dependent or platform indipendent?
Net is not platform independent as it needs .Net framework to run. As MS is the owner, so it is including .Net frameworks in latest versions of Windows.MS is providing service pack using which you can manage old versions of Windows and other operating systems like Unix, Linux. But not yet, .Net is running in UNIX and Linux. So it is not platform independent. As it comprises of lot of languages, you can say it as language independent.
MS is saying Windows is best operating system but they are developing Windows OS on Unix platform.Also Java, it is also not platform independent as it requires JVM (Java Virtual Machine to run). But the case is JVM is coming in all operating systems by default. So you can take it as platform independent.

What is CAS? 
CAS: CAS is the part of the .NET security model that determines whether or not a piece of code is allowed to run, and what resources it can use when it is running. For example, it is CAS that will prevent a .NET web applet from formatting your hard disk. How does CAS work? The CAS security policy revolves around two key concepts - code groups and permissions. Each .NET assembly is a member of a particular code group, and each code group is granted the permissions specified in a named permission set. For example, using the default security policy, a control downloaded from a web site belongs to the ‘Zone - Internet’ code group, which adheres to the permissions defined by the ‘Internet’ named permission set. (Naturally the ‘Internet’ named permission set represents a very restrictive range of permissions.) 

IIS port number? How We get it? 
IIS default port numbers for http is 80 , for https 81, and for ftp its 21. These are the default port numbers but we can override this port numbers while creating a website (either SSL or normal) and while creating a ftp folder. 

What is postback form and what is autopostback? 
PostBack: It means page automatically goes to server and we can just make a check whther our page is on server for the first time or not.
Propert Page.IspostBack== true means your page has made a server visit. It is only a readOnly property i.e. we can only check that, cannot set this property accordingly.
AutoPostBack: It is property for .net controls to allow them to post the page to server and execute code-behind code at their events.
By Default,Button has this property set to true. For other controls like DropDownList,RadioButtonList etc., we have to set set it to true if we want to perform an action at their events like selectedIndexChanged etc.

How can you tell the application to look for assemblies at the locations other than its own install? 
Use the directive in the XML .config file for a given application. Make Your Homepage.

VB.Net Interview Questions

Thursday, October 16th, 2008

What is the purpose of .net frame work? 
.Net Framework is an umbrella technology and has a lot of different technologies under it. For example, it
1. introduces Asp.net for web development
2. has languages to write Windows program, Windows services, Web Services.
3. pre-coded solutions to common programming problems     called base class library. It includes user interface data accessdatabase connectivity cryptography web application development, numeric algorithms, and network communications
4. a runtime or virtual machine that manages the execution of programs written specifically for the framework,
5. and a set of tools for configuring and building applications  like visual studio.
It also introduces language independence by introducing common language runtime. You can write code in any language.
The .NET Framework is a key Microsoft offering and is intended to be used by most new applications created for the Windows platform.

What is the difference between visual basic and visual basic dot net?
VB.NET is Microsoft’s Visual Basic implemented onto their .NET Framework. While Visual Basic is part of Visual Studio, VB.NET is also part of the Visual Studio.NET release.

What is JIT(Just In Time) and How it works? 
Before the code can be executed,the .NET framework needs to convert the IL into CPU-specific code.the Just-In-Time(JIT) compiler translates the code from IL into managed native code.During the compilation,the JIT compiler compiles only the code that is required during execution instead of compiling the complete IL code.when an uncompiled method is invoked during execution,the JIT compiler converts the IL for that method into native code.during this  the code is also checked for type safety,Type safety ensures that objects are always accessed in a compilation way.

Crystal Reports

How to Pass string value to crystal report 11?
Code for this

Dim crParameterFieldDefinitions As ParameterFieldDefinitions
Dim crParameterFieldDefinition AsParameterFieldDefinition
Dim crParameterValues As New ParameterValues
Dim crParameterDiscreteValue1 As NewParameterDiscreteValue

crParameterDiscreteValue1.Value = Trim(tbPRAM.Text) — text box to hold value

crParameterFieldDefinitions =cryRpt.DataDefinition.ParameterFields()
crParameterFieldDefinition = crParameterFieldDefinitions.Item(”PRAM”)
crParameterValues =crParameterFieldDefinition.CurrentValues

crParameterValues.Clear()
crParameterValues.Add(crParameterDiscreteValue1)

crParameterFieldDefinition.ApplyCurrentValues(crPar ameterValues)

parameter PRAM must be set in your report.

How does VB.NET/C# achieve polymorphism? 
You can achive polymorphism by doing overloading and overwriting.
 

C# Interview Questions

Saturday, October 11th, 2008

What’s the top .NET class that everything is derived from?
System.Object.

Does C# support multiple-inheritance?
No.

Who is a protected class-level variable available to?
It is available to any sub-class (a class inheriting this class).

Are private class-level variables inherited?
Yes, but they are not accessible. Although they are not visible or accessible via the class interface, they are inherited.

Describe the accessibility modifier “protected internal”?
It is available to classes that are within the same assembly and derived from the specified base class.

What does the term immutable mean?
The data value may not be changed. Note: The variable value may be changed, but the original immutable data value was discarded and a new data value was created in memory.

What’s a delegate?
A delegate object encapsulates a reference to a method.

What’s a multicast delegate?
A delegate that has multiple handlers assigned to it. Each assigned handler (method) is called.

Is XML case-sensitive?
Yes.

What’s the difference between // comments, /**/ comments and /// comments?
Single-line comments, multi-line comments, and XML documentation comments.

How do you generate documentation from the C# file commented properly with a command-line compiler?
Compile it with the /doc switch.

What’s the difference between System.String and System.Text.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.

Can you store multiple data types in System.Array?
No.

What’s the advantage of using System.Text.StringBuilder over System.String?
StringBuilder is more efficient in cases where there is a large amount of string manipulation. Strings are immutable, so each time a string is changed, a new instance in memory is created.

Will the finally block get executed if an exception has not occurred?
Yes.

What’s the difference between the System.Array.CopyTo() and System.Array.Clone()?
The Clone() method returns a new array (a shallow copy) object containing all the elements in the original array. The  CopyTo() method copies the elements into another existing array. Both perform a shallow copy. A shallow copy means the contents (each array element) contains references to the same object as the elements in the original array. A deep copy (which neither of these methods performs) would create a new instance of each element’s object,resulting in a different, yet identacle object.

How can you sort the elements of the array in descending order?
By calling Sort() and then Reverse() methods.

What’s the .NET collection class that allows an element to be accessed using a unique key?
HashTable.

What’s the C# syntax to catch any possible exception?
A catch block that catches the exception of type System.Exception. You can also omit the parameter data type in this case and just write catch {}.

Can multiple catch blocks be executed for a single try statement?
No. Once the proper catch block processed, control is transferred to the finally block (if there are any). 

Explain the three services model commonly know as a three-tier application?
Presentation (UI), Business (logic and underlying code) and Data (from storage or other sources).

How does VB.NET/C# achieve polymorphism? 
You can achive polymorphism by doing overloading and overwriting.

ASP.Net Interview Questions

Saturday, October 11th, 2008

ASP.Net is a language or not? 
ASP.NET is not a language.It’s a frame work we can use to develop websites.

What is aspx? 
aspx is the extension used for Microsoft ASP.NET web pages.
ASP.NET is a framework that runs on the MS web server and allows for rich dynamic content. aspx files are compiled rather than interpreted, and run much faster than other scripted files.

What is the difference between ASP.NET &VB.NET?
Asp.net and vb.net both are in dot net family but asp.net is used to develop web site(web application) and vb.net is used to create a windows application.

What is the major difference between asp.net and c#.net? 
Asp.net is used to develop a web application by either using vb or c# based syntax. C#.net is used to develop a windows application.

What is the .net,why we use .net.what is the advantage to using .net other programming languages? 
.net is not a technology or language .it is an environment to develop an application either web/window/console based
It provide the ability to achieve versioning.
Remove legacy/dependancy over os end the com based componet.
Can acheieve side by side exceution.

How to publish my asp .net project on web site?
1.Rename to your home page as index.aspx

2.Open internet explorer and type the url ftp://xxxxx.xxx (your url).

3.You shoud enter the user name and password.

4.You can get some folders, in that open httpdocs, in this you have to paste the all pages.You can also paste the folders also but you should paste the all pages must directly but don’t paste in other folders.

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

What is the trace in ASP.NET? 
ASP.NET introduces new functionality that allows you to view diagnostic information about a single request for an ASP.NET page simply by enabling it for your page or application. Called tracing, this feature also allows you to write debug statements directly in your code without having to remove them from your application when it is deployed to production servers. You can write variables or structures in a page, assert whether a condition is met, or simply trace through the execution path of your page or application.  

What is Viewstate? 
View state is used by the ASP.NET page framework to automatically save the values of the page and of each control just prior to rendering to the page.When the page is posted, one of the first tasks performed by page processing is to restore view state. State management is the process by which you maintain state and page information over multiple requests for the same or different pages. 

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.The client side core consist of certain functions that are to be executed on server then it places request to the server and the server responses as the result in form of HTML.
 

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.The client side core consist of certain functions that are to be executed on server then it places request to the server and the server responses as the result in form of HTML. 
 

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. 
 
Where are shared assemblies stored ? 
Global assembly cache.

What is a web services? 
Web services is a excellent way of performing remote method calls.
Its a platform independent one because it follows the xml standards.
We can find the available services in http://uddi.org/ is the place for universal description,discovery and integration of web services.

Why web services are used in asp.net?
It is a specification to achieve cross language,cross pltform and cross device integration (or)it can be considered as a class definition  where the definitions is maintained with in the web server as a service such that the definitions  can be accessed from any application developed using any language for any platform or device.

What is the transport protocol you use to call a Web service? 
SOAP is the preferred protocol.

How can you debug failed assembly binds? 
Use the Assembly Binding Log Viewer (fuslogvw.exe) to find out the paths searched.  

What is the purpose of .net frame work? 
Net Framework is an umbrella technology and has a lot of different technologies under it. For example, it
1. Introduces Asp.net for web development
2. Has languages to write Windows program, Windows services, Web Services.
3. Pre-coded solutions to common programming problems   called base class library. It includes user interface data accessdatabase connectivity cryptography web application development, numeric algorithms, and network communications
4. A runtime or virtual machine that manages the execution of programs written specifically for the framework,and a set of tools for configuring and building applications  like visual studio.

It also introduces language independence by introducing common language runtime. You can write code in any language.
The .NET Framework is a key Microsoft offering and is intended to be used by most new applications created for the Windows platform. 

What is the difference between Server.Transfer and Response.Redirect? Why would I choose one over the other? 
Server.Transfer is used to post a form to another page. Response.Redirect is used to redirect the user to another page or site. 

Name two properties common in every validation control?
ControlToValidate property and Text property.

What is Satellite Assemblies?
Satellite assemblies are often used to deploy language-specific resources for an application. These language-specific assemblies work in side-by-side execution because the application has a separate product ID for each language and installs satellite assemblies in a language-specific subdirectory for each language. When uninstalling, the application removes only the satellite assemblies associated with a given language and .NET Framework version. No core .NET Framework files are removed unless the last language for that .NET Framework version is being removed. For example, English and Japanese editions of the .NET Framework version 1.1 share the same core files. The Japanese .NET Framework version 1.1 adds satellite assemblies with localized resources in a \\ja subdirectory. An application that supports the .NET Framework version 1.1, regardless of its language, always uses the same core runtime files. 

What data type does the RangeValidator control support?
Integer,String and Date.

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

What do you mean Class?
Class is an organized store-home in object-oriented programming that gives coherent functional abilities to a group of related code. Its are definition of an object, made up of software code. Using classes, you may wrap data and behavior together (Encapsulation).you may define classes in terms of classes (Inheritance).We can also override the behavior of a class using an alternate behavior (Polymorphisms).

Difference between Abstract and Interface?  
1.We can’t create instances for both
2.Single inheritance in abstract class, multiple 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.

What’s the difference between private and shared assembly?
Private assembly is used inside an application only and does not have to be identified by a strong name. Shared assembly can be used by multiple applications and has to have a strong name.

In your asp.net application there is a textbox, How can clear the textbox with out round trip?
Assume that your textbox ID is txt. And the button ID is btn. If you want to clear the text from textbox by clicking the button without refresh then do the following steps.

1) In Page_Load  write

btn.Attributes.Add(\”OnClick\”,\”clearIt();\”);

2) In javascript write the function

function clearIt()

{

document.getElementById(\’txt\’).value = \”\”;

}

Can we use http handlers to upload a file in asp.net? 
You can use HttpHandlers. But it is very limited. You can not get response back (status) if you use it. And it is very complex also. Generally we use Http Handlers to handle requests at Server Side like Putting common Authentication on Web services whole organization wide like this.

What is user control? 
User Control are the controls created by user. User Controls are created with the file .ascx extension. Suppose if same controls are to be repeated in several pages,we can create a user control and display it in all those pages. They have to be registered in the page with @Register directive.

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

Whats an assembly? 
Assemblies are the building blocks of .NET Framework applications; they form the fundamental unit of deployment, version control, reuse, activation scoping, and security permissions. An assembly is a collection of types and resources that are built to work together and form a logical unit of functionality. An assembly provides the common language runtime with the information it needs to be aware of type implementations. To the runtime, a type does not exist outside the context of an assembly.

Which property on a Combo Box do you set with a column name, prior to setting the DataSource, to display data in the combo box? 
DataTextField property.

How to dynamically change connection string in web.config? 
In web.config
<appsetting>
<add key =\”constr\” value =\”Persist Security Info=False;User ID=sa;password=sa;Initial Catalog=Database Name;Data Source=server Name\”/>
</appSettings>
in aspx page
string _constr;
_constr=ConfigurationManager.AppSettings[\"constr\"].ToString().

What is Flex-Grid in ASP.NET? 
In .net all data controls (GridView,Repeater,Datalist) are act like Flex grid.

What tags do you need to add within the asp:datagrid tags to bind columns manually?
Set AutoGenerateColumns Property to false on the datagrid tag.

What is the trace in ASP.NET? 
ASP.NET introduces new functionality that allows you to view diagnostic information about a single request for an ASP.NET page simply by enabling it for your page or application. Called tracing, this feature also allows you to write debug statements directly in your code without having to remove them from your application when it is deployed to production servers. You can write variables or structures in a page, assert whether a condition is met, or simply trace through the execution path of your page or application.  

What is delay signing? 
Delay signing allows you to place a shared assembly in the GAC by signing the assembly with just the public key. This allows the assembly to be signed with the private key at a later stage, when the development process is complete and the component or assembly is ready to be deployed. This process enables developers to work with shared assemblies as if they were strongly named, and it secures the private key of the signature from being accessed at different stages of development.

What is the use of AutoWireup in asp.net? 
AutoEventWireup attribute is used to set whether the events needs to be automatically generated or not.

What base class do all Web Forms inherit from? 
The Page class.

What property must you set, and what method must you call in your code, in order to bind the data from some data source to the Repeater control? 
You must set the DataSource property and call the DataBind method.

How to give hyperlink to a file in “asp net”? 
Use <a href=\”file:///hello.txt\”>Open file</a>

What are Codes Refactoring? 
It feature of Visual Web Express.Codes Refactoring Codes Refactoring enables we to easily and systematical makes changes to your code. Code Refactoring is support everywhere that you can writes codes including both code-behind and single-file ASP.NET pages. automatically promote a public field to a full property.

What is ASP.Net Web Matrix? 
This is a free ASP.NET development environment from Microsoft. As well as a GUI development environment, download includes simple web server that can be used instead of IIS to host ASP.NET apps. This opens up ASP.NET development to users of Windows XP Home Edition, which cannot run IIS.

What’s a strong name ? 
A strong name includes the name of the assembly, version number, culture identity, and a public key token.

What’s a bubbled event? 
When you have a complex control, like DataGrid, writing an event processing routine for each object (cell, button, row, etc.) is quite tedious. The controls can bubble up their eventhandlers, allowing the main DataGrid event handler to take care of its constituents.

What are the different types of sessions in ASP.Net? Name them? 
1.In Proc mode: stores session state in a web server by default.
2.State server mode: stores session state in a separate process called asp.net state services. Ensure that session state is preserved when web application is restarted and make session state available to multiple webservers within a web farm.
3.Sql server mode: stores session state in sql server database. State is preserved when application is restarted and available to multiple webservers.
4.Custom mode: enables you to store a custom session storage provider.
5.OFF mode: disable session state.

Difference between session and cookie? 
Cookies will set the same value for the variable or string throught the whole application when ever it is being run.But session sets or stores the value only till the time period when the application is running once if the application is closed the session value also willl become null.

Explain what a diffgram is? and a good use for one? 
The DiffGram is one of the two XML formats that you can use to render DataSet object contents to XML. For reading database data to an XML file to be sent to a Web Service.

Describe the role of inetinfo.exe, aspnet_isapi.dll andaspnet_wp.exe in the page loading process? 
inetinfo.exe is the Microsoft IIS server running, handling ASP.NET requests among other things.When an ASP.NET request is received (usually a file with .aspx extension),the ISAPI filter aspnet_isapi.dll takes care of it by passing the request tothe actual worker process aspnet_wp.exe. 

How to make Virtual Directory? 
Click “Start > settings> control Panel > Administrative Tools > internet information services”.Expand Internet Information Server. Expand the server name. In the left pane, right-click Default Web Site, point to New, and then click Virtual Directory. . In the first screen of the New Virtual Directory Wizard, type an alias, or name, for the virtual directory (site name), and then click Next. . In the second screen, click Browse. Locate the content folder that you created to hold the Web content. Click Next. 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.

Which method do you invoke on the DataAdapter control to load your generated dataset with data? 
The .Fill() method

Where are shared assemblies stored ? 
Global assembly cache.

Can I dynamically set the Image URL for Image Control? A)No B)Yes 
YES Why Not.
Hint: Use eval

How are you 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 text Writer. Write Comment(’this is my first xml file.’) textWriter.WriteComment(’i'm lovin it’) textWriter.WriteStartElement(’studentDB’) //

write first elementtextWriter.WriteStartElement(’student’) textWriter.WriteStartElement(’name’,”);
textWriter.WriteString(’sourabh’);
textWriter.WriteEndElement();
textWriter.WriterEndElement();
textWriter.WriteEndDocument();
textWriter.Close();
}

Whats the significance of Request.MapPath( ) ?
Maps the virtual path in the requested URL to a physical path on the server for the current request.

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

How to connect asp.net with sql server ? 
It can be done through ADO.Net(Connected or Disconnected Architecture).

How long the value session variable has an effect when it not used by the program ? 
20 Minutes.

Where’s global assembly cache located on the system ? 
Usually C:\\winnt\\assembly or C:\\windows\\assembly.

Automatic Memory Management ? 
It’s entirely too easy for a small mistake to cause a program to chew up memory and crash, sometimes bringing the operating system to a screeching halt in the process. Programmers understand that they’re responsible for releasing any memory that they allocate, but they’re not very good at actually doing it. In addition, functions that allocate memory as a side effect abound in the Windows API and in the C runtime library. It’s nearly impossible for a programmer to know all of the rules. Even when the programmer follows the rules, a small memory leak in a support library can cause big problems if called enough. The .NET Framework solves the memory management problems by implementing a garbage collector that can keep track of allocated memory references and release the memory when it is no longer referenced. A large part of what makes this possible is the blazing speed of today’s processors. When you’re running a 2 GHz machine, it’s easy to spare a few cycles for memory management. Not that the garbage collector takes a huge number of cycles–it’s incredibly efficient. The garbage collector isn’t perfect and it doesn’t solve the problem of mis-managing other scarce resources (file handles, for example), but it relieves programmers from having to worry about a huge source of bugs that trips almost everybody up in other programming environments. On balance, automatic memory management is a huge win in almost every situation.

What is the base class of the .Net ? 
System.Object.

What technology is used to seperate the code from asp.net page ? 
Partial page class.

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

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

Describe the difference between inline and code behind ?  
The main difference comes in that inline code is executed at a certain event level in the page lifecycle whether code-behind can be bounded to different levels of events (PreInit, Init, PreLoad, Load, DataBound, Unload, PreRender and so on)
Inline code written along side the html in a page. Code-behind is code written in a separate file and referenced by the .aspx page.

How can you tell the application to look for assemblies at the locations other than its own install ? 
Use the directive in the XML .config file for a given application.

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

Define a transaction. What are acid properties of a transaction ? 
Transaction is a sequence of operation performed as single unit of work. The sequence in which the operation are performed have the importance.
ACID (Atomicity,Consistency,Isolation and Durability) properties of a transaction are as follows:
Atomicity : Either all the operation of the transaction must be completed successfully or none of the operation is done at all.
Consistency: Completion of transaction must have the data in a consistent state.
Isolation: Changes made current transaction must be isolated from any other transaction running simultaneously.
Durability : Once the transaction is complete, it;s changes must persist permanently in the system.

What is the Global.asax used for? 
The Global.asax (including the Global.asax.cs file) is used to implement application and session level events. It resides in the root directory of the application. The .asax file extension signals that it’s an application file rather than an ASP.NET file that uses aspx. The Global.asax file is the central point for ASP.NET applications. It provides numerous events to handle various application-wide tasks such as user authentication, application start up, and dealing with user sessions. You should be familiar with this optional file to build robust ASP.NET-based applications.

What property must you set, and what method must you call in your code, in order to bind the data from some data source to the Repeater control? 
You must set the DataSource property and call the DataBind method.

Does ASP.NET supports Linux Environment? 
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 enthusiasticcontributing community and is positioned to become the leading choice for development of Linux applications.

Name two properties common in every validation control? 
ControlToValidate property and Text property.

What is the importance of HTML in web applications? 
It is important.But now-a-days due to other languages its use is decreasing.Earlier it was highly used for all sites.

How to attach javascript code into asp.net code?
Inorder to use script in your asp.net page place the script under head tag of ur aspx source page like this:
<head>
<script type=\”text/javascript\”>

———————-

—————–(place the script components here)

————————

—————————
</script>
</head>
 
Call the script functions from any control events called \”onclick()\” or \”onclientclick()\”

How ASP .NET different from ASP? 
Difference between ASP and ASP.NET

ASP stands for Active Server Pages. ASP.NET is the next
generation of ASP. After the introduction of ASP.NET, old
ASP is called ‘Classic ASP’.

Classic ASP uses vb script for server side coding. Instead,
ASP.NET supports more languages including C#, VB.NET, J#
etc. VB.NET is very similar to vb script, so it should be
easy for old Visual Basic or ASP programmers to switch to
VB.NET and ASP.NET

VB Script is a simple scripting language, where as VB.NET
or C# are modern, very powerfull, object oriented
programming languages. Just for that reason, you will be
able to write much more robust and reliable programs in
ASP.NET compared to ASP.

In classic ASP, there was no server controls. You have to
write all html tags manually. ASP.NET offers a very rich
set of controls called Server Controls and Html Controls.
It is very easy to drag and drop any controls to a web
form. The VS.NET will automatically write the required HTML
tags automatically for you.

ASP is interpreted, ASP.NET is compiled.

What is difference between Webportal and website?
A Website is all the pages, images and files contained under a domain name - such as www.happy-online.co.uk
A Web Portal is a type of Website. A Web Portal acts as a gateway to the internet. (A typical dictionary definition of the word portal would be - a doorway or a grand entrance.)
Take the website www.yahoo.com, this is a website, all the pages under the domain www.yahoo.com combine to make the website. However, Yahoo is often referred to as a Web Portal, if you have a look at the Yahoo Website you can see why it has often been called a Portal. The Website acts as a doorway (Portal) to the Internet, from the website you can search the web, go shopping, take part in auctions, read your email etc.

Key differences in features of .NET 2.0 and 3.5? 
.NET 3.5 has more advanced feature than .NET 2.0.They are WCF, WPF, WCS,WF and LINQ

What is cache?
A temporary data storage location, or the process of storing data temporarily. A cache is typically used for quick data access.

How to connect to sql server using windows authentication in asp?
In <Connection string> of web config file:
Write:
\”server=servername;datasource=databaseName;IntegratedSecurity=true\”
Done

What is Remoting? 
Remoting i s communication between  computers which are connect to each other through lan.

What is the .net,why we use .net.what is the advantage to using .net other programming languages? 
.net is not a technology or language .It is an environment to develop an application either web/window/console based.
It provide the ability to achieve versioning.
Remove legacy/dependancy over os end the com based componet.
Can acheieve side by side exceution.

How can you tell the application to look for assemblies at the locations other than its own install? 
Use the directive in the XML .config file for a given application.

Should validation (did the user enter a real date) occur server-side or client-side? Why? 
Client-side. This reduces an additional request to the server to validate the users input.

What is benefit of using grid? 
Main advantage with the grid is we can write bubble events means if we want to place some controls like text box, dropdownlist.To capture those child control events we can write only one single method for column of the grid.

How can i get the next records in gridview by clicking on “next”button using asp.net with C#? 
Gridview.selectedindex=girdview.selectedindex+1.

How to pass values from one form to another form? 
We can send information from one form to another using Cookies,Session,POST and GET methods in the form.

You have a query that runs slowly, how would you make it better? 
By creating index for the table to run the query fast and better.

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

How to select ,edit,delete data through the datagrid control? 
There is a property name called CommandName in the Data Grid row item. With you can differentiate the select wdit and delete.

What does WSDL stand for? 
Web Services Description Language.

What is global.asax? 
Event procegars as to be placed with in specal file called as glob al.asax.

How many config files are there in Asp.net? 
THERE IS ONLY ONE CONFIGURATION FILE i.e web.config file for an application.The web.config file mantains configuration settings of an application.It is written in xml.

How to get the individual control index inside an item template of a datagrid as my item template have more than one web controls? 
Suppose you have many controls in datagrid itemtemplate. If you want to find any of them you can simple follow following synatax
ControlType NameOfControl = e.Item.FindControl(\”ActualNameofControlInDataGrid \”) as ControlType.

Example:
Lets further explain it with example.
Suppose you have a checkbox named \”chkBoxMessage\” in your datagrid and you want to find it. You simply write following code.

CheckBox chkBoxMessage = e.Item.FindControl(\”chkBoxMessage\”) as CheckBox.

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 you say temp = temp + ‘new value’ new object is created, and values is saved in that. The temp object is immutable, 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. 

What is the differences between release and debug in asp.net?
Actually the diffrence between the debug and release mode is, in debug mode the advance version of the .exe file could not replaced while in release mode it is replaced to the new .exe.

How we implement Web farm and Web Garden concept in ASP.NET?At least give an example.
When an application is hosted by multiple processes on the same server it is said to be a web garden environment.Also if an application is hosted by multiple servers then it is said to be web farm environment.

Is it possible to make windows application in asp.net if not then what kind of software use or technique use for making windows application?
We can make windows application on Asp.Net with VB.Net or C#

Introduction to XML

Wednesday, October 8th, 2008

XML stands for Extensible Markup Language. XML can be used by anyone who is desirous of using web technologies to distribute information across the Internet or the intranet.

XML is another form of formatting a document with a web browser. XML is an powerful and effective tool for processing the contents of a document. In other words XML allows you to create your own tags. XML is a very simple and flexible markup language that can be used on any operating system or environment.

XML is also platform independent that is XML can run on any operating system. XML is a better form of describing the contents of a document to the user. XML allows the exchange of data on the web more easily and efficiently. XML does this by allowing the users to develop their own (DTD’s)

DTD’s are used for describing sets of tags and attributes to display the content in a desired format. XML vocabularies or applications are called as the individual markup language that is defined using DTD’s.

Genealogical Markup Language (GedML) and the Chemical Markup Language (CML) are the examples of XML vocabularies. GedML describe ancestral data and CML describes chemical formulas and molecules. XML is an extensive language that is not only used for describing data but is also used for describing metadata. Metadata means data about data. In a nutshell, XML is an effective method of describing data and Metadata that is platform independent and that it can be used on all operating systems.

XML is a subset of SGML. Its aim is to provide generic SGML to be served, received and processed on the web. XML has been designed for the interoperability with both SGML and HTML.

XML documents are made up of entities that are called as storage units. Some of them are parsed data and the others are unparsed data. XML enables a mechanism to provide constraints on the storage layout.

Is XML a database?
XML document is a collection of data. In other words it doesn’t make much difference between the other files that store data. A XML in a database format is a self describing, portable, and can describe data in tree or graph structure. XML is a sort of Database Management System (DBMS).

XML provides storage, schemas, query languages, programming interfaces and so on .It lacks in triggers, queries, multi-user access that a real database constitutes. The main advantage of XML is that the data is portable and it allows you to have nested entries.

XML allows you to preserve physical document structure, supports document level transactions and execute queries in an XML query language.

Mapping the XML document schema to the database schema does the transfer of data between XML documents and a database. Mappings between document schemas and database schemas are performed on attributes and text. There are 2 mappings that are generally used to map on XML document schema to the database schema:

1.TABLE BASED MAPPING
2.OBJECT RELATIONAL MAPPING

Native XML databases are designed especially to store XML documents .It is always possible to store data in XML documents in a native XML database. This is done so, when your data is semi-structured. Although, this kind of data can be stored in object oriented and hierarchical databases, it is always better to store it in a native XML database. It enables us to retrieve data much faster than a relational database. One more reason is to store data in a native XML database is to exploit XML specification capabilities, such as executing XML queries.

Using Stylesheets in XML
XML is a means of exchanging data between applications. It allows the developers to describe and structure their data in their own formats. As the XML gave more emphasis on data rather than formatting, the data in the XML document can be formatted in two ways:

1. USING CSS
2. USING XSL

Cascade Style Sheet( CSS):

Initially, Cascading Style sheets (CSS) were used for formatting the data in the XML documents. It allows the Web Developers to define a formatting for the elements in XML and the same can be applied to as many documents you like. The advantages are:

1.It has a Precise control over presentation
2.It is Resolution Independent
3.It downloads Faster
4.It is easy to maintain

Though it has a lot of advantages it also has following disadvantages.

1. The order of elements for display cannot be changed
2. An element cannot be processed more than once.
3. Generated text cannot be added to the presentation

USING eXtesible Stylesheet Language (XSL):

The difficulties that were encountered with CSS were removed by making use of XSL. XSL is an application of XML It allows you to create high performance XML based systems by integrating Server side XML processing’s. The need for transforming data from one format to the other results in splitting XSL into two groups:

i) XSLT – It describes how to transform XML. Document into other formats.
ii) XSL-FO- It describes formatting details of each element in the XML document.

i) XSLT:

The XML Style sheet Language Transformation (XSLT) is a mechanism of transforming one form of XML documents to the other form. It is a set of templates based on Xpath expressions that tells how to fetch a particular node from the XML documents. It is a part of XSL, which is a style sheet language for XML. XSLT is widely used in Websites Content Management to convert XML into HTML pages. It uses Xpath to define parts that match one or more templates. Xpath is an query language that allows you to identify the nodes. It can select nodes in any direction. An XSLT processor is used to perform transformations of XML document in to other formats based on the given XSLT document.

ii) XSL_FO:

XSL-FO means Extensible Formatting Objects. There are two different ways in which the XML document can be formatted. They are:

1. Layout Based formatting and 
2. Content Based formatting

In a layout based formatting, the limitations of the target may constrain the content or appearance on the page, whereas in a Content Based Formatting, the target medium is generated to accommodate the information being formatted. The XSL FO allows you to make formatting and styling options to your document.

Working with XML using ASP
The need for manipulating XML on the server increases as the need for XML increases.XML and ASP are a very efficient and a powerful combination.XML is a simple and a powerful tool for web developers.XML was created to handle complex Web documents. XML allows you to define all your own tags with rules such as data description and data relationships. XML is used in order to remove the cumbersome problems that were faced with HTML. Information can be accessed easier using XML. ASP and XML are powerful tools for creating dynamic web pages.

ASP uses XML as a tool in its application for a simple reason that data in HTML is allowed to transmit between dissimilar platforms, whereas XML allows us to express complex structure. Moreover it allows us to create our own tags with all sorts of rules. A new document instance can be created using MSXML.There are a number of ways to access XML data from an ASP page. Document Object Model (DOM) plays an important role in retrieving the XML data from ASP. In DOM a document is viewed as a tree of nodes. Every node of the tree can be accessed randomly. The main advantage is that it provides all functions in an Object based way.An XML parser based on DOM from Microsoft is MSXML.This component is used for accessing the XML documents.

There are two groups of DOM programming interfaces.The first group defines interfaces required for writing the application. The second group defines interfaces that are required to assist developers. Once the DOM Object is created on the server, your own XML document can be created. The XML document can be easily parsed on the server in an ASP and then the results can be sent to the client.

Accessing XML using Java Technologies
The most important benefit of XML is its simplicity. Though it is simple it is powerful enough to express complex data structures. Java is one of most important programming languages that is used for creating your web pages. It is an object oriented language whose main purpose was to be used with embedded systems such as cell phones. But later it gained more importance to be used with Web pages that were dynamic in nature. Java Applet and servelets are the important mechanisms for implementing this.

Another advantage of using Java is the concept of JavaBeans, which is a software component model for Java that allows the rapid development of an application by using a visual buider.DOM is one of the methods for accessing the structure of an XML document. An alternative is to use an event driven API.SAX is a simple API designed for XML.DocumentHandler is very important since it is called every time an element is found. A DocumentHandler is used as follows:

Step 1: Importing the parser interface
Step 2: Create an instance of SAX driver.
Step 3: Using this driver, create a parser object
Step 4: Register an instance of class MyHandler as a DocumentHandler.

JOX is a set of Java libraries that allows you to transfer data between XML documents and JavaBeans. JOX matches XML document to the fields of a bean and it will use a DTD when writing an XML document when one is available.JOX, unlike the other libraries, allows you to use any form of an XML document and any JavaBean without creating a separate schema to describe the mapping between Java and XML.

XP is an XML parser written in Java. The following are the advantages of XP:

1.XP is designed to be 100% conformant and correct
2.XP aims at High performance
3.Apart from the high level parser API, it also provides a low level API that supports the construction of different kinds of parser.

Breeze XML Binder is the most complete Java/XML data binding solution available. Breeze creates JavaBeans directly created from the XML structures.

XML Editor
XML editor allows you to take input and save files. XML editor is a text editor to create DTD’s and XML documents. Some editors check the XML documents whether it conforms to the rules of XML. The term XML EDITOR refers to the different types of tools depending on the purpose for which it is been used. There are a number of XML editors available in the market.

A few of the XML editors with their detailed descriptions are given below:

1.XMLmind XML Editor
The XML mind XML Editor (XXE) has been used with the word processor like view without the help of a tree view or visible tags. This allows concentrating more on content creation. XXE is a very efficient and powerful tree view that allows us to open XML documents for which CSS style sheet is not available. XXE helps in editing the XML data and document by embedding standard controls in the word processor like tree view. XMLmind XML Editor is easy to deploy and are highly extensible, which is a very indispensable feature that is more important than a word processor.

2.Peter’s XML Editor
The version 2.0 of this Peter’s XML Editor is a major development to this tool. The Peter’s XML editor uses a new XML parser, which is more powerful than previously used. The new tree view is much faster and powerful. The new source view allows the better editing of Unicode files.

3.VIM as XML Editor
It is a great and an extensible XML editor with many features. It is a highly efficient text XML editor built to enable text editing. VIM is called “PROGRAMMER’S EDITOR” and so it is useful programming that may consider it is an entire IDE. Not only for programmer’s, it is also perfect for all text editing.

4.oXygen XML Editor
This XML editor is a simple and elegant one combined with XML editing features, which has made it popular in both the corporate and academic worlds. The oXygen XML editor provides tools for document creation and presentation that can be validated against any user defined schema. The context sensitive editing minimizes the validation errors. The oXygen XML editor 4.0 provides a special layout when entering the debugging mode.

5.Exchanger XML Editor
This is a Java based XML Editor that enables easy browsing, managing and editing. It offers an extensive functionality to help XML authors, business analysis and software developers.

6.XML SPY EDITOR
Of all the XML editors, XML SPY tops as XML editor. It is a graphical schema editing and user interface that impresses the user with its versatility and power.

XML Parser
XML parser is a software module to read documents and a means to provide access to their content. XML parser generates a structured tree to return the results to the browser. An XML parser is similar to a processor that determines the structure and properties of the data. An XML parser can read a XML document to create an output to generate a display form.

There are a number of parsers available and a few of them are listed below:

1.The Xerces Java Parser
The main applications of the Xerces Java parser is the building up of the XML-savvy web servers
and to ensure the integrity of e-business data expressed in XML.

2.expat XML parser
The expat XML parser is written in C and runs on UNIX or W32.The expat XML parser is not a validating processor that is you can use it only to write an XML parser. This parser is contributed by James Clark.

3.XP and XT
XP is a Java based, XML validating parser and XT is an XSL processor. Both are written in Java.XP detects all non well formed documents. It gives high performance and aims to be the fastest conformant XML parser in Java. On the other hand XT is a set of tools for building program transformation systems. The tools include pretty printing; bundling of systems, tree transformation etc,

4.SAX
Simple API for XML (SAX) was developed by the members of a public mailing list (XML-DEV).It gives an event based approach to XML parsing. It means that instead of going from node to node, it goes from event to event. SAX is an event driven interface. Events include XML tag, detecting errors etc,

5.XML pull parser
It is optimal for applications that require fast and a small XML parser. It should be used when all the process has to be performed quickly and efficiently to input elements.

6.XML parser for Java
It runs on any platform where there is Java virtual machine. It is sometimes called XML4J.It has an interface which allows you to take a string of XML formatted text, pick the XML tags and use them to extract the tagged information.

XML RPC
XML RPC is a Remote Procedure Calling via the Internet. XML RPC is a network programming technique for making procedure calls on remote devices. Generally, XML RPC is used for developing Web services. XML RPC messages are the requests and the responses sent between the client and the servers. XML RPC is platform independent.

It is a message in the HTTP POST Request. The body of the Procedure is in XML and the value it returns is also in the form of an XML.It is designed as simple as possible but it allows complex data structures to be transmitted, analysed, and returned.

XML RPC is a protocol that allows different languages on different machines to communicate with each other. Since procedure requests and responses are in XML it is not necessary that each end of the RPC connection have to be written in the same language. XML RPC is the simplest tool that allows you to integrate even the most communicative tools. XML RPC can transport binary data as base64.

XML RPC has 8 datatypes. They are as follows:

1. INT
2. BOOLEAN
3. DOUBLE
4. STRING
5. BASE64
6. ARRAY
7. STRUCT
8. DATE/TIME

An array type is an indexed array and the STRUCT is a kind of associative array.
XML_RPC.NET is one of the libraries for XML RPC clients and services.

Listed below are few of its features:

1.Support for .NET on both Client and Server side.
2. Interface based definition of XML-RPC servers and clients
3. ASP.NET services that support both SOAP and XML RPC
4. Dynamic generation of documentation page at URL of XML-RPC
5. XML RPC.NET defines services as services running on the Microsoft IIS servers.

XML Schema
An XML Schema defines the elements, child elements and the attributes that can appear in a document. It can also define the order, the number of child elements, the data types for elements and attributes. In DBMS, Schema is a description of a database structure. Internal structures such as tables and fields can be defined using schemas. Schema defines tables and fields that make up the data. Schemas are defined using constraints.

There are two types of constraints:

1. CONTENT CONSTRAINTS
2. DATATYPE CONSTRAINTS

An XML schema is a set of schema components in which there are 13 kinds of grouped components under 3 categories primary, secondary and helper components.

The primary components include

  •  SIMPLE TYPE DEFINITIONS
  •  COMPLEX TYPE DEFINITIONS
  •  ATTRIBUTE TYPE DEFINITIONS
  •  ELEMENT DECLARATIONS

An XML schema consists of components such as type definitions and element declarations. They are used to access the validity of the well-formed element and attribute information items.
The purpose of XML schema structures schema describes a class of XML documents by using schemas components. Schemas provide specifications and additional information such as normalization and element values. Thus, XML schemas can be used to describe and catalogue XML documents. The XML schema validators allow us to check whether the instance of an document meets the requirements. The XML data can be described and validated using the XSD (XML Schema Editor). XSD is written in XML, so it doesn’t require a parser.

XML Tools
XML tools allows the developers to produce XML in a wide variety of situations such as comparing two documents, validating the XML documents, to check whether a file is well formed, etc., There are a lot of tools available, including those tools for creating and editing XML or building e-commerce applications.

A few of the tools are listed below:

1.Microsoft XML Diff and Patch
It is a set of tools that will allow you to compare two XML documents. It detects addition, deletion and detects the changes between two XML documents. It ignores order attributes, insignificant white spaces, and it doesn’t care about document coding. These tools if used on a structured data leads to suboptimal results, since they don’t have the capacity of recognizing the tree based structure.

2.XSD schema validator
This allows the validation of XML documents against an W3C XML schema or XML data reduced schema. It checks whether the given document is well formed and has a valid schema model.

3.Microsoft XSD interference 1.0
Allows you to create an XML schema definition language if a well formed XML file is available, then it generates an XSD that can validate that XML file.

4.XML CONTENT TOOLS
The XML content tools allow us to create edit and publish XML.The XML content tools were originally designed for publishing needs. XML pro from vervet logic is another relatively cheap and worth XML editing tool. The user interface helps you to make quick work.

5.XMetaL
XMetaL from SoftQuad is another affordable tool designed to make quick work of creating and editing files. It is a set of tools designed to simplify the implementation of XML applications. Two companies offer XML application tool kits. It enables you to deliver the contents in a short time to multiple channels, reduces complexity and cost of content. It supports DOM that includes extensive documentation. It also supports COM.

6.Breeze Commerce Studio
Bluestone software offers Breeze Commerce studio for creation of XML and Java based applications. It imports schema from XML DTD’s, XML documents and JDBC/ODBC databases.
It allows us to add data types and constraints to the elements of the schema.

7.Standalone and Single User content tools
Standalone, singleuser XML content tools are very cheap, since they require the least amount of development time and effort. If you have to handle XML creating, editing and publishing for print, web, investigate the product lines of Abortext and interleaf. RAD XML persistent tools are used for easy process, display and share complex data across applications with minimum coding.

8.Altova STYLEVISION 2004
Altova STYLEVISION 2004 is a new XML tool for web developers that provide extensive utilities for migrations. It is a visual editing tool that allows us to create style sheets and forms easily based on XML schemas or databases. It is a powerful database editing tool that allows you to generate reports directly from databases to XML.

9.Altova XML SPY2004
Altova XML SPY2004 Enterprise Edition is one of the most important XML tools for advanced application development. These tools have been used extensively for editing and working with XML technologies. It uses the Enhanced Grid View to manage elements or attribute creation.

10.XT
XT is a more powerful tool, which is easy to use .The understanding of the tree structure is made easy using XT, since the file you want to turn into a result tree is the name of the last parameter.
XT is easy to use if you are familiar with Java.

SOAP XML
Simple Object Access Protocol (SOAP) is a protocol that can be used for accessing the Web pages. SOAP or Simple Object Access Protocol is an XML based Object invocation Protocol. SOAP was developed for distributed applications to communicate through HTTP and firewalls. SOAP is platform independent and it uses XML and HTTP to access services, servers and objects.

SOAP consists of 3 parts:

1.SOAP ENVELOPE: Defines a framework for expressing what is in a message and who should handle it. The SOAP envelope namespace defines header and body element names and the encoding style.

2.SOAP ENCODING RULES: Defines a mechanism for exchanging instances of application defined data types. An encoding rule means an encoding style to know how it is applied to a specific data.

3.SOAP RPC: Defines a method to represent Remote Procedure Calls and responses. Soap RPC uses a request/response model for message exchanges. The request that is sent to the end point is the call and the response it sends represents the result of the call sent.

SOAP has the following features:

  • PROTOCOL independence
  • LANGUAGE independence
  • PLATFORM AND OS independence

SOAP is a way by which programs communicate with other programs using XML.SOAP uses XML to encapsulate data that needs to be sent to a remote subroutine. In more simple terms SOAP is a way by which Java objects and COM objects communicate with each other. A SOAP client is a program that creates an XML document that contains information required to invoke a method remotely in a distributed system.

A SOAP server is a code that listens to the SOAP messages and acts as a distributor and an interpreter. SOAP defines encoding rules called Base level codings. The encodings can be either

1.SIMPLE ENCODINGS
2.COMPOUND ENCODINGS

SIMPLE ENCODINGS are simple types like ints, floats, strings or user defined data types. These include data types such as arrays of bytes and Enumerations.

COMPOUND ENCODINGS include data types such as arrays and structures.

Voice XML
Voice XML is a concept based on XML that allows the access of Web Applications and content through phones. Speech based Telephone applications can be developed using Voice XML.

Document server allows the voice requests to be received from the interpreter and responds with Voice XML documents.

Voice XML Interpreter interprets the Voice XML documents that it receives from the document server.

Implementation Platform generates responses with respect to the user requests.

Voice XML depends greatly on the infrastructure of the Internet. Voice XML uses audio browser for input and output. The voice browser runs on the voice gateway, which is connected through Public Switched Telephone Network (PSTN).

Components of Voice XML:

1.DIALOGS:
There are two types of dialogs, Forms and Menus.

Forms collect input from the user just as in HTML where data is collected in the forms. Menus provide a list of options for the user to select from.

2.SESSION:
A Session begins once the user begins to interact with a voice XML document.

3.APPLICATION:
It is a collection of Voice XML Documents. All the documents in a particular application share the same root document.

4.GRAMMER:
It specifies the set of allowable vocabulary to be selected from the menu for the user to interact with the Voice XML document.

5.EVENTS:
If there are any semantics errors in the Voice XML document, the Voice XML interpreter throws the Events.

6.LINKS:
It specifies a transition that is common to all dialog boxes. If the user input matches the Grammar the link is transferred to the specified link’s destination.

XML Spy @2004 Tool
DTD’S and XML schemas are the very important concepts in framing the content model of an XML document. XML SPY@2004 is a very important tool that integrates both DTD’s and XML schemas with the editing XML schema documents. This means that the location of the definition of each element or attribute can be located using the “Go to Definition” command.

With XML SPY @2004 we can easily create XML schemas and Documents to automatically generate code in Multiple Programming languages thus saving time.

XML SPY supports both editing and Schema validation for the following Schema types:

1.Document Type Definitions (DTD)
2.Document Content Definitions (DCD)
3.XML Data Reduced (XDR)

XML SPY has four advanced views.

• Enhanced Grid View
• Database/Table view
• Text view
• Browser View

Enhanced Grid View is used for structure editing. Database/Table view displays the repeated entry in a tabular fashion; a text view with syntax coloring is used for Low level Work and a Browser View supports CSS and Style sheets.

One of the most important features of XML SPY is its integration with databases. This includes the import of table data and the import of table structure as XML schema. Other than MS-Access it also supports ODBC and OLEDB to access the other databases.

XSLT designer is one of the attractive tools that come with XML SPY. This Designer is a separate program that allows the loading of XML files .It then uses the Drag and Drop to build an HTML Document, generating an XSLT file. The resultant document can be viewed in the integrated preview and the Style Sheet can be saved as a XSLT file.

The Voice XML has the following Components:

1. Document Server
2. Voice XML interpreter
3. Implementation platform
 

 

 

 

 

 
 

 
 

Online Dot Net Books

Saturday, August 9th, 2008

Dot Net Interview Questions

Wednesday, July 30th, 2008

What is .NET?
.NET is essentially a framework for software development. It is similar in nature to any other software development framework (J2EE etc) in that it provides a set of runtime containers/capabilities, and a rich set of pre-built functionality in the form of class libraries and APIs
The .NET Framework is an environment for building, deploying, and running Web Services and other applications. It consists of three main parts: the Common Language Runtime, the Framework classes, and ASP.NET.

With respect to security ,which one is the better choice .Net or J2EE? Explain?
The dot net is more secure than J2EE,because .net is having multiple modules compatible with it.All modules are depends upon each other to functions.As .net is more comfortable that provides more security for users and Data with Application. 

 How many languages .NET is supporting now?
When .NET was introduced it came with several languages. VB.NET, C#, COBOL and Perl, etc. The site DotNetLanguages.Net says 44 languages are supported.

How is .NET able to support multiple languages?
A language should comply with the Common Language Runtime standard to become a .NET language. In .NET, code is compiled to Microsoft Intermediate Language (MSIL for short). This is called as Managed Code. This Managed code is run in .NET environment. So after compilation to this IL the language is not a barrier. A code can call or use a function written in another language.
 
How ASP .NET different from ASP?
Scripting is separated from the HTML, Code is compiled as a DLL, these DLLs can be executed on the server.

What is smart navigation?
The cursor position is maintained when the page gets refreshed due to the server side validation and the page gets refreshed.

What is view state?
The web is stateless. But in ASP.NET, the state of a page is maintained in the in the page itself automatically. How? The values are encrypted and saved in hidden controls. this is done automatically by the ASP.NET. This can be switched off / on for a single control.

How do you validate the controls in an ASP .NET page?
Using special validation controls that are meant for this. We have Range Validator, Email Validator.
Can the validation be done in the server side? Or this can be done only in the Client side?
 Client side is done by default. Server side validation is also possible. We can switch off the client side and server side can be done.

How to manage pagination in a page?
Using pagination option in DataGrid control. We have to set the number of records for a page, then it takes care of pagination by itself.

What is ADO .NET and what is difference between ADO and ADO.NET?
ADO.NET is stateless mechanism. I can treat the ADO.Net as a separate in-memory database where in I can use relationships between the tables and select insert and updates to the database. I can update the actual database as a batch.

Observations between VB.NET and VC#.NET?
Choosing a programming language depends on your language experience and the scope of the application you are building. While small applications are often created using only one language, it is not uncommon to develop large applications using multiple languages.

For example, if you are extending an application with existing XML Web services, you might use a scripting language with little or no programming effort. For client-server applications, you would probably choose the single language you are most comfortable with for the entire application. For new enterprise applications, where large teams of developers create components and services for deployment across multiple remote sites, the best choice might be to use several languages depending on developer skills and long-term maintenance expectations.

The .NET Platform programming languages - including Visual Basic .NET, Visual C#, and Visual C++ with managed extensions, and many other programming languages from various vendors - use .NET Framework services and features through a common set of unified classes. The .NET unified classes provide a consistent method of accessing the platform’s functionality. If you learn to use the class library, you will find that all tasks follow the same uniform architecture. You no longer need to learn and master different API architectures to write your applications.

In most situations, you can effectively use all of the Microsoft programming languages. Nevertheless, each programming language has its relative strengths and you will want to understand the features unique to each language. The following sections will help you choose the right programming language for your application.

How u can create XML file?
To write Dataset Contents out to disk as an XML file use:

MyDataset.WriteXML(server.MapPath(”MyXMLFile.xml”))
dataSet.WriteXml(string path);

Can we run DOT.NET in unix plateform?
One of the disadvantages of using Visual Studio.NET and the .NET framework to develop applications has been the lack of cross-platform support. Since the introduction of the .NET framework and common language run time a few years ago, there have been a few projects designed to bring the .NET framework to other platforms, including Linux and Unix.The DotGNU project is touted as the “Free software alternative to .NET” and encompasses a number of projects, including DotGNU Portable .NET, which is designed to be used to compile and run C# and C applications on a multitude of platforms, including GNU/Linux, FreeBSD, Mac OS X, and Windows.One of the main features of the product is it’s compatibility with EMCA standards for C# and the Common Language Infrastructure (CLI), as well as Microsoft’s own CLI implementation in the .NET framework.The project chose to go with a “Virtual Machine” implementation, where bytecode is transformed into a simple instruction set which is then passed to a “Converted Virtual Machine”, which then are executed through an interpreter. This approach is different to other open source .NET implementations, but provides more flexibility when porting the project to other platforms.At the core of the project is the runtime engine (ilrun) and compiler (cscc) with an implementation of System.Windows.Forms that make developing for the platform easier, as it doesn’t required translation through another toolkit or toolset.

How will you make .NET programs work 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.

What is the difference between the C#.NET and VB.NET?
VB.NET

- It didn’t have the XML Documentation.

- It didn’t have the Operator Overloading.

- It didn’t have the Pointer Type variables.

C#.NET

- It has XML Documentation, Operator Overloading and supports Pointer Variables using unsafe keyword
c#.net is case sensitive.
vb.net is not case sensitive

Can implement same method name in both base class And derived class with different action?
Method overloading is possible.

suppose baseclass class class1 is having method called getname(string name) this method can be overloaded in derived class class2:class1

{

void getmethod(int i,string name)

{

}

}

It is possible with Method over riding not with over loading.
over loading is required with in the same class. but with in base class and child class over riding is possible.

Can I change private assembly to shared assembly?How?
Yes, You can change from Private to Shared.

- Get the SN using sn.exe

- Add the SN to the Assembly

- Put the Assembly in GAC.
Yes You can change.

In .NET Compact Framework, can I free memory explicitly without waiting for garbage collector to free the memory?
Yes, the memory can be cleared using gc.collect method but it is recommanded that u should not call this because we don’t know the exact time when the gc will be called automaticle.

What i do for load testing in . net application?
Load testing for .NET Developers and testersBy Red Gate Software.

How many types of assemblies are there , wat are they?
A private assembly is normally used by a single application, and is stored in the application’s directory. A shared assembly is normally stored in the global assembly cache, which is a repository of assemblies maintained by the .NET runtime. Satellite assemblies are often used to deploy language-specific resources for an application. These language-specific assemblies work in side-by-side execution because the application has a separate product ID for each language and installs satellite assemblies in a language-specific subdirectory for each language.

How to clear a datagrid on a button click?
You need to Clear the DataSource of the dadaGrid.

So try this codes:

dataSet1.Clear();

dataGrid1.DataSource = dataSet1.TableNameHere.DefaultView;

or

C#: dataGrid1.DataSource = null;

VB: dataGrid1.DataSource = nothing
Given a server with 4 cpu’s, and no databases write a pseudocode to search for the word camera in 100,000 html documents?
Start 4 threads which do the following task:
Opens every nth file (first thread will open 0th, 4th, 8th, 12th file, second thread will open 1st, 5th, 9th and so on)
Scans the file for occurrences of word ‘camera’ and notes down line numbers (possibly in a hash table — the key would be the file name with complete path and value will be an array / arraylist containing line numbers).

What Is The Difference Between ViewState and SessionState?
ViewState persist the values of controls of particular page in the client (browser) when post back operation done. When user requests another page previous page data no longer available.

SessionState persist the data of particular user in the server. This data available till user close the browser or session time completes.

How different are interface and abstract class in .Net?
Abstract classes can not be instantiated it can have or cannot have abstract method basically known as mustinherit as the methods are static in nature where interfaces are the declaration and r defined where they are called used for dynamic methods.
Interface needs to be implemented,abstract class has build in implementation.

What is the difference between proc. sent BY VAL and By Ref?
BY VAL: changes will not be reflected back to the variable.
By REF: changes will be reflected back to that variable.( same as & symbol in C,C++).

Which control cannot be placed in MDI?
All the controls that cannot be placed on the MDI. Only certain controls can be pleced on the MDI they are Picture Box, Tool Strip, Status Bar, Timer, Progressvie Bar.

Dotnet Page Lifecycle? 
While excuting the page, it will go under the fallowing steps(or fires the events) which collectivly known as Page Life cycle. Page_Init — Page Initialization LoadViewState — View State Loading LoadPostData — Postback data processing Page_Load — Page Loading RaisePostDataChangedEvent — PostBack Change Notification RaisePostBackEvent — PostBack Event Handling Page_PreRender — Page Pre Rendering Phase SaveViewState — View State Saving Page_Render — Page Rendering Page_UnLoad — Page Unloading.  

What is the difference between visual basic and visual basic dot net?
VB.NET is Microsoft’s Visual Basic implemented onto their .NET Framework. While Visual Basic is part of Visual Studio, VB.NET is also part of the Visual Studio.NET release.

What is the difference between SQL Server, Visual Studio, ASP.NET and Visual Basic?
SQL Server is a RDMS (Relational Database Management System). Visual Studio is the IDE (Integrated Development Environment) development studio that encompasses the Microsoft programming languages. ASP.net is scripting for IIS (Internet Information Server) using the .Net platform. Visual Basic is a Microsoft programming language, and part of Visual Studio.

Dot Net Jobs for Experienced

Friday, July 25th, 2008

Trainer/Faculty for Dotnet,Java,Mainframes,Oracle9i,As/400,SAP FICO,SD (0-4 yrs.),28 July 2008
High Technologies Solutions
Location : Delhi/NCR
We have a opening in High Technologies solutions for full-time/Part time Trainer/Faculty. He would be responsible for giving training to the IT Freshers or professionals We are also looking….

Software Engineer - C# .net ( Windows Based Application)  (2 - 4 yrs), 25 July 2008
  Scicom Technologies Pvt. Ltd.
  Location : Noida
  Skills Set: Hands on experience on C#, .Net (Windows Application) Good knowledge of SQL or Oracle as a database…..

 Sr. Software engineer  (4-6 yrs), 24 July 2008
  Q3 Technologies, Inc 
  Location : Gurgaon 
  This is a hands-on role for a detail oriented individual who will coordinate, facilitate, provide technical direction and participate in the  the development of business applications…..

Sr. Engineer / Technical Desinger (VC++) - Pune (2-7yrs),23 July 2008
  Patni Computer Systems Ltd
  Location : Pune
  Project/Team Management, Application Development and architecture design, Resource allocation & management, team building, project designing,….

 Lead Engineer-JIT Compiler expert  (3-5yrs), 22 July 2008
  Samsung India Electronics Ltd 
  Location : Delhi 
  Specialist in field. Provide thought and technical leadership to other engineers. Responsible for high and low level software design, implementation…..

Software Develper - .Net Compact Framework  (3-5yrs), 21 July 2008
  Q3 Technologies 
  Location : Gurgaon
  This is a hands-on role for a detail oriented individual who will coordinate, facilitate, provide technical direction and participate in the…..

Dot Net Jobs for Freshers

Friday, July 25th, 2008

Great Opportunity for DIPLOMA PASS OUTS 2008 (0 yr), 25 July 2008 
  Wipro Infotech
  Location : Mumbai, Mumbai Suburbs
  DIPLOMA PASS OUTS-2008 BATCH ONLY Interested candidates can mail their Resumes to wigroup.campus@wipro.com on or before 31 July 2008….. 

Junior Software Engineer  (0 yr), 23 July 2008 
  Ingersoll Rand International (I) Limited
  Location : Bengaluru/Bangalore
  - Expertise in C - Good communication skill is a must - An aggregate of 70% and above will only be considered…

Software Trainees: Java / J2ee, .Net and Testing  (0 yr), 22 July 2008
  Celestial Labs Limited
  Location : Hyderabad / Secunderabad
  Should have sound knowledge in JAVA / J2EE, Dot Net and Testing. We are looking for candidates with Good communication skills and good academics required…. 

Introduction to ASP.NET

Sunday, July 20th, 2008

Active Server Pages (ASP)
Microsoft Active Server Pages (ASP) is a server-side scripting technology. ASP is a technology that Microsoft created to ease the development of interactive Web applications. With ASP you can use client-side scripts as well as server-side scripts. Maybe you want to validate user input or access a database. ASP provides solutions for transaction processing and managing session state. Asp is one of the most successful language used in web development.

ASP.NET was developed in direct response to the problems that developers had with classic ASP. Since ASP is in such wide use, however, Microsoft ensured that ASP scripts execute without modification on a machine with the .NET Framework (the ASP engine, ASP.DLL, is not modified when installing the .NET Framework). Thus, IIS can house both ASP and ASP.NET scripts on the same machine.

ASP.NET is the next generation of Active Server Pages (ASP). ASP.NET is an advanced Web development technology that has the power and flexibility of the .NET Framework.

ASP.NET code is compiled, so ASP.NET Web applications perform better than those that use scripting languages. Plus, you can write ASP.NET code in any language that is supported by the Microsoft .NET Framework, including Microsoft C# and Microsoft Visual Basic .NET.

ASP.NET provides a programming model and infrastructure that makes creating scalable, secure, and stable Web applications faster and easier than with other Web programming technologies. This makes ASP.NET an ideal development platform for robust Web applications.

Advantages of ASP.NET
Separation of Code from HTML
To make a clean sweep, with ASP.NET you have the ability to completely separate layout and business logic. This makes it much easier for teams of programmers and designers to collaborate efficiently. This makes it much easier for teams of programmers and designers to collaborate efficiently.

ASP.NET pages, also called Web Forms, are powerful forms-based Web pages. When building Web Forms, you can use ASP.NET server controls instead of ActiveX controls to create common UI elements and then program them for common tasks. This capability allows you to develop pages that are independent of a specific browser. ASP.NET Server controls also allow you to rapidly build Web Forms out of reusable built-in or custom components, which helps simplify the code of a page.

ASP.NET uses a new file extension “.aspx”. This will make ASP.NET applications able to run side by side with standard ASP applications on the same server.

Problems with Traditional ASP
There are many problems with ASP if you think of needs for Today’s powerful Web applications.

Interpreted and Loosely-Typed Code
ASP scripting code is usually written in languages such as JScript or VBScript. The script-execution engine that Active Server Pages relies on interprets code line by line, every time the page is called. In addition, although variables are supported, they are all loosely typed as variants and bound to particular types only when the code is run. Both these factors impede performance, and late binding of types makes it harder to catch errors when you are writing code.

Mixes layout (HTML) and logic (scripting code)
ASP files frequently combine script code with HTML. This results in ASP scripts that are lengthy, difficult to read, and switch frequently between code and HTML. The interspersion of HTML with ASP code is particularly problematic for larger web applications, where content must be kept separate from business logic.

Limited Development and Debugging Tools
Microsoft Visual InterDev, Macromedia Visual UltraDev, and other tools have attempted to increase the productivity of ASP programmers by providing graphical development environments. However, these tools never achieved the ease of use or the level of acceptance achieved by Microsoft Windows application development tools, such as Visual Basic or Microsoft Access. ASP developers still rely heavily or exclusively on Notepad.

Debugging is an unavoidable part of any software development process, and the debugging tools for ASP have been minimal.
Most ASP programmers resort to embedding temporary Response. Write statements in their code to trace the progress of its execution.

No real state management
Session state is only maintained if the client browser supports cookies. Session state information can only be held by using the ASP Session object. And you have to implement additional code if you, for example, want to identify a user.

Update files only when server is down
If your Web application makes use of components, copying new files to your application should only be done when the Web server is stopped. Otherwise it is like pulling the rug from under your application’s feet, because the components may be in use (and locked) and must be registered.

Obscure Configuration Settings
The configuration information for an ASP web application (such as session state and server timeouts) is stored in the IIS metabase. Because the metabase is stored in a proprietary format, it can only be modified on the server machine with utilities such as the Internet Service Manager. With limited support for programmatically manipulating or extracting these settings, it is often an arduous task to port an ASP application from one server to another.

Support for compiled languages
Developer can use VB.NET and access features such as strong typing and object-oriented programming. Using compiled languages also means that ASP.NET pages do not suffer the performance penalties associated with interpreted code. ASP.NET pages are precompiled to byte-code and Just In Time (JIT) compiled when first requested. Subsequent requests are directed to the fully compiled code, which is cached until the source changes.

Use services provided by the .NET Framework
The .NET Framework provides class libraries that can be used by your application. Some of the key classes help you with input/output, access to operating system services, data access, or even debugging. 

Graphical Development Environment
Visual Studio .NET provides a very rich development environment for Web
developers. You can drag and drop controls and set properties the way you do in Visual Basic 6. And you have full IntelliSense support, not only for your code, but also for HTML and XML.

State management
To refer to the problems mentioned before, ASP.NET provides solutions for session and application state management. State information can, for example, be kept in memory or stored in a database. It can be shared across Web forms, and state information can be recovered, even if the server fails or the connection breaks down.

Update files while the server is running!
Components of your application can be updated while the server is online and clients are connected. The Framework will use the new files as soon as they are copied to the application. Removed or old files that are still in use are kept in memory until the clients have finished.

XML-Based Configuration Files
Configuration settings in ASP.NET are stored in XML files that you can easily read and edit. You can also easily copy these to another server, along with the other files that comprise your application.

Overview of ASP.NET-

ASP.NET provides services to allow the creation, deployment, and execution of Web Applications and Web Services
Like ASP, ASP.NET is a server-side technology
Web Applications are built using Web Forms. ASP.NET comes with built-in Web Forms controls, which are responsible for generating the user interface. They mirror typical HTML widgets like text boxes or buttons. If these controls do not fit your needs, you are free to create your own user controls.
Web Forms are designed to make building web-based applications as easy as building Visual Basic applications
ASP.NET Architecture
ASP.NET is based on the fundamental architecture of .NET Framework. Visual studio provide a uniform way to combine the various features of this Architecture.

ASP.NET  Architecture -

At the bottom of the Architecture is Common Language Runtime. NET Framework common language runtime resides on top of the operating system services. The common language runtime loads and executes code that targets the runtime. This code is therefore called managed code. The runtime gives you, for example, the ability for cross-language integration.
.NET Framework provides a rich set of class libraries. These include base classes, like networking and input/output classes, a data class library for data access, and classes for use by programming tools, such as debugging services. All of them are brought together by the Services Framework, which sits on top of the common language runtime.
ADO.NET is Microsoft’s ActiveX Data Object (ADO) model for the .NET Framework. ADO.NET is not simply the migration of the popular ADO model to the managed environment but a completely new paradigm for data access and manipulation.

ADO.NET is intended specifically for developing web applications. This is evident from its two major design principles:

Disconnected Datasets—In ADO.NET, almost all data manipulation is done outside the context of an open database connection.
Effortless Data Exchange with XML—Datasets can converse in the universal data format of the Web, namely XML.
The 4th layer of the framework consists of the Windows application model and, in parallel, the Web application model.
The Web application model-in the slide presented as ASP.NET-includes Web Forms and Web Services.
ASP.NET comes with built-in Web Forms controls, which are responsible for generating the user interface. They mirror typical HTML widgets like text boxes or buttons. If these controls do not fit your needs, you are free to create your own user controls.

Web Services brings you a model to bind different applications over the Internet. This model is based on existing infrastructure and applications and is therefore standard-based, simple, and adaptable.

Web Services are software solutions delivered via Internet to any device. Today, that means Web browsers on computers, for the most part, but the device-agnostic design of .NET will eliminate this limitation.

One of the obvious themes of .NET is unification and interoperability between various programming languages. In order to achieve this; certain rules must be laid and all the languages must follow these rules. In other words we can not have languages running around creating their own extensions and their own fancy new data types. CLS is the collection of the rules and constraints that every language (that seeks to achieve .NET compatibility) must follow.

The CLR and the .NET Frameworks in general, however, are designed in such a way that code written in one language can not only seamlessly be used by another language. Hence ASP.NET can be programmed in any of the .NET compatible language whether it is VB.NET, C#, Managed C++ or JScript.NET.
Quick Start :To ASP.NET
After this short excursion with some background information on the .NET Framework, we will now focus on ASP.NET.

File name extensions
Web applications written with ASP.NET will consist of many files with different file name extensions. The most common are listed here. Native ASP.NET files by default have the extension .aspx (which is, of course, an extension to .asp) or .ascx. Web Services normally have the extension .asmx.

Your file names containing the business logic will depend on the language you use. So, for example, a C# file would have the extension .aspx.cs. You already learned about the configuration file Web.Config.

Another one worth mentioning is the ASP.NET application file Global.asax - in the ASP world formerly known as Global.asa. But now there is also a code behind file Global.asax.vb, for example, if the file contains Visual Basic.NET code. Global.asax is an optional file that resides in the root directory of your application, and it contains global logic for your application.

The easiest way to start with ASP.NET is to take a simple ASP page and change the file name extension to .aspx

Page Syntax-

Directives
You can use directives to specify optional settings used by the page compiler when processing ASP.NET files. For each directive you can set different attributes. One example is the language directive at the beginning of a page defining the default programming language.

Code Declaration Blocks
Code declaration blocks are lines of code enclosed in <script> tags. They contain the runat=server attribute, which tells ASP.NET that these controls can be accessed on the server and on the client. Optionally you can specify the language for the block. The code block itself consists of the definition of member variables and methods.

Code Render Blocks
Render blocks contain inline code or inline expressions enclosed by the character sequences shown here. The language used inside those blocks could be specified through a directive like the one shown before.

HTML Control Syntax
You can declare several standard HTML elements as HTML server controls. Use the element as you are familiar with in HTML and add the attribute runat=server. This causes the HTML element to be treated as a server control. It is now programmatically accessible by using a unique ID. HTML server controls must reside within a <form> section that also has the attribute runat=server.

Custom Control Syntax
There are two different kinds of custom controls. On the one hand there are the controls that ship with .NET, and on the other hand you can create your own custom controls. Using custom server controls is the best way to encapsulate common programmatic functionality.

Just specify elements as you did with HTML elements, but add a tag prefix, which is an alias for the fully qualified namespace of the control. Again you must include the runat=server attribute. If you want to get programmatic access to the control, just add an Id attribute.

You can include properties for each server control to characterize its behavior. For example, you can set the maximum length of a TextBox. Those properties might have sub properties; you know this principle from HTML. Now you have the ability to specify, for example, the size and type of the font you use (font-size and font-type).

The last attribute is dedicated to event binding. This can be used to bind the control to a specific event. If you implement your own method MyClick, this method will be executed when the corresponding button is clicked if you use the server control event binding shown in the slide.

Data Binding Expression
You can create bindings between server controls and data sources. The data binding expression is enclosed by the character sequences <%# and %>. The data-binding model provided by ASP.NET is hierarchical. That means you can create bindings between server control properties and superior data sources.

Server-side Object Tags
If you need to create an instance of an object on the server, use server-side object tags. When the page is compiled, an instance of the specified object is created. To specify the object use the identifier attribute. You can declare (and instantiate) .NET objects using class as the identifier, and COM objects using either progid or classid.

Server-side Include Directives
With server-side include directives you can include raw contents of a file anywhere in your ASP.NET file. Specify the type of the path to filename with the pathtype attribute. Use either File, when specifying a relative path, or Virtual, when using a full virtual path.

Server-side Comments
To prevent server code from executing, use these character sequences to comment it out. You can comment out full blocks - not just single lines.

First ASP.NET Program-

Let’s look at both the markup and the C# portions of a simple web forms application that generates a movie line-up dynamically through software.

Markup Portion
Web form application part 1 — SimpleWebForm.aspx
<% @Page Language=”C#” Inherits=”MoviePage” Src=”SimpleWebForm.cs” %>

<html>
<body background=”Texture.bmp”>

<TITLE>Supermegacineplexadrome!</TITLE>

<H1 align=”center”>Welcome to Supermegacineplexadrome!</H1>

<P align=”left”><STRONG>

Showtimes for <%WriteDate();%>

</STRONG>

 

<%WriteMovies();%>

</body>
</html>
And this is where the C# part of a web forms application comes in.

Web form application part 2 - SimpleWebForm.cs
using System;
using System.Web.UI;
using System.Web.UI.WebControls;

public class MoviePage:Page
{
protected void WriteDate()
{
Response.Write(DateTime.Now.ToString());
}

protected void WriteMovies()
{
Response.Write(”
The Glass Ghost (R) 1:05 pm, 3:25 pm, 7:00 pm

“);
Response.Write(”
Untamed Harmony (PG-13) 12:50 pm, 3:25 pm, ” + “6:55 pm

“);
Response.Write(”
Forever Nowhere (PG) 3:30 pm, 8:35 pm

“);
Response.Write(”
Without Justice (R) 12:45 pm, 6:45 pm

“);
}
}
Execution Cycle :
Now let’s see what’s happening on the server side. You will shortly understand how server controls fit in.

A request for an .aspx file causes the ASP.NET runtime to parse the file for code that can be compiled. It then generates a page class that instantiates and populates a tree of server control instances. This page class represents the ASP.NET page.

Now an execution sequence is started in which, for example, the ASP.NET page walks its entire list of controls, asking each one to render itself.

The controls paint themselves to the page. This means they make themselves visible by generating HTML output to the browser client.

Execution Process
We need to have a look at what’s happening to your code in ASP.NET.

Compilation, when page is requested the first time
The first time a page is requested, the code is compiled. Compiling code in .NET means that a compiler in a first step emits Microsoft intermediate language (MSIL) and produces metadata—if you compile your source code to managed code. In a following step MSIL has to be converted to native code.

Microsoft intermediate language (MSIL)
Microsoft intermediate language is code in an assembly language–like style. It is CPU independent and therefore can be efficiently converted to native code.

The conversion in turn can be CPU-specific and optimized. The intermediate language provides a hardware abstraction layer.

MSIL is executed by the common language runtime.

Common language runtime
The common language runtime contains just-in-time (JIT) compilers to convert the MSIL into native code. This is done on the same computer architecture that the code should run on.

The runtime manages the code when it is compiled into MSIL—the code is therefore called managed code.

ASP.NET Applications and Configuration
Overview
Like ASP, ASP.NET encapsulates its entities within a web application. A web application is an abstract term for all the resources available within the confines of an IIS virtual directory. For example, a web application may consist of one or more ASP.NET pages, assemblies, web services configuration files, graphics, and more. In this section we explore two fundamental components of a web application, namely global application files (Global.asax) and configuration files (Web.config).

Global.asax
Global.asax is a file used to declare application-level events and objects. Global.asax is the ASP.NET extension of the ASP Global.asa file. Code to handle application events (such as the start and end of an application) reside in Global.asax. Such event code cannot reside in the ASP.NET page or web service code itself, since during the start or end of the application, its code has not yet been loaded (or unloaded). Global.asax is also used to d