InnerHtml <error: an exception of type: {System.NotSupportedException} occurred> str

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • purnimakarnati
    New Member
    • Nov 2006
    • 5

    InnerHtml <error: an exception of type: {System.NotSupportedException} occurred> str

    When I added a textbox and assigned the value to the textbox and added to htmltablecell while debugging I am able to see the correct assigned value but if I see the contents in the HTMLTABLE in quick watch it is showing the error of type
    InnerHtml <error: an exception of type: {System.NotSupp ortedException} occurred> str

    can any body tell the reason and tell the solution
    Thanks in advance and greatly appreciated.

    Thanks,
    purnima
  • kenobewan
    Recognized Expert Specialist
    • Dec 2006
    • 4871

    #2
    Please display the relevant code. Have you tried using innertext instead of innerhtml?

    Comment

    • purnimakarnati
      New Member
      • Nov 2006
      • 5

      #3
      Originally posted by kenobewan
      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(datase t)
      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="to p";
      input = new HtmlInputText(" text");
      input.ID = "Pwd"+"_"+r.ToS tring();
      input.Value = row[3].ToString();
      if((bool)ViewSt ate["DeleteOptionva lue"] == true)
      {
      input.Attribute s.Add("readonly ","true");
      }
      input.Style["width"]="100";
      cell.Controls.A dd(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

      Comment

      Working...