基本的 HTML 表单

c# 实例

基本的 html 表单

<!doctype html>
<html> 
<body> 
@{
if (ispost)

string companyname = request["companyname"]; 
string contactname = request["contactname"]; 
<p>you entered: <br> 
company name: @companyname <br> 
contact name: @contactname </p> 
}
else
{
<form method="post" action="">
company name:<br> 
<input type="text" name="companyname" value=""><br>
contact name:<br><br>
<input type="text" name="contactname" value=""><br><br>
<input type="submit" value="submit" class="submit">
</form> 
}
}

</body> 
</html>

相关文章