Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Best Practices - Expand a form on postback?
Message
 
À
05/03/2003 01:44:55
Keith Payne
Technical Marketing Solutions
Floride, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00761371
Message ID:
00761372
Vues:
24
This message has been marked as a message which has helped to the initial question of the thread.
Keith,

Setting the visible property in the Click event will work on the controls as you want. You might want to put all the controls in a panel control and turn the visible property true/false which allows you to hide all the controls at once or show them by just using the one control's property.

>I would like to implement a web form that will display a textbox and submit button that looks up an "account number". When the user types the account number and clicks submit, I want to expand the form to include more controls.
>
>My plan is to create the form with all of the possible controls and set them to visible=False. Then when the user inputs a valid account number, set them to visible=True in the submit button's click event.
>
>My understanding is that the click event fires after the page is posted back but before the HTML is sent to the browser. Is this the best way to code this? Will I be able to set the visible property in the click event, or does it have to be moved to the page's load event? If it has to be moved, how can I examine the button's commandname and commandargument properties in the page load event?
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform