28-01-2013, 12:22 PM
ASP.NET Introduction
ASP.NET.doc (Size: 315.5 KB / Downloads: 20)
INTRODUCTION
ASP.NET works with Internet Information Server (IIS) to deliver content in response to HTTP requests. ASP.NET pages are found in .aspx files.During ASP.NET processing, We have to access all .NET classes, custom components created in C# or other languages, databases, and so on. In fact, we have as much power as you would have running a C# application; using C# in ASP.NET is, in effect, running a C# application.
An ASP.NET file can contain any of the following:
Processing instructions for the server
Code in C#, Visual Basic .NET, JScript .NET, or any other language that the .NET Framework supports
Content in whatever form is appropriate for the generated resource, such as HTML
Client - side script code, such as JavaScript
Embedded ASP.NET server controls
ASP.NET Web Forms:
As mentioned earlier, much of the functionality in ASP.NET is achieved using Web Forms. Before long, we will dive in and create a simple Web Form to give you a starting point to explore this technology. Note that some ASP.NET developers simply use a text editor such as Notepad to create files. We wouldn ’ t advocate this ourselves because the benefits you get via an IDE such as Visual Studio or Web Developer Express are substantial, but it ’ s worth mentioning because it is a possibility. If you do take this route, we have a great deal of flexibility as to which parts of a Web application you put where.
Styling Web Controls:
The ControlStyle property evaluates to an object of type Style—a class that encapsulates the appearance properties of the control. The Style class groups together some of the properties shown in and it works as the repository of the graphical and cosmetic attributes that characterize all Web controls. The grouped properties are: BackColor, BorderColor, Border-Style, BorderWidth, CssClass, Font, ForeColor, Height, and Width. All properties of the Style class are strongly typed. The properties just mentioned are not persisted to the view state individually, but benefit from the serialization machinery supported by the Style object.
It should be clear by now that the Style class is quite different from the Style property, whose type is CssStyleCollection. Note that style values set through the Style property are not automatically reflected by the (strongly typed) values in the Style object.
Validator Controls:
ControlToCompare.
Represents the ID of the control to compare with the current user's entry. You should avoid setting the ControlToCompare and ValueToCompare properties at the same time. They are considered mutually exclusive; if you set both, the Control ToCompare property takes precedence.
Operator:
Specifies the comparison operation to perform. The list of feasible operations is defined in the ValidationCompareOperator enumeration. The default operator is Equal; feasible operators are also LessThan, GreaterThan, and their variations.
Datatype:
The DataTypeCheck operator is useful when you want to make sure that certain input data can be converted to a certain type. When the DataTypeCheck operator is specified, both ControlToCompare and ValueToCompare are ignored. In this case, the test is made on the type of the input data and succeeds if the specified data can be converted to the expected type. Supported types are expressed through the following keywords: String, Integer, Double, Date, and Currency (decimal).
ValueToCompare:
Indicates the value to compare the user's input against. If the Type property is set, the ValueToCompare property must comply with it.