The remote server returned an error: (401) Unauthorized.
Protected Sub btnSaveAsHtml_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSaveAsHtml.Click <pre>Dim url As String url = "http://test.intranet.company.com/ESTaxCalculator/" Dim wc As System.Net.WebClient = New System.Net.WebClient 'wc = Nothing Dim path As String path = "C:\inetpub\temp\" Dim filename2 As String filename2 = "E&Shtml.html" wc.DownloadFile(url, path + filename2) Response.ClearContent() Response.ClearHeaders() Response.AddHeader("ContentType", "application/octet-stream") Response.AddHeader("Content-Disposition", "attachment; filename=E&Shtml.html") Response.WriteFile(path + filename2) Response.End()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)