Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Simple ASP.NET interface question: hiding controls
Message
De
29/08/2005 13:33:18
Al Doman (En ligne)
M3 Enterprises Inc.
North Vancouver, Colombie Britannique, Canada
 
 
À
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:
01044824
Vues:
14
This message has been marked as a message which has helped to the initial question of the thread.
>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?

I don't know if it's "proper" or optimal, but I can tell you what I've done:

- I grouped, and positioned the controls I wanted to hide in a System.Web.UI.WebControls.Table
- since the controls I wanted to hide were now children of the table cells, simply making the .Table invisible seemed to do the trick.

I seem to recall experimenting with other table types but the System.Web.UI.WebControls.Table seemed to hide the most cleanly, with minimal or no wasted space.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform