Posts Tagged ‘asp’

Coding Examples in ASP.Net

Sunday, December 14th, 2008

How to Upload a File in ASP.NET?
Here a .txt file is uploaded and saved it in a predefined location. Let see this by a simple programme.Here an input tag is highlighted in bold for browsing the uploaded file.

The fileupload.aspx code is:

<% @ Page Language=”C#” AutoEventWireup=”true”  CodeFile=”Default.aspx.cs” Inherits=”_Default” %>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd“>
<html xmlns=”http://www.w3.org/1999/xhtml“>
<head runat=”server”>
<title>File Upload Demostration</title>
</head>

<body>

    <form id=”Form1″ method=”post” runat=”server”>

      <table cellpadding=”0″ cellspacing=”0″ width=”80%” align=”center” border=”4″>

        <tr><td height=”20px”></td></tr>

          <tr><td height=”200px” align=”center” valign=”middle”>

               <input id=”MyFile”   type=”file” size=”81″ name=”File1″ runat=”server” />

                      <br />

<br />

                           <asp:Button id=”btnSubmit”   runat=”server” Text=”Submit” Width=”139px” Height=”30px” OnClick=”btnSubmit_Click”></asp:Button>

                             <asp:Label id=”lbl”   runat=”server” Width=”402px” Height=”33px”></asp:Label>

                             </td></tr></table>

                   </form>

</body>

</html>

The fileupload.aspx.cs is:

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

 
public partial class _Default : System.Web.UI.Page

{

    protected void Page_Load(object sender, EventArgs e)

    {

 
    }

    protected void btnSubmit_Click(object sender, EventArgs e)

    {

        if (MyFile.PostedFile.ContentLength == 0)

        {

            lbl.Text = “Cannot upload zero length file”;

            return;

        }

        lbl.Text = MyFile.PostedFile.FileName;

       MyFile.PostedFile.SaveAs(”c:\\UploadFile\\MyFile.PostedFile.FileName”);

 

    }

}

 How to upload text-file in asp.net - The snap shots of process

 

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.

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 Visual Studio .NET

Tuesday, September 30th, 2008

Visual Studio.NET is based on the .NET framework.
Visual Studio.NET provides languages and tools that enable you to build Web-based, desktop, and mobile applications. You can also create Web services in Visual Studio.NET.

Visual Studio.NET includes the following programming languages:
1
. Visual Basic.NET
2. Visual C++.NET
3. Visual C#.NET
It also provides additional technologies, such as ASP.NET, that enable you to develop and deploy applications.In addition, Visual Studio.NET includes the MSDN library that contains documentation on various development  tools and applications.

Using the integrated development environment (IDE) of Visual Studio.NET, you can create applications in the various .NET languages. The IDE of Visual Studio.NET enables you to share tools and create applications in multiple languages.

Visual Studio.NET includes various enhancements over earlier versions of Visual Studio.

 New Features in Visual Basic :

Unlike Visual Basic 6.0, Visual Basic.NET is an object-oriented language.Visual Basic.NET supports the abstraction, encapsulation, inheritance, and polymorphism features.The earlier versions of Visual Basic, versions 4 through 6, supported interfaces but not implementation inheritance. Visual Basic.NET supports implementation inheritance as well as interfaces.Another new feature is overloading.In addition, Visual Basic.NET supports multithreading,which enables you to create multithreaded and scalable applications. Visual Basic.NET is also compliant with the common language specification (CLS) and supports structured exception handling.

Visual C# .NET
Visual Studio.NET provides a new language, Visual C#.NET, which is an object-oriented language based on the C and C++ languages. Using Visual C#.NET, you can create applications for the .NET framework. As mentioned earlier, Visual C#.NET supports the CLR, therefore, any code written in Visual C#.NET is managed code. The IDE provides various templates, designers, and wizards to help you create applications in Visual C#.NET.

Visual C++ .NET
Visual C++.NET is an enhanced version of Visual C++. Visual C++.NET includes features such as support for managed extensions and attributes.Managed extensions include a set of language extensions for C++ to enable you to create applications for the .NET framework. Using managed extensions, you can easily convert existing components to components that are compatible with the .NET framework. Therefore, with the help of managed extensions, you can reuse existing code and thus save both time and effort. In addition, by using managed extensions, you can combine both unmanaged and managed C++ code in an application.

The CLS is a set of rules and constructs that are supported by the CLR. Visual Basic.NET is a CLS-compliant language. Any objects, classes, or components that you create in Visual Basic.NET can be used in any other CLS-compliant language. In addition, you can use objects, classes, and components created in other CLScompliant languages in Visual Basic.NET. The use of the CLS ensures complete interoperability among applications, regardless of the language used to create the application. Therefore, while working in Visual Basic.NET, you can derive a class based on a class written in Visual C#.NET, and the data types and variables of the derived class will be compatible with those of the base class.

Visual C++.NET also supports attributes, which enable you to extend the functionality of the language and to simplify the creation of COM components. You can apply attributes to classes, data members, or member functions.

What are Web Forms ?
Visual Studio.NET introduces Web forms, which are based on Microsoft ASP.NET technology. Web forms are used to create Web pages. In Visual Studio.NET, you can drag controls to the designer and then add code to create Web pages. A Web forms page can open in any Web browser. The controls in a Web forms page are based on server-side logic.

What are Windows Forms ?
Windows forms provide a platform for developing Windows applications based on the .NET framework. Windows forms include a set of object-oriented and extensible classes that enable you to implement visual inheritance. Visual inheritance enables you to inherit a form from an existing form. Using these classes, you can develop Windows applications by creating a form based on an existing form. When you create forms based on existing forms, you can reuse code and thus enhance productivity. Typically,Windows forms are used to create user interfaces for a multitier application.

What are Web Services ?
Web services are applications that exchange data by using eXtensible Markup Language (XML). Web services can also receive requests over HTTP. Web services are not a part of any specific component technology. Therefore, any language or operating system can use Web Services. You can use Visual Basic.NET, Visual C#.NET, or ATL Server to create Web services.

XML(Extensible Markup Language)

XML is a markup language based on Standard Generalized Markup Language (SGML), which is a standard for all markup languages. XML is a subset of SGML. XML enables you to define the structure of data by using markup tags. In addition, you can also define new tags using XML.The World Wide Web Consortium (W3C) has defined XML standards to ensure that structured data is uniform and independent of applications.

Visual Studio.NET it also provides XML Designer, which enables you to create and edit XML documents and create XML schemas.

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 declare data that is available across different application requests or across different browser sessions. This process is known as application and session state management.

The Global.asax file must reside in the IIS virtual root. Remember that a virtual root can be thought of as the container of a web application. Events and state specified in the global file are then applied to all resources housed within the web application. If, for example, Global.asax defines a state application variable, all .aspx files within the virtual root will be able to access the variable.

Like an ASP.NET page, the Global.asax file is compiled upon the arrival of the first request for any resource in the application. The similarity continues when changes are made to the Global.asax file; ASP.NET automatically notices the changes, recompiles the file, and directs all new requests to the newest compilation. A Global.asax file is automatically created when you create a new web application project in the VS.NET IDE.

Application Directives
Application directives are placed at the top of the Global.asax file and provide information used to compile the global file. Three application directives are defined, namely Application, Assembly, and Import. Each directive is applied with the following syntax:

   <%@ appDirective appAttribute=Value …%>
Web.config
In ASP, configuration settings for an application (such as session state) are stored in the IIS metabase. There are two major disadvantages with this scheme. First, settings are not stored in a human-readable manner but in a proprietary, binary format. Second, the settings are not easily ported from one host machine to another.(It is difficult to transfer information from an IIS’s metabase or Windows Registry to another machine, even if it has the same version of Windows.)

Web.config solves both of the aforementioned issues by storing configuration information as XML. Unlike Registry or metabase entries, XML documents are human-readable and can be modified with any text editor. Second, XML files are far more portable, involving a simple file transfer to switch machines.

Unlike Global.asax, Web.config can reside in any directory, which may or may not be a virtual root. The Web.config settings are then applied to all resources accessed within that directory, as well as its subdirectories. One consequence is that an IIS instance may have many web.config files. Attributes are applied in a hierarchical fashion. In other words, the web.config file at the lowest level directory is used.

Since Web.config is based on XML, it is extensible and flexible for a wide variety of applications. It is important, however, to note that the Web.config file is optional. A default Web.config file, used by all ASP.NET application resources, can be found on the local machine at:

\%winroot%\Microsoft.Net\Framework\version\CONFIG\machine.config
Summary
ASP.NET is an evolution of Microsoft’s Active Server Page (ASP) technology. Using ASP.NET, you can rapidly develop highly advanced web applications based on the .NET framework. Visual Studio Web Form Designer, which allows the design of web applications in an intuitive, graphical method similar to Visual Basic 6. ASP.NET ships with web controls wrapping each of the standard HTML controls, in addition to several controls specific to .NET. One such example is validation controls, which intuitively validate user input without the need for extensive client-side script.

In many respects, ASP.NET provides major improvements over ASP, and can definitely be considered a viable alternative for rapidly developing web-based applications.

Differences between ASP and ASP.NET-

ASP.NET has better language support, a large set of new controls and XML based components, and better user authentication.

ASP.NET provides increased performance by running compiled code.

ASP.NET code is not fully backward compatible with ASP.

Language Supported by ASP.NET-

ASP.NET uses the new ADO.NET.

ASP.NET supports full Visual Basic, not VBScript.

ASP.NET supports C# (C sharp) and C++.

ASP.NET supports JScript as before.

ASP.NET Components-

ASP.NET components are heavily based on XML. Like the new AD Rotator, that uses XML to store advertisement information and configuration.

ASP.NET Controls-

ASP.NET contains a large set of HTML controls. Almost all HTML elements on a page can be defined as ASP.NET control objects that can be controlled by scripts.

ASP.NET also contains a new set of object oriented input controls, like programmable list boxes and validation controls.

A new data grid control supports sorting, data paging, and everything you expect from a dataset control.