bind textbox for display & editing

R

rbutch

hey guys got a question.
im trying to bind a textbox "at runtime". im creating the conn string, dataset, dataAdapter etc dynamically.
and it keeps erroring out.

<asp:TextBox ID="txtDay1" Runat="server"
TextMode='<%# A39.DataRow["Day1"]%>'></asp:TextBox>

now i have no problem doing this if i hard code my connection string, dataadapter, dataset etc and use the method (databinder eval).

<asp:TextBox ID="txtDay1" Runat="server"
Text='<%# DataBinder.Eval(Ds, "Tables[A39].DefaultView.[0].Day1") %>'></asp:TextBox>

i guess im looking for the best method to display up to 26 columns and nearly all of them be editable (Updated) and was trying to not do this using a DataGrid or DataList and build Templates for each individual cell.

Any Ideas or am I trying to find the easy Way out. This was so easy to do in WinForms.
thanks
rik

**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
 

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

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top