Can you databind a textbox to a datasource?


C

Charley Jones

In Visual Studio 2005 Beta 2.
Working on an ASP.Net application.
Can you databind a textbox to a datasource?
2 way binding?

ie:
<asp:TextBox ID="TextBox6" runat="server"
Text="<%# DataBind.Eval(dsTable,"FIELD")%>">

I've noted that you can place the TextBox inside a FormView,
Assign the FormView to a DataSource,
Then you can bind easily.

What I'm trying to do is bind directly to the Datasource,
Without and intervening Formview.

Example: I have two fields on a page,
I would like the user to be able to modify either field,
And in the onchanged event,
Updated the database.
 
Ad

Advertisements


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

Top