ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 28th, 2004, 03:27 PM
Mave Mave is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 3 Mave User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Arrow Loading .txt in ASP

Hi,

I have a an ASP page on which i wish to load dynamic text by way of a dot text file.

It would be great if something like.-

<txt scr = "MyTextFile.txt">

existed but life aint that simple, or is it? Any pointers would be much appreciated. Thanks in advance, Mave

Reply With Quote
  #2  
Old July 28th, 2004, 04:15 PM
jstrohofer jstrohofer is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: Cincinnati, OH USA
Posts: 111 jstrohofer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 m 3 sec
Reputation Power: 6
You'll probably want to use the FileSystemObject (FSO) to read from the text file, and output what is read in. Take a look into that.

Reply With Quote
  #3  
Old July 28th, 2004, 04:45 PM
Webfoot Webfoot is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 21 Webfoot User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 m 9 sec
Reputation Power: 0
Is this what you mean?

You can perform a server side include of your text file with this syntax

<!--#include file="includes/fileName.txt" -->

The file can contain HTML for formatting if you wish.

If you have a choice (you arent using asp to view server error logs or something), rather than using a txt file on the server you should put the info in a db.

Just my .02

Jeff
http://www.webfootss.com

Reply With Quote
  #4  
Old July 28th, 2004, 07:17 PM
mydasx mydasx is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Location: Honolulu
Posts: 142 mydasx User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Oh and btw

The last post is correct use the include file, but don't forget to set your permmisions for that file!

Mydasx

Reply With Quote
  #5  
Old July 30th, 2004, 07:04 AM
Mave Mave is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 3 Mave User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Red face

I'll give both mehtods a try.

1. Does the #include function actually display text to the screen automatically or should I put some other tags round it, or tags in the .txt document? And how do I alter the permissions?

2. A large DB field with the text in sounds like a quick simple fix, are there any problems with doing it this way?

Thanks for your help!

Reply With Quote
  #6  
Old July 30th, 2004, 09:16 AM
six six is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 16 six User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 m 3 sec
Reputation Power: 0
if you don't already know sql, then the simplest thing to do is use the include,
and no you don't need any other tags,
unless you want to format whatever text is in the txt file..
the put the tags right into the txt file.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > Loading .txt in ASP


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump



 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT