Function of random file name in ASP, can also be used without modification in ASP.NET
Put it in Module1.vb, declare that the public function can call in any WebForm.
Function makefilename (byval fname) 'Generate file name FNAME = now () fname = replace (FNAME, ",", "") FName = Replace (FNAME, ": "," "" Fname = replace (FNAME, "PM", ") FNAME = Replace (FNAME," AM "," ") FNAME = Replace (FNAME," AM "," ") FNAME = Replace (FNAME, "In the afternoon", "") makefilename = fname & ".htm" end function
Method: Public Sub FileWrite (Byval Str As String, Byval MyfileName As String) 'New Document (Content, Path, File Name)
End Sub
Call FileWrite ("i like asp.net", "path", makefilename ())