Multiple pages pulling form a single text file
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
Re: Multiple pages pulling form a single text file
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.
Re: Multiple pages pulling form a single text file
Gazing into my crystal ball I observed "Matthew Kitchin
\(Usenet/Lists\)" <mkitchin.public [at] gmail.com> writing in
news:52E165D9-9B7B-4A1A-9403-7E981DB89767 [at] microsoft.com:
> 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