Está en la página 1de 16

1) Create your home page in html.

In that home page provide links to move to other pages like


hobbies, educational info, personal info etc.
Main Program:

<html>
<head>
<title> Home Page </title>
</head>
<body>
<BODY bgcolor="#FFFFCC">
<center>
<h1>Person Information </h1>
</center>
<center>
<a href = "Hobbies.htm"><h3>Hobbies</h3></a><hr>
<a href = "Edu.html"><h3>Educational_info</h3></a><hr>
<a href = "Personal.html"><h3>Personal_info</h3></a><hr>
<a href = "Others.html"><h3>Other_info</h3></a><hr>
</center>
</body>
</html>

Hobbies:
<html>
<head>
<title> Home Pages </title>
</head>
<body>
<BODY bgcolor="#FFFFCC">
<center>
<h1>Hobbies:</h1>
<h4>Watching Movies</h4>
<h4>Programming</h4>
<h4>Sports</h4>
<h4>Music</h4>
</center>
<hr>
<a href = "pre1.html"> <center> Go to Home page </center> </a>
</body>
</html>

Educational Info:
<html>
<head>
<title> Home Pages </title>
</head>
<body>
<BODY bgcolor="#FFFFCC">
<center>
<h1>Educational_info:</h1>
<h4>B.E (Computer)</h4>
<h4>M.E (Computer)</h4>
<h4>Sun Certified Java Programmer (SCJP) </h4>
<h4>Sun Certified Web Component Developer (SCWCD) </h4>
</center>
<hr>
<a href = "pre1.htm"><center>Go to Home page</center></a>
</body>
</html>

Personal:
<html>
<head>
<title> Home Pages </title>
</head>
<body>
<BODY bgcolor="#FFFFCC">
<center>
<h1>Personal_info :</h1>
<h4>Height: 5’4”</h4>
<h4>Hair Color: Black</h4>
<h4> About Me: Friendly and fun loving</h4>
<h4>Ph No.: 9727043122</h4>
</center>
<hr>
<a href = "pre1.htm"> <center>Go to Home page</center> </a>
</body>
</html>

Other:
<html>
<head>
<title>Home Pages</title>
</head>
<body>
<BODY bgcolor="#FFFFCC">
<center>
<h1>Other:</h1>
<h4>Best Book: Java(Black Book)</h4>
<h4>Best Movie: Rang De Basanti</h4>
<h4>Best Songs: Tinka Tinka</h4>
<h4>Best Place: Kolkata,Kashmir,Manali</h4>
<h4>Best Actor: Abhishek</h4>
<h4>Best Actress: Tabu</h4>
</center>
<hr>
<a href = "pre1.htm"><center>Go to Home page</center></a>
</body>
</html>
3) Using HTML control create a student information for to collect student information line Name,
Address, Phone, Email, Birth Date, Hobbies etc. Use appropriate control.

Main Program:

<html>
<head>
<title> Registration Form </title>
</Head>
<Body>
<u>
<center>
<font color="Blue" font face="arial" font size="5"> REGISTRATION FORM </from>
</center>
</u>
<hr>

<form name="frmreg" method=post action="form1.asp">


<center>
<table border="0">

<tr>
<td>Name </td>
<th><th><th><th><th>
<td><input type="text box" name="fname"></td>
<tr/>
<tr>
<td>Address </td>
<th><th><th><th><th>
<td><input type="text box" name="id"></td>
</tr>

<tr>
<td>Phone</td>
<th><th><th><th><th>
<td><input type="Password" name="pw"></td>
</tr>

<tr>
<td>Email</td>
<th><th><th><th><th>
<td><input type="Password" name="pw"></td>
</tr>

<tr>
<td>Gender</td>
<th><th><th><th><th>
<td>
<input type="radio" name="Gender" value="male">male
<input type="radio" name="Gender" value="female">female
</td>
<tr/>

<tr>
<td>Birth Date</td>
<th><th><th><th><th>
<td><input type="Password" name="pw"></td>
</tr>

<tr>
<td>Hobbies</td>
<th><th><th><th><th>
<td>
<input type="checkbox" name="lng" value="sports">sports
<input type="checkbox" name="lng" value="reading">reading
<input type="checkbox" name="lng" value="riding">riding
<input type="checkbox" name="lng" value="developing">developing
<input type="checkbox" name="lng" value="other">other
</td>
</tr>

<tr>
<td>Country</td>
<th><th><th><th><th>
<td><select name="Country">
<option value="ind">India</option>
<option value="pak">Pakistan</option>
<option value="USA">America</option>
<option value="sri">Srilanka</option>
<option value="eng">England</option>
</td>
</tr>

<tr>
<td>Address</td>
<th><th><th><th><th>
<td>
<textarea name="txtAddress" row="5" cols="50">
</textarea>
</td>
</tr>

<tr>
<td>
<input type="submit" name="cmdSubmit" value="Submit">
<input type="reset" name="cmdReset" value="Reset">
<input type="button" name="cmdClick" value="Click">
</td>
</tr>

</table>
</center>
</form>
</body>
</html>
8) Create an ASP page to display time on server.

Main Program:

<%@ Language=VBScript %>


<html>
<head>
<title>Time</title>
</head>
<body>
<%
dim h
h=hour(now())
response.write(now())
%>
</body>
</html>
9) Create an ASP page to illustrate the use of the buffer property of response object.

Main Program:
(Buffer property = true)

<%@ Language=VBScript %>


<%response.Buffer=true%>
<html>
<body>
<%
Dim i,j
Response.Write "it is: " & now()
for i=1 to 500000
j=j+1
next
Response.Write "<br>it is: " & now()
%>
</body>
</html>
Main Program:
(Buffer property = false)

<%@ Language=VBScript %>


<%response.Buffer=false%>
<html>
<body>
<%
Dim i,j
Response.Write "it is: " & now()
for i=1 to 500000
j=j+1
next
Response.Write "<br>it is: " & now()
%>
</body>
</html>
10) Create an ASP page to illustrate the use of FORM collection of Request Object.

Main Program:

<%@ Language=VBScript %>


<%Response.Write "Test= " & Request.Form("test")%>
<html>
<head>
<title>Simple Form Example</title>
</head>
<body>
<form ame="info" method="post" action="Form1.asp">
<input type="submit" name="Test" value="Test">
</from>
</body>
</html>
11) Create an ASP page to illustrate the use of Query String collection of Request Object.

Main Program:

<%@ Language=VBScript%>
<%
Response.Write "Hello:" & "<br>"
for i=1 to Request.QueryString("n").Count
Response.Write(Request.QueryString("n")(i) & "</br>")
Next
%>
13) Create an ASP page to illustrate the use of Cookies (Create cookies in one page and read it in a second
page).

Main Program:

Registration1.asp…

<HTML>
<HEAD>
<TITLE>search</TITLE>
</HEAD>
<BODY bgcolor="cyan">
<u>REGISTRATION FORM</u>
<form name="frmreg" method=post action="c.asp">
<table border="0">
<tr>
<td>Insert text here:</td>
<th><th><th><th><th>
<td><input type="text box" name="fname"></td>
<tr/>
<td>
<input type="submit" name="cmdSubmit" value="Submit">
<input type="reset" name="cmdReset" value="Reset">
</td>
</table>
</FORM>
</BODY>
</HTML>

C.asp…

<%@language = vbscript%>
<%option explicit%>
<%
dim a
a=request.form("fname")
response.cookies("name")=a
response.write "thanks for searching"
%>
<br>
<a href = registration2.asp>click here for show cookies on other page</a>

Registration2.asp…

<%@language = vbscript%>
<%option explicit%>
<HTML>
<HEAD>
<TITLE>search</TITLE>
</HEAD>
<BODY>
<%
dim b
b=request.cookies("name")
%>
<form name="frmreg" method=post action="c.asp">
<table border="0">
<tr>
<td>Your saved cookies is:</td>
<th><th><th><th><th>
<td><input type="text box" name="fname" value = <%response.write b%>></td>
<tr/>
</table>
</FORM>
</BODY>
</HTML>
17) Create a HIT counter for your ASP page using an Application Object.

Main Program:

<%@ Language = VBScript %>


<% option explicit %>
<%
dim pageCount
Application.lock
Application("counter") = Application("counter") + 1
pageCount = Application("counter")
Application.unlock
Response.write("this page has been visited" & pageCount &" times.")
%>

También podría gustarte