1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
| Protected Sub ButtonEnvoyer_Command(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.CommandEventArgs)
' Procédure du bouton "Envoyer"
' Create the AccessDataSource.
Dim nMsg As MsgBoxResult
Dim nAnnee As String
Dim nSexe As String
Dim nHandic As String
Dim nHandicDep As String
Dim nHandicDepAut As String
nAnnee = TextSocioAge.Text
nSexe = RadioSocioSexe.SelectedValue
nHandic = RadioSocioHandi.SelectedValue
nHandicDep = RadioSocioDpl.SelectedValue
nHandicDepAut = TextSocioDplAut.Text
accessDS.Insert()
nMsg = MsgBox("Ok!!!")
End Sub
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Page sans titre</title>
</head>
<body>
<form method="post" id="form1" runat="server">
<asp:AccessDataSource ID="accessDS" runat="server" DataFile="~/databases/ReponsesWeb.mdb"
InsertCommand = "INSERT INTO SocioTest (SocioAge,SocioSexe,SocioHandi,SocioDpl,SocioDplAut)
VALUES (nAnnee,nSexe,nHandic,nHandicDep,nHandicDepAut)">
<insertparameters>
<asp:formparameter name="TextSocioAge" formfield="SocioAge" />
<asp:formparameter name="RadioSocioSexe" formfield="SocioSexe" />
<asp:formparameter name="RadioSocioHandi" formfield="SocioHandi" />
<asp:formparameter name="RadioSocioDpl" formfield="SocioDpl" />
<asp:formparameter name="TextSocioDplAut" formfield="SocioDplAut" />
</insertparameters>
</asp:AccessDataSource> |
Partager