如题
HtmlTableRow row;
HtmlTableCell cell;
HtmlTableRow HeadRow = new HtmlTableRow();
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
row = new HtmlTableRow(); cell = new HtmlTableCell();
cell.InnerText = "";
row.Cells.Add(cell); }
row.Attributes.Add("ondbclick", "alert();"); tbGrid.Rows.Add(row);我是这样来添加的不知道为什么不行呢,请求帮助
HtmlTableRow row;
HtmlTableCell cell;
HtmlTableRow HeadRow = new HtmlTableRow();
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
row = new HtmlTableRow(); cell = new HtmlTableCell();
cell.InnerText = "";
row.Cells.Add(cell); }
row.Attributes.Add("ondbclick", "alert();"); tbGrid.Rows.Add(row);我是这样来添加的不知道为什么不行呢,请求帮助
tr.Attributes.Add("ondblclick", "javascript:view_onclick(this)")