aspgeek
asked on
How to assign value from the Dataset to the textbox in a Textbox array
HI,
I have created a textbox array. Now i need to dynamically create textboxes and then assign the values in the dataset to the textboxes. and then teh textboxes to the HTML cells .
I am getting an error here when i am assigning the value in teh DS to the textbpox
foreach (TextBox curcotrl in txt_bx)
{
HtmlTableRow htr_rowctrl = new HtmlTableRow();
HtmlTableCell htc_ctrlctrl = new HtmlTableCell();
string ctrltype = row["DATA_TYPE"].ToString( );
txt_bx.Text = row["DATA_TYPE"].ToString( );
htc_ctrlctrl.Controls.Add( curcotrl);
htr_rowctrl.Cells.Add(htc_ ctrlctrl);
controls.Controls.Add(htr_ rowctrl);
}
Please help
I have created a textbox array. Now i need to dynamically create textboxes and then assign the values in the dataset to the textboxes. and then teh textboxes to the HTML cells .
I am getting an error here when i am assigning the value in teh DS to the textbpox
foreach (TextBox curcotrl in txt_bx)
{
HtmlTableRow htr_rowctrl = new HtmlTableRow();
HtmlTableCell htc_ctrlctrl = new HtmlTableCell();
string ctrltype = row["DATA_TYPE"].ToString(
txt_bx.Text = row["DATA_TYPE"].ToString(
htc_ctrlctrl.Controls.Add(
htr_rowctrl.Cells.Add(htc_
controls.Controls.Add(htr_
}
Please help
ds.Tables[0].Rows[0]["Colu mn Name"].ToString()
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.