Hi all.
Why I get this error msg?
My code:
=====================
SQLCommand sqlCommand = new SQLCommand(txbQuery.Text, myConnection);
myConnection.Open();
SQLDataReader dr;
sqlCommand.Execute(out dr);
TableRow tbRow = new TableRow();
tbRow.ID="tbRow;
TableCell tbCell = new TableCell();
tbCell.ID="tbCell;
if(dr.Read()){
DataGrid dgGrid = new DataGrid();
dgGrid.MaintainState=false;
dgGrid.DataSource=dr; // *
dgGrid.DataBind();
dgGrid.ID="dgGrid";
tbCell.Controls.Add(dgGrid);
tbCell.Controls.Add(new LiteralControl("Nothing"));Quote:}else
tbRow.Cells.Add(tbCell);
tbQuery.Rows.Add(tbRow); // <- here is the line with error msg
========================
When I remove * line everything is ok.
I cannot find ctrl1, but every time I get this error.
Thank you for any help.