Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Web Forms, Form Properties and Binding
Message
De
20/03/2005 20:05:58
James Hansen
Canyon Country Consulting
Flagstaff, Arizona, États-Unis
 
 
À
19/03/2005 16:57:27
James Hansen
Canyon Country Consulting
Flagstaff, Arizona, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
00997635
Message ID:
00997731
Vues:
12
I think I figured out how to get the mmTextBox working when bound to a property: I have to check IsPostBack in the Page_Load event and if it is false call this.BindControl with the control or if it is true copy the text back to the property from the control. E.g.:
protected string startDateValue;
public string StartDateValue
{
	get { return startDateValue; }
	set { startDateValue = value; }
}

...

if  ( this.IsPostBack )
	startDateValue = this.StartDate.Text;
else
{
	startDateValue = DateTime.Today.ToShortDateString();
	this.BindControl(this.StartDate);
};
I was expecting this to be a bit more automatic. Or am I still not getting it?

On the other hand, I still don't have a clue how to fill a mmDropDownList from an array.

(After 38 years developing software and now trying to learn .NET, I have one question: Are we having fun yet? ;-)
...Jim
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform