What is ASP.NET?
1.ASP stands for Active Server Pages.
2.ASP.NET is the name of the Microsoft technology used for web site development.
3.There are several other technologies that exist for web development (E.g.: PHP).
4.ASP.NET is the technology from Microsoft and it is the most widely used.
5.ASP.NET is not 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.
6.ASP.NET is NOT a programming language like C# or VB.NET.
7.ASP.NET development requires a programming language like C# or VB.NET to write code.
8.ASP.NET technology comes with a rich set of components and controls that make the web development very easy.
9.Visual Studio .NET is the editor from Microsoft which helps you develop ASP.NET web sites faster.
10.IIS (Internet Information System) is the web server from Microsoft which supports ASP.NET. To develop ASP.NET web sites, you must have IIS installed in your computer.
How Does ASP.NET Work?
i.When a browser requests an HTML file, the server returns the file.
ii.When a browser requests an ASP.NET file, IIS passes the request to the ASP.NET engine on the server.
iii.The ASP.NET engine reads the file, line by line, and executes the scripts in the file.
iv.Finally, the ASP.NET file is returned to the browser as plain HTML.
Some namespaces used in ASP.NET are:
I.System: This namespace includes the core needs for programming.
II.System.Collections: This defines many common containers and collections used in programming.
III.System.IO: It enables reading from and writing to different streams.
IV.System.Net: It provides an interface.
V.System.Data:It represents the ADO.NET architecture.
VI.System.Web:It provides various web related functionality.
*ASP.NET Controls*
ASP.NET Web server controls are objects on ASP.NET Web pages that run when the page is requested and that render markup to a browser.
Some of ASP.NET Controls are:
i.Button Control: Buttons submit the page to the server and cause it to be processed along with any pending events.
Syntax:
<asp:Button id="Button1"Text="Submit"runat="server"/>
ii.Label Control: The Label Web server control provides a way to display text programmatically control in an ASP.NET Web page.
Syntax:
<asp:Label id="Label1" Text="Label Control" runat="server"/>
iii.Hyperlink: This control displays a link to another Web page.
Syntax:
<asp:HyperLinkid="hyperlink1"ImageUrl="img.jpg"navigateUrl="https://syllabusme.com/search/label/HTML%20language?m=1"text="quizemine"runat="server"/>
iv.ListBox:This control allows users to select one or more items from a pre-defined list.
Syntax:
<asp:ListBox>
<asp:ListItem>Anshul</asp:ListItem>
<asp:ListItem>Himanshu</asp:ListItem>
<asp:ListItem>Nitin</asp:ListItem>
<asp:ListItem>Komal</asp:ListItem>
<asp:ListItem>sachin</asp:ListItem>
</asp:ListBox>