0
我在Windows窗體中使用webBrowser來編輯文本文件。如何在編輯後關閉Uri文件
我可以通過對話框保存文件,但我不知道如何告訴webBrowser控件卸載文檔?
因此,如果我再次按下按鈕,它將再次打開保存的文件。
private void EditDates_Click(object sender, EventArgs e)
{
if (EditDates.Text.StartsWith("Close"))
{
webBrowser1.ShowSaveAsDialog();
EditDates.Text = "Edit Dates";
webBrowser1.Document.CLOSE????
}
else
{
EditDates.Text = "Close Dates";
webBrowser1.Url = new Uri(@"H:\EOD\ProductionDates.txt");
webBrowser1.Document.ExecCommand("EditMode", false, null);
}
}