Here is the code (content is the name of my <div>):
foreach (Exercise ex in exs)
{
Label label = new Label();
label.ID = Convert.ToString(ex.ex_id);
label.Text = ex.ex_text;
TextBox textbox = new TextBox();
textbox.Width = 100;
textbox.ID =Convert.ToString(ex.ex_id);
id_counter++;
content.Controls.Add(label);
//content.InnerHtml += "<br />";
content.Controls.Add(textbox);
}
It crushes on the content.Controls.InnerHtml+="<br/>" thingy.
I tried wihtout the space in the < > it wouldn;t work either :S.
I usually use content.innerhtml though dunno why it wun work here.
I tried setting it in a variable but this wonlt work either same error.
Anyone knows why it happens ? I always use this content.inner html in my functions :S...