I have created a page (HTMLpage1.html )
which consist of a text feild and a dropdown menu and a button
the code is
Now when the Submit button is clicked the form action goes to Result1.aspx
which has the following code of line
Now when i click the Submit button only hello is printed
CAn any one help me in this
which consist of a text feild and a dropdown menu and a button
the code is
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Page</title>
</head>
<body>
<form action="Result1.aspx" method="post">
<br />
<table>
<tr>
<td style="width: 193px">
Name:</td>
<td style="width: 125px">
<input id="txtname" type="text" /></td>
<td style="width: 257px">
</td>
</tr>
<tr>
<td style="width: 193px">
Select A Color:</td>
<td style="width: 125px">
<select size="1" name="Color" id="drpcolor">
<option selected="selected">Red</option>
<option>Blue</option>
<option>Green</option>
<option>Purple</option>
<option>Orange</option>
</select>
</td>
<td style="width: 257px">
</td>
</tr>
<tr>
<td style="width: 193px; height: 21px">
</td>
<td style="width: 125px; height: 21px">
</td>
<td style="width: 257px; height: 21px">
</td>
</tr>
</table>
<br />
<input id="Button1" type="submit" value="button" /><br />
<br />
<br />
</form>
</body>
</html>
Now when the Submit button is clicked the form action goes to Result1.aspx
which has the following code of line
Code:
<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<% String txtname, Color;
txtname = Request.Form.Get("txtname");
Color = Request.Form.Get("drpcolor");
Response.Write(txtname);
Response.Write(Color);
Response.Write("HEllO");
%>
</body>
</html>
CAn any one help me in this
Comment