PDA

Click to See Complete Forum and Search --> : Some Active Server Page Questions


omarswan
Jul 9th, 2001, 08:14 AM
Hi guys,
I'm work on a web site uses active server pages and I would like to perform the following:

Using the FileSystemObject I would like to create a function that will list all the folders (not files) in a given path.

Also

On the website there is a section where the user writes som stuff about themselves, kind of like a profile section where the write a couple paragraphs describing what it is that they do. any way that data is written to a text field in a SQL Server Database. How can I get the profile be displayed in the same format in which they entered it in the forms TEXTAREA box. I'm looking to get the same exact result that is used when you post a question on this website. I hope you guys understand what I'm trying to say.

Any help or suggestion would be greatly appreciated

Thanks for our time. :)

John Yingling
Jul 9th, 2001, 10:19 AM
Set objFS = Server.CreateObject("scripting.FileSystemObject")
Set objFldrs = fs,GetFolder(folderspec).Subfolders
For each objfldr in objfldrs

MarkusJ_NZ
Jul 10th, 2001, 08:16 AM
"How can I get the profile be displayed in the same format in which they entered it in the forms TEXTAREA box"
---

If you mean with line breaks included replace instances of vbCrLf with <br> when you request the value of the text area.

eg:

Dim strTextArea

strTextArea = Replace(Request.Form("TextArea"),vbCrlf,"<br>")

This will save the the instances of line breaks

Hope this helps
Regards
Mark