Asp gridviews rendercontrol

Hello,

I got any questions about your ASPOSE.WORDS API:

I need to render some complex ASP gridviews as HTMLTextWriter-objects to generate a doc file.

Out of that doc file I generate in an easy manner a pdf file with the MS Interop function ExportAsfixedFormat()

Does your API also can render an ASP gridview to HTML as 1:1 output same as MS Interop ?

With the MS Interop Lib I only need a few lines of code for doing this work;

gridview to html to word to pdf

thx for answer

Hi there,

Thanks for your inquiry. Please note that Aspose.Words
for .NET is a class library that enables your applications to perform a
great range of document processing tasks. Aspose.Words supports DOC,
DOCX, RTF, HTML, OpenDocument, PDF, XPS, EPUB and other formats. With
Aspose.Words you can generate, modify, convert, render and print
documents without utilizing Microsoft Word®. Please read more detail
form here:
http://www.aspose.com/docs/display/wordsnet/Introducing+Aspose.Words+for+.NET

You can load the HTML document into Aspose.Words DOM and render it to Pdf format. I would suggest you please read the following article for more details:

Once you have loaded a file of LoadFormat into Aspose.Words DOM, you can easily render it to Pdf.


Aspose.Words does not offer any API to convert ASP GridView to HTML. However, I suggest you following solution.

1) Use the mail merge with region feature of Aspose.Words. See the following documentation links
http://www.aspose.com/docs/display/wordsnet/Mail+Merge+with+Regions+Explained
http://www.aspose.com/docs/display/wordsnet/How+to++Execute+Mail+Merge+with+Regions

2) Create a template according to your GridView’s data source.
You
can achieve this by adding a table in your template document for your grid view
as shown below:

<span style=“font-size:12.0pt;font-family:“Times New Roman”,“serif”;
mso-fareast-font-family:“Times New Roman”;color:#333333;background:white”>

Name

Address

Mobile

NTN

«TableStart:TableName»

«Name» «Address» «Mobile» «NTN»

«TableEnd:TableName»


3) Convert your GridView to a DataTable using one of the techniques demonstrated on this site here: http://www.vbforums.com/showthread.php?t=474895
4) After that you can merge the DataTable normally into your template document.
5) Save the final document to Pdf.

Hope this helps you.

Hello,

due of the complexity and format of the used gridviews it is not really convenient for me to build up any table manually according to my gridviews data source.
This would be too much work indeed.

I thought there would be any possibility to render automatically.

Anyway, thx for your detailed answer.

best wishes

Hi there,

Thanks for your feedback. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.