[asp.net]常用的基本的寫入文字檔(write,streamWrite,create,creat,File,Create,CreateText)

  • 32030
  • 0

摘要:[asp.net]常用的基本的寫入文字檔


Try
            'File.CreateText寫入的檔案格式已經是utf-8            
            Dim sr As StreamWriter = File.CreateText(strFileName)
            sr.WriteLine("deliver=" & strDeliver)
            sr.WriteLine("receiver=" & strReceiver)

            sr.Close()

            bolSuccess = True
        Catch ex As Exception
         
        End Try

常常搭配Server.mappath