Un esempio:
codice:
<%
nome = request.form("nome")
sesso = request.form("sesso")
actionType = request.form("actionType")
if actionType = "store" then
' qui salvi i dati nel db o ci fai quello che ci devi fare
end if
%>
<html>
<head>
<title>titolo pagina</title>
<script type="text/javascript">
function submitData() {
document.myForm.actionType.value='';
document.myForm.submit();
}
</script>
</head>
<body>
<form name="myForm" method="post" action="">
<label for="nome">Nome</label>
<input type="text" name="nome" id="nome" value="<%=nome%>" />
</p>
<label for="sesso">Sesso</label>
<select name="sesso" id="sesso" onchange="submitData();">
<option value="">seleziona</option>
<option value="m"<% if sesso = "m" then %> selected="selected"<% end if %>>Maschio</option>
<option value="f"<% if sesso = "f" then %> selected="selected"<% end if %>>Femmina</option>
</select>
</p>
<input type="hidden" name="actionType" value="store" />
<input type="submit" value="invia" />
</p>
</form>
</body>
</html>