Multiple pages pulling form a single text file

  • Thread starter Matthew Kitchin \(Usenet/Lists\)
  • Start date
M

Matthew Kitchin \(Usenet/Lists\)

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
 
B

Bob Barrows [MVP]

Matthew said:
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>
 
A

Adrienne Boswell

Gazing into my crystal ball I observed "Matthew Kitchin
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>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top