void SaveAsOnClick(object objSrc, EventArgs args)
{
try
{
string tempFile = Path.GetTempFileName();
tempFile = Path.Combine(Path.GetDirectoryName(tempFile), Path.GetFileNameWithoutExtension(tempFile) + ".html");
StreamWriter writer = File.CreateText(tempFile);
writer.Write(wbBrowser.DocumentText);
writer.Flush();
writer.Close();
wbBrowser.Navigate(tempFile);
wbBrowser.ShowSaveAsDialog();
wbBrowser.DocumentText = webPage;
File.Delete(tempFile);
}
catch (Exception exception)
{
MessageBox.Show(exception.Message);
}
}