PC Review


Reply
Thread Tools Rate Thread

Data Bind Form

 
 
Ben
Guest
Posts: n/a
 
      11th Mar 2008
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!
 
Reply With Quote
 
 
 
 
Ben
Guest
Posts: n/a
 
      11th Mar 2008
On Mar 10, 8:35*pm, Ben <benm5...@gmail.com> wrote:
> 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?
 
Reply With Quote
 
Ben
Guest
Posts: n/a
 
      11th Mar 2008
On Mar 10, 10:58*pm, Ben <benm5...@gmail.com> wrote:
> On Mar 10, 8:35*pm, Ben <benm5...@gmail.com> wrote:
>
> > 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?


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!
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
VSTO 2008 how to bind Form Region controls to Item data fields escamoteur Microsoft Outlook VBA Programming 3 10th May 2010 09:03 AM
VSTO 2008 how to bind Form Region controls to Item data fields escamoteur Microsoft Outlook Program Addins 2 10th May 2010 09:03 AM
Using a data-bind dropdownlist to populate another data-bind dropdownlist mr2_93 Microsoft ASP .NET 1 2nd Oct 2005 06:07 PM
How do I bind a control on a form to a different table than the form is bound to? Mark Gonyea Microsoft Access Forms 2 4th Jun 2004 09:01 PM
question on using query to bind data to form djc Microsoft Access Form Coding 2 13th Oct 2003 10:28 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:15 AM.