Home All Groups Group Topic Archive Search About

How to bind a textbox to a data source

Author
4 May 2007 2:27 PM
Fred
The problem is that, in VS2003 using web forms, the text control had a
property - "Databinding" that simplified connecting the control to a
datasource. It could be done visually during design and was very simple
to modify.

In VS2005, I want to do the same thing: I want to add a textbox to a
form and then bind it to a datasource, and I want to do it visually,
without having to go to the HTML source and add something like,
text='<%# DataBinder.Eval(HelpDeskDV, "[0].ContactName", "{0}") %>'.

So the question is: how do I assign a datasource to an existing textbox
on a web form?

Regards,
Fred

*** Sent via Developersdex http://www.developersdex.com ***

Author
5 May 2007 1:14 PM
Riki
Fred wrote:
> The problem is that, in VS2003 using web forms, the text control had a
> property - "Databinding" that simplified connecting the control to a
> datasource. It could be done visually during design and was very
> simple to modify.
>
> In VS2005, I want to do the same thing: I want to add a textbox to a
> form and then bind it to a datasource, and I want to do it visually,
> without having to go to the HTML source and add something like,
> text='<%# DataBinder.Eval(HelpDeskDV, "[0].ContactName", "{0}") %>'.
>
> So the question is: how do I assign a datasource to an existing
> textbox on a web form?

See the discussion with the same subject one week ago in this newsgroup.

--

Riki