If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > using variable in Include

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-30-04, 19:40
marconi8 marconi8 is offline
Registered User
 
Join Date: May 2003
Posts: 50
using variable in Include

why in asp i cant include file using filename in variable

dim file_to_include
file_to_include="test.asp"
for example include file_to_include


it is not possible ???

thanks for help
Reply With Quote
  #2 (permalink)  
Old 08-01-04, 02:12
Seppuku Seppuku is offline
Useless...
 
Join Date: Jul 2003
Location: SoCal
Posts: 721
ASP makes a single pass through your code. To do so, it must first include all of the files that build your page. Once compiled, it then executes all the code sequentially, and sends the results to the browser. The only way "around" it is to wrap all of the possible combinations of include files in IF statements.. kinda ugly...
__________________
That which does not kill me postpones the inevitable.
Reply With Quote
  #3 (permalink)  
Old 08-01-04, 05:19
marconi8 marconi8 is offline
Registered User
 
Join Date: May 2003
Posts: 50
Unhappy how it can be ?????

on my web page people can add languages to page dynamically,

for example my www page works with two languages, russian and english
web page administrator can add new language to www page database for example Latvia

then clients on web page can choose between three languages,
and when they chooos latvian (new lang) i must to add if statement to the code ??????

it is not good !!!

somebody knows any normal solution for taht problem, if statement it is not normal for programing !!!

yeh
Reply With Quote
  #4 (permalink)  
Old 08-01-04, 14:42
Seppuku Seppuku is offline
Useless...
 
Join Date: Jul 2003
Location: SoCal
Posts: 721
One method to accomplish this would be through the database.

Your language types could be stored in the database, then all of the multi-lingual content would also be stored in the DB with a key to the language type.
__________________
That which does not kill me postpones the inevitable.
Reply With Quote
  #5 (permalink)  
Old 08-02-04, 12:06
marconi8 marconi8 is offline
Registered User
 
Join Date: May 2003
Posts: 50
...

on my www page i have 2 types of translates.

one types of translates are www page translates...

for example
============================================
include translate_eng.asp

<%response.write(text_1)%><input type='text' name='input_1'></br>
<%response.write(text_2)%><input type='text' name='input_2'>
============================================


translate_eng.asp FILE contents is
============================================
text_1="enter your name:"
text_2="enter your last name:"
============================================

translate_rus.asp FILE contents is
============================================
text_1="bla bla bla "
text_2="bla bla bla "
============================================
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

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