salut,
je crois que je rate une meilleure occasion de me taire,mais là j'ai du mal pour une chose aussi simple.
J'ai un code qui doit me permettre de faire de petit calcul,somme par si,multiplication par là.
Bref,syntaxiquement mon code est correct,reste l'affichage du résultat dans ma page aspx.
un petit coup de main,S'il Vous Plait!!
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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 <html> <script language="VB" runat=server> Sub Calcul(ByVal d1 As Integer, ByVal d2 As Integer) Dim total1 As [Decimal] = CDec(TextBox6.Text) Dim total2 As [Decimal] = CDec(TextBox7.Text) Dim totaux As [Decimal] = CDec(TextBox3.Text) TextBox6.Text = CInt(TextBox1.Text) * CInt(TextBox2.Text) TextBox7.Text = CInt(TextBox4.Text) * CInt(TextBox5.Text) TextBox3.Text = CInt(TextBox6.Text) + CInt(TextBox7.Text) End Sub </script> <body> <form runat="server"> <br /> <br /> Indemnités:<br /> <br /> <asp:TextBox ID="TextBox1" runat="server" Width="120px"></asp:TextBox> pour <asp:TextBox ID="TextBox2" runat="server" Width="82px"></asp:TextBox><br /> total<asp:TextBox ID="TextBox6" runat="server" Width="92px"></asp:TextBox><br /> <br /> <br /> Frais d'hotel:<br /> <br /> <asp:TextBox ID="TextBox4" runat="server" Width="114px"></asp:TextBox> pour <asp:TextBox ID="TextBox5" runat="server" Width="81px"></asp:TextBox><br /> total<asp:TextBox ID="TextBox7" runat="server" Width="88px"></asp:TextBox><br /> <br /> Totaux :<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox> </form> </body> </html>
merci
Partager