Click here to Skip to main content
15,906,567 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
HI Friends ,

Can anyone knows how to export gridview data to rtf format in asp.net.

Thanks in advance
Posted
Comments
[no name] 7-Aug-13 3:00am    
what you have tried so far..??what you know about rtf format...??
PRAKASH_N 7-Aug-13 5:24am    
i tried with exporting gridview data to word(.doc) and its working and later i modified the content type rtf but the output file is in html format..

Follow this tutorial..
Databind a GridView and export to Excel or text file[^]
Check the code of Export to text file. And change this line...
C#
string Destinationpath = Startuppath + ""+ DateTime.Now.ToString("dd-MMM-yyy") +".txt";

To,
C#
string Destinationpath = Startuppath + ""+ DateTime.Now.ToString("dd-MMM-yyy") +".rtf";

Hope your work should be done.
 
Share this answer
 
v3
Export-GridView-To-Word-Excel-PDF-CSV-Formats-in-ASP.Net.aspx[^]

Check the link..and change according to your need..
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900