» Quick Links
You can make money on these forums
We Share profits with you
Google
Google Adsense
Google Adwords
YPN
Yahoo
MSN Search
Web Directories
Web Hosting
Web Hosting Offers
Hosting News
Suggestions
Link Building
Domain Names
PHP Forums
MySQL Forums
» More Links
OSP News
Reseller Hosting
Shared Hosting
Dedicated Servers
Google Adsense
Search Engine Marketing
Link Development
Affiliate Marketing


» Advertising
Multiple DC PR Check

Free SEO Tools


Go Back   Webmaster Forums > Website Developement / Programming > ASP forums and Tips

ASP forums and Tips Talk about ASP Scripting. .net and Cold Fusion as well.

Reply
 
Thread Tools Display Modes
  #1  
Old 07-31-2006, 04:54 PM
nirvana nirvana is offline
OSP Starters
 
Join Date: Jul 2006
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
nirvana is on a distinguished road
Default text file into textfile

Please give your suggestions


I've got a web page that have a <textarea> that I need to populate with
what is in a text file. For now, I just want to Read the text file into the textarea, but I just can't seem to get it to work. Here's what I've got:

Code:
Function getFile(fileThis)
dim Filename

Filename = "someFile.txt"
'format is data1|data2

Const ForReading = 1, ForWriting = 2, ForAppending = 3
Const TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0

' Create a filesystem object
Dim fso
set fso = server.createObject("Scripting.FileSystemObject")

' Map the logical path to the physical system path
Dim Filepath
Filepath = Server.MapPath(Filename)

if fso.FileExists(Filepath) Then
' Get a handle to the file
-- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
Revenue Sharing Ads ( ?):
  #2  
Old 07-31-2006, 04:57 PM
sizzlers sizzlers is offline
OSP Starters
 
Join Date: Apr 2006
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
sizzlers is on a distinguished road
Default

Basde upon the assumption that your getFile function works, all you are doing is assigning the value of "getFile" to "Thisfile" with the help of this code:

<%=getFile(fileThis)%>


Have a gud time
Bye -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Free File Storage Hosts vishnuthegreat Domains For Sale - Fixed Price/Offer 1 03-06-2007 08:31 AM
Convert text file into .MYD fille and .....!! Symah MySQL Forums 1 11-06-2006 04:05 AM
Now google can read text in Flash file? symonds Google 4 08-29-2006 11:23 AM
replacing contents of a text file navy PHP Programming and Tips 1 08-10-2006 01:49 PM
text file.... bono ASP forums and Tips 1 07-30-2006 11:47 AM


All times are GMT. The time now is 02:21 AM.