Professional Documents
Culture Documents
Introduction to ASP.NET
What is ASP? ….
ASP.NET is a programming framework built on the common language runtime that can be
used on a server to build powerful Web applications. I will explain about common language
runtime in the coming Lesson….
ASP.NET offers several important advantages over previous Web development models:
Enhanced Performance
Unlike its interpreted predecessors, ASP.NET can take advantage of early binding,
just-in-time compilation, native optimization, and caching services right out of the
box.
This amounts to dramatically better performance before you ever write a line of
code.
Simplicity
ASP.NET makes it easy to perform common tasks, from simple form submission
and client authentication to deployment and site configuration.
For example, the ASP.NET page framework allows you to build user interfaces that
cleanly separate application logic from presentation code and to handle events in a
simple, Visual Basic - like forms processing model.
Manageability
ASP.NET employs a text-based, hierarchical configuration system, which simplifies
applying settings to your server environment and Web applications.
ASP.NET has been designed with scalability in mind, with features specifically
tailored to improve performance in clustered and multiprocessor environments.
Further, processes are closely monitored and managed by the ASP.NET runtime, so
that if one misbehaves (leaks, deadlocks), a new process can be created in its place,
which helps keep your application constantly available to handle requests.
The following example declares three <asp:label runat="server"> server controls and
customizes the text and style properties of each one individually.
<html><body>
This sample demonstrates how to declare the <asp:label> server control and
<p>
<hr>
<br>
</body></html>
<html><body>
This sample demonstrates how to declare the <asp:label> server control and
manipulate its properties within a page.
<p> <hr>
</body>
</html>
View Run(Result)
Declaring Server Controls
This sample demonstrates how to declare the <asp:label> server control and manipulate its
properties within a page.
You can use this id reference to programmatically manipulate the server control's object
model at run time.
For example, the following sample demonstrates how a page developer could
programmatically set an <asp:label runat="server"> control's Text property within the
Page_Load event.
<html>
Message.Text = "You last accessed this page at: " & DateTime.Now
End Sub
</script>
<body>
<p>
<hr>
</body>
</html>
<html>
}
</script>
<body>
<h3><font face="Verdana">Manipulating Server Controls</font></h3>
This sample demonstrates how to manipulate the <asp:label> server control within
the Page_Load event to output the current time.
<p>
<hr>
<asp:label id="Message" font-size="24" font-bold="true" runat=server/>
</body>
</html>
View Run(Result)
This sample demonstrates how to manipulate the <asp:label> server control within the
Page_Load event to output the current time.
o Simplicity
o Manageability
o Security.
Declaring Server Controls
o <asp:label runat="server">
Questions:
1. What is ASP.NET?
2. List any five advantages of .NET Technologies over other web development tools.
3. How do you declare a server controls?
References:
ASP.net with c# : the basics
- Vijay Mukhi, Sonal Mukhi and Neha Kotecha
Understanding .NET : a tutorial and analysis
- David Chappell