Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cannot hide a control
Message
De
09/05/2006 16:42:56
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
09/05/2006 16:19:16
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01120518
Message ID:
01120533
Vues:
12
This message has been marked as the solution to the initial question of the thread.
>I have this code defined in a Web form:
>
>
><tr id="ShopDisplay" visible=true>
><td class="Label">< %=LXFramework.GetMes("Message", "Shop")% >:</td>
><td><asp:textbox ID="Shop" runat="server" Columns="60" style="Width: 500px;" CssClass=InputReadOnly Enabled=false></asp:textbox>
></tr>
>
>
>If I try to do:
>
>
>            toPage.ShopDisplay.Visible = False
>
>
>I obtain:
>
>Object variable or With block variable not set.
>
>Why aren't we allowed to change the Visible property?

Michel,
Is it clientside code? runat attribute is missing. ie:
<tr runat="server" id="ShopDisplay" visible="true"> 
<td class="Label">....</td>
<td>
<asp:textbox ID="Shop" runat="server" Columns="60" style="Width: 500px;" Enabled="false"/>
</td>
</tr>
Page.FindControl("ShopDisplay").Visible = false

Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform