PDA

View Full Version : Tạo thư mục và file trên máy Client



metalheart
14-08-2004, 06:11
Tôi có đoạn code sau:
Dim strPath As String = "c:\dangkybai"
Dim strFile As String = "\dangky.txt\"

If Directory.Exists(strPath) Then
'if file exists
If File.Exists(strPath & strFile) Then
File.Delete(strPath & strFile)
End If
Else
'Create folder
Directory.CreateDirectory(strPath)
End If

'create new file
Dim strmWrite As StreamWriter
strmWrite = File.CreateText(strPath & strFile)

strmWrite.WriteLine(strContent)
strmWrite.Close()


Khi chạy trên một máy client, muốn write ra 1 file hay 1 thư mục thì nó toàn khởi tạo trên máy server. Vậy làm thế nào để nó khởi tạo ngay trên máy client.

KEM_WALL
14-08-2004, 08:46
bạn muốn vậy phải xài client script (js, vb script)
nhưng hầu như bây giờ mọi browser đều ngăn cản việc này

blueinred
14-08-2004, 12:16
Xin hỏi đây là code của Web App ?

KEM_WALL
15-08-2004, 12:59
uhm, walls đang nói về web app