Tuesday 24 January 2012

IMPORTANT QUESTIONS


What is Classic ASP?

Microsoft's previous server side scripting technology ASP (Active Server Pages) is now often called classic ASP.
ASP 3.0 was the last version of classic ASP.

ASP.NET is NOT ASP

ASP.NET is the next generation ASP, but it's not an upgraded version of ASP.
ASP.NET is an entirely new technology for server-side scripting. It was written from the ground up and is not backward compatible with classic ASP.
You can read more about the differences between ASP and ASP.NET in the next chapter of this tutorial.
ASP.NET is the major part of the Microsoft's .NET Framework.

What is ASP.NET?

ASP.NET is a server side scripting technology that enables scripts (embedded in web pages) to be executed by an Internet server.
  • ASP.NET is a Microsoft Technology
  • ASP stands for Active Server Pages
  • ASP.NET is a program that runs inside IIS
  • IIS (Internet Information Services) is Microsoft's Internet server
  • IIS comes as a free component with Windows servers
  • IIS is also a part of Windows 2000 and XP Professional

The Microsoft .NET Framework

The .NET Framework is the infrastructure for the Microsoft .NET platform.
The .NET Framework is an environment for building, deploying, and running Web applications and Web Services.
Microsoft's first server technology ASP (Active Server Pages), was a powerful and flexible "programming language". But it was too code oriented. It was not an application framework and not an enterprise development tool.
The Microsoft .NET Framework was developed to solve this problem.
.NET Frameworks keywords:
  • Easier and quicker programming
  • Reduced amount of code
  • Declarative programming model
  • Richer server control hierarchy with events
  • Larger class library
  • Better support for development tools
The .NET Framework consists of 3 main parts:
Programming languages:
  • C# (Pronounced C sharp)
  • Visual Basic (VB .NET)
  • J# (Pronounced J sharp)
Server technologies and client technologies:
  • ASP .NET (Active Server Pages)
  • Windows Forms (Windows desktop solutions)
  • Compact Framework (PDA / Mobile solutions)
Development environments:
  • Visual Studio .NET (VS .NET)
  • Visual Web Developer

ASP.NET 2.0

ASP.NET 2.0 improves upon ASP.NET by adding support for several new features.


ASP.NET 3.0

ASP.NET 3.0 is not a new version of ASP.NET. It's just the name for a new ASP.NET 2.0 framework library with support for Windows Presentation Foundation, Windows Communication Foundation, Windows Workflow Foundation; and Windows CardSpace.


Language Support

ASP.NET uses ADO.NET.
ASP.NET supports full Visual Basic, not VBScript.
ASP.NET supports C# (C sharp) and C++.
ASP.NET supports JScript.


ASP.NET - Server Controls

ASP.NET has solved the "spaghetti-code" problem described above with server controls.
Server controls are tags that are understood by the server.
There are three kinds of server controls:
  • HTML Server Controls - Traditional HTML tags
  • Web Server Controls - New ASP.NET tags
  • Validation Server Controls - For input validation

ASP.NET - HTML Server Controls

HTML server controls are HTML tags understood by the server.
HTML elements in ASP.NET files are, by default, treated as text. To make these elements programmable, add a runat="server" attribute to the HTML element. This attribute indicates that the element should be treated as a server control. The id attribute is added to identify the server control. The id reference can be used to manipulate the server control at run time.


ASP.NET - Web Server Controls

Web server controls are special ASP.NET tags understood by the server.
Like HTML server controls, Web server controls are also created on the server and they require a runat="server" attribute to work. However, Web server controls do not necessarily map to any existing HTML elements and they may represent more complex elements.
The syntax for creating a Web server control is:
<asp:control_name id="some_id" runat="server" />

ASP.NET - Validation Server Controls

Validation server controls are used to validate user-input. If the user-input does not pass validation, it will display an error message to the user.
Each validation control performs a specific type of validation (like validating against a specific value or a range of values).
By default, page validation is performed when a Button, ImageButton, or LinkButton control is clicked. You can prevent validation when a button control is clicked by setting the CausesValidation property to false.
The syntax for creating a Validation server control is:
<asp:control_name id="some_id" runat="server" />

<html>
<body>

<form runat="server">
<p>Enter a number from 1 to 100:
<asp:TextBox id="tbox1" runat="server" />
<br /><br />
<asp:Button Text="Submit" runat="server" />
</p>

<p>
<asp:RangeValidator
ControlToValidate="tbox1"
MinimumValue="1"
MaximumValue="100"
Type="Integer"
Text="The value must be from 1 to 100!"
runat="server" />
</p>
</form>

</body>
</html>




No comments: