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
| Public Partial Class WebForm4
Inherits System.Web.UI.Page
Dim tarif = 100
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
End Sub
Protected Sub RadioButton1_CheckedChanged(ByVal sender As Object, ByVal e As EventArgs) Handles RadioButton1.CheckedChanged
tarif = 100
End Sub
Protected Sub RadioButton2_CheckedChanged(ByVal sender As Object, ByVal e As EventArgs) Handles RadioButton2.CheckedChanged
tarif = 150
End Sub
Protected Sub RadioButton3_CheckedChanged(ByVal sender As Object, ByVal e As EventArgs) Handles RadioButton3.CheckedChanged
tarif = 200
End Sub
Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles LinkButton1.Click
Page.Validate()
If (Page.IsValid) Then
Label1.Text = "Félicitations " & (TextBox1.Text) & " " & (TextBox2.Text) & ", vous êtes inscrit pour le voyage, le montant à payer est " & (tarif * Val(TextBox4.Text)) & " Dhs"
End If
If (Page.IsValid = False) Then
Label1.Text = "Vous devez valider les informations avant de continuer"
End If
End Sub
End Class |