|
Try This code. It would write a file to the server
WriteHtmlFile("/google.html","hello world")
Public Function WriteHtmlFile(ByVal filename As String, ByVal strData As String) As String
Dim objReader As StreamWriter
Try
objReader = New StreamWriter(filename)
objReader.Write(strData)
objReader.Close()
Return "Success"
Catch Ex As Exception
Return filename
End Try
End Function
Public Function GetFileName(ByVal URL As String) As String
Dim filename As String = ""
'If Not (URL = "") Then
filename = Server.MapPath(URL.Replace(strSite, ""))
'End If
Return filename
End Function
|