Anda di halaman 1dari 17

Home Work-3

web

SUBMITTED TO: - SUBMITTED BY:-


Narinder Kaur Surendra Singh
MCA 3rd SEM
ROLL NO- D3804A15
REGD NO- 10806601
Declaration

I declare that this assignment is my individual work. I have not


copied from any another student work or from any other source
accept where due acknowledgment is made explicitly in the text,
not has any part being written for me by another person.

Surendra
Part-A

Q1. What is the significance of a form & the attributes used in form tag?
Design a feedback form for Mc Donald customers.

Ans. A form is the way to get the user information . this is the simple way to know
that who is user. And we can design the form according to our requirement. There
are many things aur attributes that a form contained. The example of these
attributes are- radio vuttons, checkboxes etc. the attributes of the form is:

 Action
 Method
 Enctype

The advantage of the form are:

 Get the user information


 Used in the html for web page
 These are attached with the database

The feed back form is:

<html>

<head><title>

customer feedback

</title></head>

<body bgcolor="white">

<font size="5" color="red"><center><b>


feedback</center></font><br><br>

</center><center>

<font color="red">

your name:&nbsp;&nbsp;

<input type="text"value=" "><br>

e-mail id:<input type="text"name="a"value=""><br>

your address<input type="text"name="a"value=""><br>

mobile no. <input type="text"name="a"value=""><br>

area<select>

<option>select</option>

<option>tohana</option>

<option>hissar</option>

<option>uklana</option>

<option>narwana</option>

<option>ratia</option>

</select><br><br>

date<select>

<option></option>

<option>1</option>

<option>2</option>

<option>3</option>

<option>4</option>
<option>5</option>

<option>6</option>

<option>7</option>

<option>8</option>

<option>9</option>

<option>10</option>

<option>11</option>

<option>12</option>

<option>13</option>

<option>14</option>

<option>15</option>

<option>16</option>

<option>17</option>

<option>18</option>

<option>19</option>

<option>20</option>

<option>21</option>

<option>22</option>

<option>23</option>

<option>24</option>

<option>25</option>

<option>26</option>

</select>&nbsp;
<select name="mnth">

<option></option>

<option>jan</option>

<option>feb</option>

<option>march</option>

<option>apr</option>

<option>may</option>

<option>june</option>

<option>july</option>

<option>aug</option>

<option>sept</option>

<option>oct</option>

<option>nov</option>

<option>dec</option>

</select>

<select>

<option></option>

<option>04</option>

<option>05</option>

<option>06</option>

<option>07</option>

<option>08</option>
<option>09</option>

</select><br><br>

<table>

<tr>

<td class="content">1</td>

<td class="content"><font color="red">food quality</td>

<td align="center"><input type="radio" name="2"


value="excellent"><br></td>

<td align="center"><input type="radio" name="2"


value="good"></td>

<td align="center"><input type="radio" name="2"


value="satisfactory"></td>

<td align="center"><input type="radio" name="2" value="needs


improvement"></td>

<td align="center"><input type="radio" name="2" value="not


experienced"></td>

</tr>

<tr>

<td class="content">2</td>

<td class="content"><font color="red">excellent</td>

<td align="center"><input type="radio" name="3"


value="excellent"><br></td>

<td align="center"><input type="radio" name="3"


value="good"></td>
<td align="center"><input type="radio" name="3"
value="satisfactory"></td>

<td align="center"><input type="radio" name="3" value="needs


improvement"></td>

<td align="center"><input type="radio" name="3" value="not


experienced"></td>

</tr>

<tr>

<td class="content">3</td>

<td class="content"><font color="red">atmosphere</td>

<td align="center"><input type="radio" name="4"


value="excellent"><br></td>

<td align="center"><input type="radio" name="4"


value="good"></td>

<td align="center"><input type="radio" name="4"


value="satisfactory"></td>

<td align="center"><input type="radio" name="4" value="needs


improvement"></td>

<td align="center"><input type="radio" name="4" value="not


experienced"></td>

</tr>

<tr>

<td class="content">4</td>

<td class="content"><font color="red">cleanliness of venue</td>

<td align="center"><input type="radio" name="5"


value="excellent"><br></td>
<td align="center"><input type="radio" name="5"
value="good"></td>

<td align="center"><input type="radio" name="5"


value="satisfactory"></td>

<td align="center"><input type="radio" name="5" value="needs


improvement"></td>

<td align="center"><input type="radio" name="5" value="not


experienced"></td>

</tr>

<tr>

<td class="content">5</td>

<td class="content"><font color="red">staff presentation</td>

<td align="center"><input type="radio" name="6"


value="excellent"><br></td>

<td align="center"><input type="radio" name="6"


value="good"></td>

<td align="center"><input type="radio" name="6"


value="satisfactory"></td>

<td align="center"><input type="radio" name="6" value="needs


improvement"></td>

<td align="center"><input type="radio" name="6" value="not


experienced"></td>

</tr>

<tr>

<td class="content">6</td>

<td class="content"><font color="red">freshness</td>


<td align="center"><input type="radio" name="7"
value="excellent"><br></td>

<td align="center"><input type="radio" name="7"


value="good"></td>

<td align="center"><input type="radio" name="7"


value="satisfactory"></td>

<td align="center"><input type="radio" name="7" value="needs


improvement"></td>

<td align="center"><input type="radio" name="7" value="not


experienced"></td>

</tr>

<tr>

<td class="content">7</td>

<td class="content"><font color="red">value for money</td>

<td align="center"><input type="radio" name="8"


value="excellent"><br></td>

<td align="center"><input type="radio" name="8"


value="good"></td>

<td align="center"><input type="radio" name="8"


value="satisfactory"></td>

<td align="center"><input type="radio" name="8" value="needs


improvement"></td>

<td align="center"><input type="radio" name="8" value="not


experienced"></td>

</tr>
</table><br></td>

</tr>

<tr>

</table>

advice for us<br>

<textarea name=""remark" rows="5"cols="50"><br>

</textarea><br><br>

<input type="submit"value="ok"></center>

</body>

</html>

Output is:
Q2. What are various controls used in forms, enumerate with the help of
example.

Ans:- the control of the form is the control that place in the form coding with
the name tag. This control the form type. We can give the new direction to the
form. We can give the new design to the form.

Form is the information tool . that gives the information to the database. These
control will used with the input tag.

The controls are following:

1. Text box
2. Password
3. Checkbox
4. Radio
5. Menus

For example:

<td align="center"><input type="radio" name="7"


value="excellent"><br></td>

<td align="center"><input type="radio" name="7"


value="good"></td>

In the above coding the radio is the control that used to control the form.

Q3. How would you add following contents to a web


page?
a)Submit button
b)Radio button
c) Button
d)Pull down menus
e) Pop ups

Ans.

(A) Submit: this button is used to submitted the form. This is used in the last
of the form . and we can say this tag mostly used in the end of the web
page. We add this tag in the web page wth the input type tag.like
following:

<input type=”submit” name=”submit”>

The example with the help of the program:


<html>

<head>
<title>html page form</title>

</head>

<body>

<form >

<input type="text" value=”">

<br><input type="submit" name=”submit"><br>

</form>

</body>

</html>

(B) Radio button:

This button is also used with the input tag. This tag used in the

Form for giving the option. And in that options the requirement is the user have
to select one.

The example is:

< input type="radio" name="2" value="excellent"><br></td>

<input type="radio" name="2" value="good"></td>

<input type="radio" name="2" value="satisfactory">

(c. ). Button: this tag is used to use the submit button that is used in the last or the end of the
form. This is used to send the information to the database.

We can use the reset button also that that reset the form that we can use again if there is any
mistake.

Example:
<BUTTON TYPE=reset ALT=""></BUTTON>

(d). Pull down menus:


The pull down is used to change the behavior of the action.

(E). this is the pop up page that is used to attach with the web page.
This automatically start when we click on any link

Part-B
Q4. How inline frames are useful. Explain with example.

Ans. The frame are the tag that divide the web page in many parts. The part
defines by the user. The inline frame is the frame that is the part of the frame.

<html>

<head>

<title>

The Iframe

</title>

</head>

<body bgcolor="red">

<center> this is the Inline frame</center>


<IFRAME src="nayfile.html"

>

<A href="fds.html"> </A>

</IFRAME>

</body>

</html>

Q5. Using suitable example, enumerate the purpose of Global and ass files in
ASP.

<script language="vbscript" runat="server">

Sub Application_OnStart
Application("Hello")=0
End Sub

Sub Session_OnStart
Application.Lock
Application("Hello")=Application("Hello")+1
Application.UnLock
End Sub

Sub Session_OnEnd
Application.Lock
Application("Hello")=Application("Hello")-1
Application.UnLock
End Sub
</script>

Q6. Write the steps for database connectivity for a


web page? Give example.

SqlConnection conn = new SqlConnection("Data Source=SYS014\ELLE;Initial


Catalog=bank;User ID=sa;password=root;Integrated Security=True"); 

In the above line you use either @ sign in front like this 

SqlConnection conn = new SqlConnection(@"Data Source=SYS014\ELLE;Initial


Catalog=bank;User ID=sa;password=root;Integrated Security=True"); 

Anda mungkin juga menyukai