vb.net Tutorial 12-8 WebRequest and Webresponse 3 GET Way to Send Data Preparations to Web Pages

Keywords: IIS

Copyright Statement: This is an original article of the blogger. Please indicate the origin of this article and the author's net name in a prominent place for reprinting. It is not allowed to be used for commercial purposes without the authorship's permission.
This section and the following sections use iis to build the website, using asp code. Please install iis and debug the website. Secondly, if you use Notepad editing, please select UTF-8 when saving.
Save the following code as form1.asp

<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>Upload files</title>

<style>
.inputtype{
	border-top-style:none;
	border-left-style:none;
	border-right-style:none;
	border-bottom-style:solid;
	border-bottom-width:1px;
	border-color:#0000CC;
	width:120px;
	}
body,td {
	font-size:14px;
	}
	
</style>
</head>

<body>
<br/>
<br/>
<br/>
<br/>
<br/>
<table border="1" width="440" cellspacing="0" cellpadding="0" bordercolor="#0080C0" style="border-collapse: collapse" align="center">
      <tr>
        <td height="30" align="center" bgcolor="#0080C0" style="color:#FFFFFF;font-size:14px; font-weight:bolder;">
			//Import data
		</td>
      </tr>	
	  <tr>
	  	<td>
			<table width="100%" border=0 cellspacing=0 cellpadding=0>
			<form name="formA" method="post" action="showform2.asp">
				<tr height=30>
					<td align="center" valign="middle">
			   			<input name="txtname1" type=text value="Test data 1">
					</td>
				</tr>		
				<tr height=30>
					<td align="center" valign="middle">
			   			<input name="txtname2" type=text value="Test data 2">
					</td>
				</tr>			
				<tr height=30>
					<td align="center">
						<input type=submit name="submit" value="Submit Form" style="width:70px; height:19px;" > 
					</td>
				</tr>
			</form>
			</table>	

	  	</td>
	  </tr>
</table>
</body>
</html>

Save the following code as showform 1. ASP

<%OPTION EXPLICIT%>
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>receive data</title>
<style type="text/css">
<!--
.p9{ font-size: 9pt; font-family: Song style }
-->
</style>
</head>
<body leftmargin="20" topmargin="20" class="p9">
<%
dim name1,name2
name1=request.querystring("txtname1")
name2=request.querystring("txtname2")

response.write("txtname1=" & name1 & "<br/>")
response.write("txtname2=" & name2)
%>


</p>[<a href="form.asp">Return</a>]

</body>
</html>

When you open a web page, enter text in the text box (form1.asp)

Feedback on the server (showform 1. asp):

Because of C# and vb under. net platform .NET Similarly, this article can also provide reference for C# enthusiasts.

Learn more vb .net For knowledge, see vb.net tutorial catalogue

Posted by volant on Tue, 01 Oct 2019 16:53:46 -0700