Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to bind textbox, checkbox
Message
From
29/10/2009 12:48:51
 
 
To
All
General information
Forum:
ASP.NET
Category:
ADO.NET
Title:
How to bind textbox, checkbox
Environment versions
Environment:
C# 3.0
OS:
Vista
Network:
Windows 2003 Server
Database:
MySQL
Application:
Web
Miscellaneous
Thread ID:
01432218
Message ID:
01432218
Views:
117
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);
}
Next
Reply
Map
View

Click here to load this message in the networking platform