Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Simple ASP.NET interface question: hiding controls
Message
 
 
À
29/08/2005 13:21:06
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
C# 1.1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Divers
Thread ID:
01044818
Message ID:
01044825
Vues:
17
>On my way to learning this thing called ASP.NET <g>:
>
>In v1.1 I have a form that has a few labels, dropdowns and textboxes to gather parameters from the user to produce a report. The queries and calculations are done (in a class) and returned as an HTML Table. It is a single page deal. There is an if() checking for PostBack. If PostBack=true then it sets all the page controls.visible property to false and then shows the HTML Table with the results.
>
>I did not see an automatic way for the controls to dissappear by themselves on PostBack so I just turn them invisible but the space where they are is still used as blank rows, therefore the table starts very low on the page.
>
>What is the proper way to hide the controls not wasting their screen real estate?
>
>TIA

One thing you might want to consider is instead of using HTML table, use ASP:table and ASP:TableRow. These are very easy to hide by simply setting the property to invisible. And they don't take any space, I think because they are server-side controls.

I place all my controls that have to be displayed based on user setting in those tables (ASP:Table) and I have not seen extra space problem.

HTH.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform