<%@ Page language="c#" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>WebForm1</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<font face="verdana">
<h3 align="center">Premier test ASP.NET
</h3>
<form id="Form1" action="PremierTest.aspx" method="get">
<p>
Nom : <input Name="Name" type="text">
<p>
Langage :
<select Name="Categorie" size="1">
<option selected>Développeur VB.NET</option>
<option>Développeur C#</option>
<option>Autre développeur</option>
</select>
<p>
<input type="submit" value="Envoi">
</form>
<!-- Si l'instance Request.QueryString["Name"] n'est pas tester, plantage -->
<%
if (Request.QueryString["Name"] != null)
{
if (Request.QueryString["Name"] != "")
{
Response.Write("Bonjour " + Request.QueryString["Name"]);
Response.Write(" tu es un " + Request.QueryString["Categorie"]);
}
else Response.Write(" Veuillez remplir le champ \"Nom\""); }
%>
</font></P>
</body>
</HTML> |