请留下您的邮箱,我们将在2小时内将文件发到您的邮箱
動態產生網頁檔
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace CreateHtmlFile
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
StreamWriter sw = new StreamWriter("htmlfile.html");
sw.WriteLine("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">");
sw.WriteLine("<html xmlns=\"http://www.w3.org/1999/xhtml\"><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">");
sw.WriteLine("<title>360 ° View Gallery</title>");
sw.WriteLine("<body>");
sw.WriteLine("<p>test html</p>");
sw.WriteLine("");
sw.WriteLine("</body>");
sw.WriteLine("</html>");
sw.Close();
}
}
}