Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Concatenating from SQL
Message
De
09/09/2004 09:40:33
 
 
À
09/09/2004 09:27:16
Bill Benton
North Florida Software Services
Middleburg, Floride, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
00940548
Message ID:
00940598
Vues:
24
Bill,

I'm not a MM expert, so I don't know if you can bind MM controls to a variable (I'm guessing you can't, but don't want to say for certain).

If you just want to stick with a variable, you can set the textbox' text property to the string, to get the string to display in the textbox. If you're allowing the user to edit the string, you'd need to examine the text property afterwards.

If you want to use binding, you have to declare the string as a property. Just as a simple example, let's say you declare the string as a property in the form...
private string  _cText ;   
public string cText 
{
	get {return _cText  ;}
	set {_cText  = value;}
}
Then you assign cText the way you would any other property...
this.cText = "";

this.cText = Dr["mycolumn"]...
Then you can bind to your textbox like so...
myTextBox.DataBindings.Add("Text",this,"cText");
Hope that helps...
Kevin
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform