在WEB页面插入table后,不能在c#中读写table单元格,经查,因为table不是服务器控件,需要让他运行在服务器才能解决问题,即在源代码(xml代码)中,将<table >改成<table id="t" runat="server" >,然后就可以在c#中对其单元格进行操作了:
t.Rows[1].Cells[2].InnerHtml = db_op.open_int("FSDBMR", cn).ToString ();
t.Rows [1].Cells [2].BgColor ="#ccffcc";