T
TJS
can anyone help me get this working for asp.net server control using vb ?
doesn't compile, error on "disk.Properties" and "response.write"
==============command line================
vbc /t:library /out:volume.dll /r:System.web.dll /r:System.dll
/r:System.Management.dll /r:System.Web.dll *.vb
pause
================code=================
Imports System
Imports System.Management
Imports System.web
Class Disk
Public Shared Sub Main()
Dim drive As String = "C"
Dim disk As ManagementObject = New ManagementObject("Win32_Logicaldisk="
+ "\"" + drive + ":\"")
Dim VolumeName As String =
disk.Properties("Volumename").Value.ToString()
Dim SerialNumber As String =
disk.Properties("Volumeserialnumber").Value.ToString()
Response.write("{0} - {1}", VolumeName, SerialNumber)
End Sub
End Class
doesn't compile, error on "disk.Properties" and "response.write"
==============command line================
vbc /t:library /out:volume.dll /r:System.web.dll /r:System.dll
/r:System.Management.dll /r:System.Web.dll *.vb
pause
================code=================
Imports System
Imports System.Management
Imports System.web
Class Disk
Public Shared Sub Main()
Dim drive As String = "C"
Dim disk As ManagementObject = New ManagementObject("Win32_Logicaldisk="
+ "\"" + drive + ":\"")
Dim VolumeName As String =
disk.Properties("Volumename").Value.ToString()
Dim SerialNumber As String =
disk.Properties("Volumeserialnumber").Value.ToString()
Response.write("{0} - {1}", VolumeName, SerialNumber)
End Sub
End Class