Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Multiple pages pulling form a single text file

Reply
Thread Tools

Multiple pages pulling form a single text file

 
 
Matthew Kitchin \(Usenet/Lists\)
Guest
Posts: n/a
 
      07-09-2007
Hello,
I've got multiple pages on the same server that all have the same drop down
boxes in them. It is a list of all our facilities. Every time there is a
change, I have to change it on every page. They are in the format below. Is
there an easy way to store all that data in a text file so I only have to
update it one place?

<option value="fac 1">fac 1</option>
<option value="fac 2">fac 2</option>
<option value="fac 3">fac 3</option>

Thanks,
Matthew

 
Reply With Quote
 
 
 
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      07-09-2007
Matthew Kitchin (Usenet/Lists) wrote:
> Hello,
> I've got multiple pages on the same server that all have the same
> drop down boxes in them. It is a list of all our facilities. Every
> time there is a change, I have to change it on every page. They are
> in the format below. Is there an easy way to store all that data in a
> text file so I only have to update it one place?
>
> <option value="fac 1">fac 1</option>
> <option value="fac 2">fac 2</option>
> <option value="fac 3">fac 3</option>
>
> Thanks,
> Matthew

Sure! Use a #include file.

Facilities.asp:
<%
<option value="fac 1">fac 1</option>
<option value="fac 2">fac 2</option>
<option value="fac 3">fac 3</option>
%>


PageWithDropdown.asp:

<select>
<!--#include file="Facilities.asp" -->
</select>

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


 
Reply With Quote
 
 
 
 
Adrienne Boswell
Guest
Posts: n/a
 
      07-11-2007
Gazing into my crystal ball I observed "Matthew Kitchin
\(Usenet/Lists\)" <> writing in
news:52E165D9-9B7B-4A1A-9403-:

> Hello,
> I've got multiple pages on the same server that all have the same drop
> down boxes in them. It is a list of all our facilities. Every time
> there is a change, I have to change it on every page. They are in the
> format below. Is there an easy way to store all that data in a text
> file so I only have to update it one place?
>
><option value="fac 1">fac 1</option>
><option value="fac 2">fac 2</option>
><option value="fac 3">fac 3</option>
>
> Thanks,
> Matthew
>
>


Put the information in an include file, then include it, eg:

<select name="whatever" id="whatever">
<!--#include file="selectoptions_inc.asp"-->
</select>

--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

 
Reply With Quote
 
 
 
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
resolve single line with multiple items into mutliple lines, single items ela Perl Misc 12 04-06-2009 06:47 PM
Pulling text from a txt file to a c string. foenotes@googlemail.com C++ 2 01-11-2007 03:16 PM
Pulling out lines of text from a text file poopdeville@gmail.com Perl Misc 17 03-10-2006 06:02 PM
Pulling a small text file into HTML? Easy? Bah! Steve HTML 12 11-18-2005 07:56 PM
Text files read multiple files into single file, and then recreate the multiple files googlinggoogler@hotmail.com Python 4 02-13-2005 05:44 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57