<% @ Import Namespace=" System.IO " %> <html > <BODY > <SCRIPT LANGUAGE = "VB" RUNAT = "SERVER" > Sub UploadFile_Clicked ( Sender as Object, e as EventArgs ) Dim lstrFileName as string Dim lstrFileNamePath as string Dim lstrFileFolder as string '''' 如果上传目录为空,就使用" c:\ "作为缺省上传目录 '''' 获得上传到服务器的目录名称 if dir.value <> "" then lstrFileFolder = dir.value else lstrFileFolder = "c:\" end if