开发者

Can i add rows and cells to a table dynamically?

I want the user to submit a message, and that message will be automatically added as a table row. Is it possible?

I want to do this:

Table table=new Table. table.Rows.Add(row)

Then I want to be able to insert a label into that row. For example:

 row.Add(table)

But I can't find a way to do that.

http://msdn.microsoft.com/en-us/library/system.web.u开发者_如何转开发i.webcontrols.table.aspx

I want the table to grow one row bigger than it used to be with a label of the users newly added message.

I know that forums use tables, but their table seems to be growing with every message submitted.

How can I achieve the same effect with C#?


You did not provide enough details to say for sure, but almost absolutely yes.

If the HTML is dynamically and explicitly generated by you, then yes. Insert it in there.

If you are using a non-constant DataSource, then yes. Insert it in there.

The only reason it would not be possible is if the page is static, or if the data source is constant. And both of those are changeable.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜