Tuesday, 26 March 2013

Creating ASP.Net Web Pages

An ASP.Net web page must have page directive at the page based on which  the web server  IIS identifies that  it is an ASP.Net page and it is also use to specify which language you want to use to write the code for ASP.Net web page.

Page Directive
<% @ page language="cs/vb"%>

An ASP.Net web page can contain HTML element, Java Script, CSS and Server Side code written using C#.Net or Vb.net language.

Server Side Code(for Single statement)
To write server side code using C#.Net or VB.Net language use the following syntax:
  <>%=stmt%>

Server Side Code(for multiple statement)
  <%
      stmt1
      stmt2
      .....
%>

Server side code(for creating reusable functions)
<script language="cs/vb" runat="server">
</script>

No comments:

Post a Comment