Click here to Skip to main content
15,886,799 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I Want to create HTML page with my dynamic data and then want to store this page on harddisk in asp.net
Posted

It's very simple! Write a class to generate your custom html page and this class will use System.IO namespace and the methods you need to use steamwriter to generate the html tags.

for example,
XML
StringBuilder HTML = new StringBuilder();
 String NewLine = System.Environment.NewLine;
HTML.Append(

"<HTML>" + NewLine + "<head>" + NewLine);
 HTML.Append("<title>" + TextBox2.Text.ToString() + "</title>" + NewLine + "</head>" + NewLine);


Hope it will helps. Try to google you will find so many examples like this.

Happy coding:)
 
Share this answer
 
Hi,

Here[^] is a simple example given for creating html content runtime.

After creating text using StringBuilder check this[^] discussion for storing html file in your harddrive.

Above two discussion will solve your problem

Thanks
-Amit Gajjar.
 
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