Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Viewstate in webcontrol
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00881815
Message ID:
00881856
Vues:
17
>Hi Guys,
>I have created a calendar web control. The control has a text box and image. It works fine but when I click the submit button the control becomes empty even if there is a value in it before submitting. I need the control to retain the value like the textbox control. Can anyone help ?

If you build custom controls you need to manually do this in the control's code. Usually you can hook OnLoad() to pick up any incoming data and assign it to your internal controls (using good old Request.Form[]) and SaveViewState() (if you need to write out viewstate for the control) when you're done.

There are more fine grained interfaces you can implement (IPostbackHandler for example), but in situations where the control has just one child control this is overkill...
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform