Please display the relevant code. Have you tried using innertext instead of innerhtml?
Hi All,
Can anybody solve my problem.
I created a HTMLTable with a dataset by a method called addTable(dataset)
After creating a new table and new row I am adding cells and in each cell I am adding a HtmlInputText control as follows
cell = new HtmlTableCell();
cell.Width="100";
cell.VAlign="top";
input = new HtmlInputText("text");
input.ID = "Pwd"+"_"+r.ToString();
input.Value = row[3].ToString();
if((bool)ViewState["DeleteOptionvalue"] == true)
{
input.Attributes.Add("readonly","true");
}
input.Style["width"]="100";
cell.Controls.Add(input);
tableRow.Cells.Add(cell);
and assigning the data correctly in the HTMLTable object(table) and displaying in one DIV tag. Then there is no problem.
but in my webform I have a link SubIDSearch. when i click that link a popup window displays with all the SubID's and checkboxes. When we check some checkboxes then those respective SubID's details must be displayed in the htmltable in the DIV tag. For that I again recreated the same object(table) as table =new Htmltable();
and again called the addTable(with all subID's selected) then already existing subID's are remaining in the table but not new selected subID's. But if I repalce the above snippet as
cell.ID ="SubID"+"_"+r.ToString();
cell.Style["font"]="Verdana";
cell.InnerText = row[1].ToString();
tableRow.Cells.Add(cell);
It is working correctly. But I must be able to edit the values so this is not possible with this.
I think the problem is with the input.ID property. I want to read the values after updating the values in the input controls so for that I want to get by the ID property.
Here is the sample form
and I have a doubt Will the HtmlTable maintains any viewstates
thanks in urgent