<div>
<asp:ListView ID=
<ItemTemplate>
<tr>
<td id=
<asp:Label ID=
<br />
</td>
<td>
<asp:Label ID=
<br />
</td>
</tr>
</ItemTemplate>
<LayoutTemplate>
<table id=
<tr runat=
</table>
</LayoutTemplate>
</asp:ListView>
</div><asp:Button ID=
onclick=
後台代碼
public partial class ListView_Code
{
DataAccess da;
protected void Page_Load(object sender
{
if (Session[
{
da = new DataAccess();
Session[
}
else
{
da = Session[
}
if (!IsPostBack)
{
Bind();
}
}
private void Bind()
{
ListView
ListView
}
private void Export(string FileType
{
Response
Response
Response
Response
this
StringWriter tw = new StringWriter();
HtmlTextWriter hw = new HtmlTextWriter(tw);
ListView
Response
Response
}
protected void Button
{
Export(
}
}
From:http://tw.wingwit.com/Article/program/net/201311/11518.html