Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 4

HOMEWORK No.

Course: Web Programming Code: INT302

Submitted To: Miss Natasha

DateofSubmission:27/10/2010
Submitted By:Shivani thakur
Roll No.:RB2802B45
Regno.:10803848

PART A

Q1.
Ans -: <html>
<head>
<style type="text/css">
body
{
background-color:”red”;
}
h1
{
color:orange;
text-align:center;
}
p
{
font-family:"Times New Roman";
font-size:20px;
}
</style>
</head>
<body>

<h1>CSS example!</h1>
<p>I am a student of LPU.</p>

</body>
</html>
Q2.

Ans -:<html>
<head>
<script language="vbscript" runat="server">
Sub Application_OnEnd()
Application("totvisitors")=Application("visitors")
End Sub
Sub Application_OnStart
Application("visitors")=0
End Sub
Sub Session_OnStart
Application.Lock
Application("visitors")=Application("visitors")+1
Application.UnLock
End Sub
Sub Session_OnEnd
Application.Lock
Application("visitors")=Application("visitors")-1
Application.UnLock
End Sub
</script>
</head>
<body>
<p>
There are <%response.write(Application("visitors"))%>
online now!
</p>
</body>
</html>

Q3..
Ans -: Yes,
With the session scope:-

<object runat="server" scope="session" id="Mycreation" progid=" ">


</object>

With the application scope:-

<object runat="server" scope="application" id="MyConnection"


classid=" ">
</object>
PART B

Q4.
Ans -: <html>
<body>
<form action="demo_reqquery.asp" method="get">
Your name: <input type="text" name="username" size="20" />
<input type="submit" value="Submit" />
</form>
<%
dim username
username=Request.QueryString("fname")
If username<>"" Then
      Response.Write("Hello " & fname & "!<br />")
End If
%>
</body>
</html>

Q5.
Ans -:

1.Create an ADO connection to a database

2.Open the database connection

3.Create an ADO recordset

4.Open the recordset

5.Extract the data you need from the recordset

6.Close the recordset

7.Close the connection

Q6.

Ans -:<html>
<head>
<style type="text/css">
body {color:red;}
h1 {color:orange;}
p.ex {color:red;}
h1 {text-align:center;}
p.date {text-align:right;}
p.main {text-align:justify;}
</style>
</head>

<body>
<h1>This is heading 1</h1>
<p>This is an ordinary paragraph. Notice that this text is red. The default text-color for a page is
defined in the body selector.</p>
<p class="ex">This is a paragraph with class="ex". This text is blue.</p>
<h1>CSS text-align Example</h1>
<p class="date">May, 2009</p>
<p class="main"> Culture definition, the quality in a person or society that arises from a concern
for what is regarded as excellent in arts, letters, manners, ... </p> <p><b>Note:</b> Try to resize
the browser window to see how justify works.</p>
</body>

</html>

You might also like