Questions tagged [htmlwriter]
16 questions
5
votes
2 answers
How to make the header font bold while exporting dataset to excel?
Here i am exporting the datatables in a dataset to excel.How to make the header font of the datatable alone look bold.Here is my code
HttpContext.Current.Response.Clear();
HttpContext.Current.Response.AddHeader("content-disposition",…

Rooney
- 827
- 7
- 15
- 21
2
votes
1 answer
How to do do HtmlTextWriter.WriteAttribute with a single quote?
I'm writing a control to support HTML5 video. The type attribute has to specify the codec as well. Some examples show: type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'. When I'm writing the codec with the HtmlWriter, it flushes type="video/mp4;…

Kees C. Bakker
- 32,294
- 27
- 115
- 203
2
votes
1 answer
Javax.swing.text, Lowagie, HTMLWriter adding image (Not from file)
I am trying to create a document with htmlWriter in com.lowagie.text in Java.
What I do, is that I create an image (from qr-code) and try to add it to the document.
The document is connected to an ByteArrayOutputStream, and then I write it out to a…

TorK
- 567
- 2
- 10
- 27
2
votes
2 answers
Adding a click event to a dynamic button rendered through a literal
I have a dynamic button which is being rendered through an ASP:Literal
StringBuilder sb = new StringBuilder();
StringWriter sw = new StringWriter(sb);
HtmlTextWriter writer = new HtmlTextWriter(sw);
Button btnOpenFile = new Button();
btnOpenFile.ID…

Paul Kirkason
- 227
- 2
- 4
- 20
1
vote
2 answers
htmltextwriter and cross site scripting
Just a quick question I was asked to go through a vb app and fix all the places where cross site scripting could happen. I changed the <%= to <%: and everywhere they were putting together html in the code and injected a string I changed to…

Bryan Dellinger
- 4,724
- 7
- 33
- 79
1
vote
1 answer
How to write set selected option in a dropdown from c#
im trying to achieve below html code from c#
my main goal is to do…

MD TAHMID HOSSAIN
- 1,581
- 7
- 29
- 54
1
vote
0 answers
font tag HTMLWriter
I'm using a JTextPane with a HTMLDocument inside to read and write HTML via HTMLEditorKit. Everything works quite fine, except that the wonderful full-conform W3C HTML5 I'm putting inside is then written in an ugly, deprecated, obsolete…

Sharcoux
- 5,546
- 7
- 45
- 78
1
vote
2 answers
How do I stop HTMLWriter from writing bad HTML? (using HTMLEditorKit)
Here is surprising behaviour. I create a JTextPane , set it up to use HTMLEditorKit, and fill it with valid HTML. But by default Java's HTMLWriter creates invalid HTML. Most items are serialised out correctly but img tags lose their closing slash…

Tony Eastwood
- 781
- 2
- 9
- 23
0
votes
1 answer
How to remove first two columns and hyperlinks from repeater exported excel
I am exporting data to excel from repeater control, which contains some hyperlinks in multiple columns and link buttons in first two columns. I want to remove all hyperlinks as well as remove or hide first two columns, when I export the data to…

shekhar
- 13
- 6
0
votes
0 answers
Why doesn't HtmlTextWriter render datetime column?
I been trying to export the stored procedure as an excel sheet, but the columns with datetime type do not render in the resulted table
this is a simplified code sample
System.Web.UI.WebControls.DataGrid grid = new…

Opt Prutal
- 384
- 4
- 14
0
votes
1 answer
Workbook gem - how to write the excel to html in a formatted manner?
I am using Workbook gem to preview the excel file without page breaks in my website. Right now, I am successful in extracting the excel file and writing it into html format and display as preview.
The following code extracts and writes the excel to…

Toby Joy
- 21
- 7
0
votes
1 answer
0
votes
0 answers
iText Can you use PdfPTable with HtmlWriter
I am working on a legacy java web application. The application uses iText 2.0.1. They do not want to upgrade the version of iText so I have to continue using this one.
I need to output to either pdf or html. I am creating a PdfPTable. I create a…

Greg
- 57
- 1
- 2
- 7
0
votes
0 answers
com.lowagie.text.html: HTMLWriter added image is empty
I am writing in java, but want to create a dynamic HTML-page for the users. I am using Lowagie to create the document with HTML. I do manage to present the html, but my picture is empty. It just contain the picture-border.
Can anyone help me with…

TorK
- 567
- 2
- 10
- 27
0
votes
0 answers