Bonjour!!
J'ai un radiobuttonlist dans une <div>, il perd la selected value a chaque fois que je recherge la page apres le click sur mon bouton.
Une idée??
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200 <%@ Page Language="C#" AutoEventWireup="true" Inherits="DemandeIntervention._Default" UICulture="auto" CodeFile="Default.aspx.cs" %> <%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc2" %> <!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 id="Head1" runat="server"> <title>Demande intervention</title> <style type="text/css"> #form1 { width: 1269px; } </style> </head> <body> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering=true> </asp:ScriptManager> <div style="height: 581px; margin-left:10px; background-color: #E9E9E9; width: 1128px; left: 5px;" align="justify" dir="ltr" unselectable="on"> <asp:Image runat="server" ID="Titre" ImageUrl="~/images/banner.gif" style="margin-left: 0px; margin-top: 0px;" BackColor="Silver" Width="1128px" Height="43px" ImageAlign="Top" /> <br /> <br /> <asp:Label ID="LabelDemandeur" runat="server" Text="Demandeur : " Font-Names="Times New Roman" Font-Size="Large" ForeColor="Black" AssociatedControlID="lblDemandeur"></asp:Label> <asp:Label ID="lblDemandeur" runat="server" Font-Names="Times New Roman" ></asp:Label> <asp:Label ID="LabelDate" runat="server" Text="Date" Font-Size="Large" AssociatedControlID="lblDate"></asp:Label> : <asp:Label ID="lblDate" runat="server" ></asp:Label> <br /> <br /> <asp:UpdatePanel ID=UpdatePanel1 runat="server"> <ContentTemplate> <asp:Label ID="LabelBatiment" runat="server" Text="Bâtiment " Font-Size="Large" AssociatedControlID="DDBatiment" ></asp:Label> <asp:DropDownList ID="DDBatiment" runat="server" onselectedindexchanged="DDBatiment_SelectedIndexChanged" AppendDataBoundItems="True" AutoPostBack="True" DataSourceID="SqlDataSource1" DataTextField="desig_empl" DataValueField="empl"> <asp:ListItem Selected="True" Value="-1">Sélectionnez un bâtiment</asp:ListItem> </asp:DropDownList> <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="DDBatiment" ErrorMessage=""Batiment??"" InitialValue="-1">Veuillez saisir un batiment!!</asp:RequiredFieldValidator> <asp:Label ID="LabelZone" runat="server" Font-Size="Large" Text="Zone" Visible="False" AssociatedControlID="DDZone"></asp:Label> <asp:DropDownList ID="DDZone" runat="server" AppendDataBoundItems="True" DataSourceID="dsZone" DataTextField="desig_empl" DataValueField="emplacemen" AutoPostBack="true" Visible="False"> <asp:ListItem Selected="True" Value="-1"></asp:ListItem> </asp:DropDownList> <asp:RequiredFieldValidator ID="rfvZone" runat="server" ControlToValidate="DDZone" ErrorMessage=""Zone??"">Veuillez saisir une zone!!</asp:RequiredFieldValidator> <br /> <br /> <asp:Label ID="LabelEquipement" runat="server" Text="N° Equipement " Font-Size="Large" AssociatedControlID="TBNumEquipement"></asp:Label> <asp:TextBox ID="TBNumEquipement" runat="server" style="margin-bottom: 0px" Height="22px" Width="128px" f AutoPostBack="True" ontextchanged="TBNumEquipement_TextChanged" ></asp:TextBox> <!-- <cc2:AutoCompleteExtender ID="TBNumEquipement_AutoCompleteExtender" runat="server" MinimumPrefixLength="1" ServiceMethod="AutoCompleteEquipement" ServicePath="AutoComplete.asmx" TargetControlID="TBNumEquipement" Enabled="True"> </cc2:AutoCompleteExtender>--> <asp:RequiredFieldValidator ID="rfvNEquip" ControlToValidate="TBNumEquipement" runat="server" ErrorMessage=""N° Equipement??"" Display="Dynamic"> Veuillez saisir un numéro d'equipement!!</asp:RequiredFieldValidator> <br /> <br /> <asp:Label ID="LabelDemande" runat="server" Text="Demande" Font-Size="Large" AssociatedControlID="TBDemande"></asp:Label> <asp:TextBox ID="TBDemande" runat="server" Width="394px"></asp:TextBox> <asp:RequiredFieldValidator ID="rfvDemande" runat="server" ControlToValidate="TBDemande" ErrorMessage=""Demande??"">Veuillez saisir une demande!!</asp:RequiredFieldValidator> <br /> <br /> <asp:Label ID="LabelDescrDem" runat="server" Text="Description de la demande " Font-Size="Large" AssociatedControlID="TBDescrDem"></asp:Label> <br /> <asp:TextBox ID="TBDescrDem" runat="server" Height="108px" Width="514px" TextMode="MultiLine"></asp:TextBox> <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TBDescrDem" ErrorMessage=""Description Demande??"">Veuillez saisir une description!!</asp:RequiredFieldValidator> <br /> <br /> </ContentTemplate> </asp:UpdatePanel> <asp:Label ID="LabelRea" runat="server" Text="Réalisation : " Font-Size="Large" AssociatedControlID="RadioButtonList1"></asp:Label> <asp:RequiredFieldValidator ID="rfvRea" runat="server" ControlToValidate="RadioButtonList1" ErrorMessage=""Réalisation??"">Veuillez choisir une réalisation!!</asp:RequiredFieldValidator> <asp:Label ID="LabelDateLim" runat="server" Font-Size="Large" Text="Pour le : " AssociatedControlID="TBDateLim"></asp:Label> <asp:TextBox ID="TBDateLim" runat="server" Text="JJ/MM/AAAA"></asp:TextBox> <cc2:PopupControlExtender ID="Popupcontrolextender3" runat="server" __designer:wfdid="w59" popupcontrolid="UpdatePanel4" position="Right" targetcontrolid="TBDateLim"> </cc2:PopupControlExtender> <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="TBDateLim" ErrorMessage=""DATE??"" ValidationExpression="^[0-9]{2}[/]{1}[0-9]{2}[/]{1}[0-9]{4}$">Veuillez saisir une date correcte!!</asp:RegularExpressionValidator> <asp:CustomValidator ID="CustVDate" runat="server" ControlToValidate="TBDateLim" ErrorMessage=""Date??"" onservervalidate="CustVDate_ServerValidate" ValidateEmptyText="True">Veuillez saisir une date supérieure ou égale à la date du jour!!</asp:CustomValidator> <br /> <asp:updatepanel id="Updatepanel4" runat="server" __designer:wfdid="w60"> <ContentTemplate> <asp:calendar id="Calendar3" runat="server" skinid="calendar" __designer:wfdid="w61" onselectionchanged="Calendar3_SelectionChanged" BackColor="White" BorderColor="#999999" CellPadding="4" DayNameFormat="Shortest" Font-Names="Verdana" Font-Size="8pt" ForeColor="Black" Height="180px" Width="200px"> <SelectedDayStyle BackColor="#666666" Font-Bold="True" ForeColor="White" /> <SelectorStyle BackColor="#CCCCCC" /> <WeekendDayStyle BackColor="#FFFFCC" /> <TodayDayStyle BackColor="#CCCCCC" ForeColor="Black" /> <OtherMonthDayStyle ForeColor="#808080" /> <NextPrevStyle VerticalAlign="Bottom" /> <DayHeaderStyle BackColor="#CCCCCC" Font-Bold="True" Font-Size="7pt" /> <TitleStyle BackColor="#999999" BorderColor="Black" Font-Bold="True" /> </asp:calendar> </ContentTemplate> </asp:updatepanel> <asp:RadioButtonList ID="RadioButtonList1" runat="server" RepeatDirection="Horizontal" > <asp:ListItem Value="1">Immédiate</asp:ListItem> <asp:ListItem Value="1">Sous 8 jours</asp:ListItem> <asp:ListItem Value="3">Sous 30 jours</asp:ListItem> </asp:RadioButtonList> <asp:ImageButton ID="ButtonOK" ImageUrl="~/images/boutonEnvoyer.gif" runat="server" Text="Envoyer" onclick="Button1_Click" Width="104px" Font-Underline="True" /> </div> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:mainta %>" ProviderName="<%$ ConnectionStrings:mainta.ProviderName %>" SelectCommand="SELECT rtrim(emplacemen) as empl , desig_empl FROM empl_tab.pri where emplacemen not like '%.%.' and emplacemen like '%.' order by desig_empl" > </asp:SqlDataSource> <asp:SqlDataSource ID="dsZone" runat="server" ConnectionString="<%$ ConnectionStrings:mainta %>" ProviderName="<%$ ConnectionStrings:mainta.ProviderName %>" SelectCommand="select emplacemen, desig_empl from empl_tab.pri where emplacemen like trim(?) + '%'"> <SelectParameters> <asp:ControlParameter ControlID="DDBatiment" Name="?" PropertyName="SelectedValue" /> </SelectParameters> </asp:SqlDataSource> </form> </body> </html>
Partager