Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to bind textbox, checkbox
Message
De
29/10/2009 12:48:51
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Titre:
How to bind textbox, checkbox
Versions des environnements
Environment:
C# 3.0
OS:
Vista
Network:
Windows 2003 Server
Database:
MySQL
Application:
Web
Divers
Thread ID:
01432218
Message ID:
01432218
Vues:
116
Hello The C# Expert,

I am googling to find how to bind textbox, checkbox (view, insert,update,delete)..

I found below routine..

but some limitations;

- unable to bind checkbox .. it return error (String was not recognized as a valid Boolean)

- unable to do insert,update,delete.

I need help

TIA

public void BindField(Control control, string propertyName, object dataSource, string dataMember)
{
Binding bd;
for(int index = control.DataBindings.Count - 1; (index == 0); index--)
{
bd = control.DataBindings[index];
if(bd.PropertyName == propertyName)
control.DataBindings.Remove(bd);
}
control.DataBindings.Add(propertyName, dataSource, dataMember);
}
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform