I was going through an ASP.Net book, and thought of writing extremely simply Hello World example. This will give an insight of how simple and small page you can write using ASP .Net.
For each example I have given asp .net code and corresponding browser generated code.
Example1
<%@ Page Language="c#" %> <%Response.Write("Hello World");>
Brower Source:
Hello World
Example2:
<%@ Page Language="c#" %>
<script runat="server">
void SayHello()
{
Response.Write("Hello World !");
}
</script>
<html>
<body>
<% SayHello(); %>
</body>
</html>
Brower Source:
<html> <body> Hello World ! </body> </html>
Leave a comment