Data Bind Form

B

Ben

I'm new to VS2008 (and ASP.NET in general).

I'm trying a simple example, i have a class that exposes a DataSet and
want to populate 2 textboxes on a web form...

how can i bind from the datasource? (and have it update it after
clicking a Save button)

I've seen some examples refer to a Bindings property, but i don't see
it exists in a Textbox object... there's only DataBind() and it takes
no params, and there's no DataSource property...

Thanks!
 
B

Ben

I'm new to VS2008 (and ASP.NET in general).

I'm trying a simple example, i have a class that exposes a DataSet and
want to populate 2 textboxes on a web form...

how can i bind from the datasource? (and have it update it after
clicking a Save button)

I've seen some examples refer to a Bindings property, but i don't see
it exists in a Textbox object... there's only DataBind() and it takes
no params, and there's no DataSource property...

Thanks!

I found this Westwind.Web.Data which looks really cool:
http://www.developerfusion.co.uk/show/4659/3/

i'm not really sure from the example how to set the
BindingSourceObject & BindingSourceProperty properties. I have a
static class object called Config, and it's GetData returns a single
row with a field called "ID"... so I set:

BindingSourceObject = "Config.GetData"
and
BindingSourceProperty = "ID"

but can't figure out why i get "** Field binding Error **" on my bound
textbox...

anyone got this thing to work?
 
B

Ben

I found this Westwind.Web.Data which looks really cool:http://www.developerfusion.co.uk/show/4659/3/

i'm not really sure from the example how to set the
BindingSourceObject & BindingSourceProperty properties.   I have a
static class object called Config, and it's GetData returns a single
row with a field called "ID"... so I set:

BindingSourceObject  = "Config.GetData"
and
BindingSourceProperty = "ID"

but can't figure out why i get "** Field binding Error **" on my bound
textbox...

anyone got this thing to work?

Ahhh.... found my problem.

BindingSourceObject had to point to a public object name on the form
(accessible via: this.<objectname>)

COOL !!! this thing is awesome, gonna save me so much time!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top