我试图通过在mysql命令行中运行此命令来将mysql表导出为csv格式
HtmlTable myTable = new HtmlTable();
for (int i = 1; i <= 100; i++)
{
HtmlTableRow row = new HtmlTableRow();
HtmlTableCell cell1 = new HtmlTableCell();
cell1.InnerText = "cell" + i;
row.Controls.Add(cell1);
HtmlTableCell cell2 = new HtmlTableCell();
Button btn = new Button();
btn.Text = i.ToString();
btn.Click += new EventHandler(btn_Click);
cell2.Controls.Add(btn);
row.Controls.Add(cell2);
myTable.Controls.Add(row);
}
PlaceHolder1.Controls.Add(myTable);
}
void btn_Click(object sender, EventArgs e)
{
Response.Write(((sender) as Button).Text);
}
但是有很多html标签和字符,所以无论如何我可以添加一个命令来解析html ???