Mettre un controle visible a false qui est dans un repeater; ASP.NET VB.NET
Bonjour à tous. J'ai un problème. Je veux mettre un control Panel a false. Celui-ci se trouve dans un Repeater. Je ne sais pas comment acceder a mon control dans ma page .aspx.vb dans le load pour le mettre a false.
Voici le code asp :
Code:
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
| <asp:Repeater ID="rptStage" runat="server" >
<ItemTemplate>
<table class="repStage1">
<tr>
<td class="titre"><%# DataBinder.Eval(Container.DataItem, "TitreStage") %></td>
<td>Quand : Du <%#Format(DataBinder.Eval(Container.DataItem, "DateDebut"), "yyyy-MM-dd")%>
au <%#Format(DataBinder.Eval(Container.DataItem, "DateFin"), "yyyy-MM-dd")%></td>
</tr>
<tr>
<td>Où : <%# DataBinder.Eval(Container.DataItem, "NomEnt") %></td>
<td>Rémunération : <%# DataBinder.Eval(Container.DataItem, "Remuneration") %>$</td>
</tr>
<tr>
<td colspan="2">Description : <%#DataBinder.Eval(Container.DataItem, "DescStage")%>(...)</td>
</tr>
<tr>
<td colspan="2" style="text-align: right">
<a href="StageDetail.aspx?Stage=<%#DataBinder.Eval(Container.DataItem, "NoStage")%>">-> Voir loffre en détail <-</a>
</td>
</tr>
<tr>
<td>
<asp:Panel ID="PanStage1" runat="server">
<a href="VoirStage.aspx?StageNo=<%#DataBinder.Eval(Container.DataItem, "NoStage")%>">
-> Désactiver le Stage <-</a>
</asp:Panel>
</td>
</tr>
</table> |
Meme avec la fonction FindControl(Id) dans mon .aspx.vb, je ne suis pas capable de voir mon controle
Code:
1 2 3 4 5 6
| Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not Me.IsPostBack Then
If Session("Ent") = "O" Then
Dim pnl1 As Panel = DirectCast(rptStage.FindControl("PanStage1"), Panel)
pnl1.Visible = False |
Merci !!!!!!!!!!
Marco