exporting datagrid to excel Exception pb

F

Franck

Hello,
I try to export a datagrid into a excel files,
I've read the help there:

http://www.codeproject.com/aspnet/DAtaGridExportToExcel.asp


I've copied the code
but i receive this exceptionException:

Control 'dgDowntime_ctl02_ctl00' of type 'DataGridLinkButton' must be
placed inside a form tag with runat=server.

event if the datagrid is inside a form with runat=server...


<form id="Form1" method="post" runat="server">
<asp:DataGrid ID="dgDowntime" runat="server" Width="100%" .....

What am i missing?
Thank you!
 
J

Jan

Control your are referring to is probably not working because HTML you
are sending to MS Excel is too specific.

However, you have other free alternatives. For example, ExcelLite Free
is a free .NET component that can read / write both XLS and CSV files.
You can use it in a commercial applications; it is only limited to max
150 rows per sheet. You can download it here:
http://www.gemboxsoftware.com/ExcelLiteFree.htm

Jan
GemBox Software
http://www.gemboxsoftware.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top