Hi all, I'm facing a stange issue. When I export a GridView as a power point attachment it shows fine using PowerPoint 2003 but does not show at all using PowerPoint 2007, is there any special tag or style I should use to show it correctly on PowerPoint 2007?
UPDATE: It does not even show a simple HTML saying Hello World :(
Thanks.
This is the code
protected void Page_Load(object sender, EventArgs e)
{
Response.Clear();
Response.Buffer = false;
Response.BufferOutput = false;
Response.Charset = "";
Response.ContentType = "application/vnd.ms-powerpoint";
Response.AddHeader("Content-Disposition", "attachment;filename=\"ChartData.ppt\"");
BindData();
}
private class Data
{
public Data(string name, string description)
{
Name = name;
Description = description;
}
private string _name = string.Empty;
public string Name
{
get { return _name; }
set { _name = value; }
}
private string _description = string.Empty;
public string Description
{
get { return _description; }
set { _description = value; }
}
}
private void BindData()
{
System.Collections.Generic.List<Data> data = new System.Collections.Generic.List<Data>();
for (int index = 0; index < 10; index++)
{
data.Add(new Data("Name_" + index, "Description_" + index));
}
_toExport.DataSource = data;
_toExport.DataBind();
}