Bonjour
j'ai écris cela avec de l'aide quand meme
j'ai deux erreurs qui sont les memes:
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>Page 2: Informations</title> </head> <body> <form id="form1" runat="server"> La date : <% =Now()%> <br /> <aspqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStringsRODUCTIONConnectionString %>" InsertCommand="INSERT INTO VUE_PRISE_DE_POSTE(Initiales, Date, Heure_debut) VALUES (,,)" > </aspqlDataSource> <asp:FormView ID="FormView1" runat="server" DataSourceID="SqlDataSource1" DefaultMode="Insert" AllowPaging="True"> <EditItemTemplate> Initiales: <asp:TextBox ID="InitialesTextBox" runat="server" Text='<%# Bind("Initiales") %>' /> <br /> Heure_debut: <asp:TextBox ID="Heure_debutTextBox" runat="server" Text='<%# Bind("Heure_debut") %>' /> <br /> Date: <asp:TextBox ID="DateTextBox" runat="server" Text='<%# Bind("Date") %>' /> <br /> <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update" Text="Mettre à jour" /> <asp:LinkButton ID="UpdateCancelButton" runat="server" CausesValidation="False" CommandName="Cancel" Text="Annuler" /> </EditItemTemplate> <InsertItemTemplate> Initiales: <asp:TextBox ID="InitialesTextBox" runat="server" Text='<%# Bind("Initiales") %>' /> <br /> Heure_debut: <asp:TextBox ID="Heure_debutTextBox" runat="server" Text='<%# Bind("Heure_debut") %>' /> <br /> Date: <asp:TextBox ID="DateTextBox" runat="server" Text='<%# Bind("Date") %>' /> <br /> <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert" Text="Insérer" /> <asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False" CommandName="Cancel" Text="Annuler" /> </InsertItemTemplate> <ItemTemplate> Initiales: <asp:Label ID="InitialesLabel" runat="server" Text='<%# Bind("Initiales") %>' /> <br /> Heure_debut: <asp:Label ID="Heure_debutLabel" runat="server" Text='<%# Bind("Heure_debut") %>' /> <br /> Date: <asp:Label ID="DateLabel" runat="server" Text='<%# Bind("Date") %>' /> <br /> </ItemTemplate> </asp:FormView> </form> </body> </html>
Citation:
La clause Handles requiert une variable WithEvents définie dans le type conteneur ou l'un de ses types de base. C:\Documents and Settings\JEAN CLAUDE RAGON\Mes documents\Visual Studio 2008\Projects\WebApplication1\WebApplication1\Page2.aspx.vb
a la ligne 12 donc a ConnectionString="<%$ ConnectionStringsRODUCTIONConnectionString %>"
page2.vb
MErci de m'accorder du temps
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 Public Partial Class Page2 Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load End Sub Protected Sub DataList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles DataList1.SelectedIndexChanged End Sub Protected Sub TextBox1_TextChanged(ByVal sender As Object, ByVal e As EventArgs) Handles TextBox1.TextChanged End Sub End Class
Partager