bhchng
asked on
[Help Needed] From ASP to ASP.NET(C#)
Dear all,
Need your expertise here. I am converting a ASP code to ASP.NET(C#). I am wondering if anybody have any idea on how to convert the following ASP code ? I am trying to list the folders inside a virtual directory. Thanks a lot in advance.
ASP Code:
Set objFSO = Server.CreateObject("Scrip ting.FileS ystemObjec t")
Set objFolder = objFSO.GetFolder(Server.Ma ppath("../ .."))
strTopFolder = objFolder.Path & "\"
Need your expertise here. I am converting a ASP code to ASP.NET(C#). I am wondering if anybody have any idea on how to convert the following ASP code ? I am trying to list the folders inside a virtual directory. Thanks a lot in advance.
ASP Code:
Set objFSO = Server.CreateObject("Scrip
Set objFolder = objFSO.GetFolder(Server.Ma
strTopFolder = objFolder.Path & "\"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
make sure to include "using System.IO" in your cs file.
also just in case you are wondering, the @ before the quotes (i.e. @"\") tells the compiler to ignore the break characters like \ in the string. Otherwise you would get an error compiling.