INclusione randomizzata in ASP

A

alessandro

Salve volevo sottoporvi un problema
ho un index in http://www.palermoclub.com che utilizza diverse inclusioni
testa.asp per la testata
centro.asp per il centropagina
sotto.asp per il piè dipagina

per dare un pò di vivacità al mio sito volevo creare una visualizzazione
random dell'inclusione centro.asp
Ho realizzato diversi centro: centro.asp, centro1.asp, centro2.asp ecc.ecc.
Come fare per randomizzare l'inclusione centro.asp
Esiste la possibilità?
Vi sarei molto grato
Saluti
 
T

TomB

Non potete includere dinamicamente, poichè sono proceduti prima dell'asp.
Ci è molto "inganna" per convincerlo per funzionare comunque.

Potreste usare i sottoprogrammi o le funzioni alle pagine incluse, quindi
denominate quelli dalle vostre dichiarazione condizionali... if/then

spiacenti per italiano difettoso... Ho usato il google.
 
E

Evertjan.

Randy Rahbar wrote on 04 feb 2004 in
microsoft.public.inetserver.asp.general:
And, that was funny. :)

I am glad you are amused,
not all people share our amount of "hahaness".

=================

btw, what would the questioner have felt if
he had asked a perfectly on topic ASP question
in English and that was answered by:

Italian?
 
E

Evertjan.

alessandro wrote on 04 feb 2004 in
microsoft.public.inetserver.asp.general:
Salve volevo sottoporvi un problema
ho un index in http://www.palermoclub.com che utilizza
diverse inclusioni testa.asp per la testata
centro.asp per il centropagina
sotto.asp per il piŠ dipagina

per dare un p• di vivacit… al mio sito volevo creare una
visualizzazione random dell'inclusione centro.asp
Ho realizzato diversi centro: centro.asp, centro1.asp,
centro2.asp
ecc.ecc. Come fare per randomizzare l'inclusione centro.asp
Esiste la possibilit…?
Vi sarei molto grato
Saluti

Mi scusi di non comprendere e respondare in Italiano.

If we are talking frames:

<%
Randomize
r = Int(3 * Rnd)
if r=0 then
randomname = "centro.asp"
elseif r=1 then
randomname = "centro1.asp"
else
randomname = "centro2.asp"
end if
%>

<frameset rows="100,500,*">
<frame src="testa.asp">
<frame src="<%=randomname%>">
<frame src="sotto.asp">
<noframes>
<body>
</body>
</noframes>
</frameset>

not tested
 
R

Ray at

Si

Don Costanzo at work

TomB said:
Non potete includere dinamicamente, poichè sono proceduti prima dell'asp.
Ci è molto "inganna" per convincerlo per funzionare comunque.

Potreste usare i sottoprogrammi o le funzioni alle pagine incluse, quindi
denominate quelli dalle vostre dichiarazione condizionali... if/then

spiacenti per italiano difettoso... Ho usato il google.
 
A

alessandro

thanks

Evertjan. said:
alessandro wrote on 04 feb 2004 in
microsoft.public.inetserver.asp.general:


Mi scusi di non comprendere e respondare in Italiano.

If we are talking frames:

<%
Randomize
r = Int(3 * Rnd)
if r=0 then
randomname = "centro.asp"
elseif r=1 then
randomname = "centro1.asp"
else
randomname = "centro2.asp"
end if
%>

<frameset rows="100,500,*">
<frame src="testa.asp">
<frame src="<%=randomname%>">
<frame src="sotto.asp">
<noframes>
<body>
</body>
</noframes>
</frameset>

not tested
 
A

alessandro

Unfortunatly the page testa.asp has also included pages, for example the
menu.asp

I not can use the frame but I would use the included random
The script that you give me is in the page
http://www.palermoclub.com/index2.asp

We are some error.

It's inpossible to use the included page random? Whitouth frames?

Your script is very interesting, but for my problem it not resolving.

Excuse me for my English, but i have study French, and now, I speak only
Italian, and I don't speak italian very well ;-)

Alessandro
 
E

Evertjan.

alessandro wrote on 04 feb 2004 in
microsoft.public.inetserver.asp.general:
Unfortunatly the page testa.asp has also included pages, for example
the menu.asp

That remains possibl;e, also frames within frames are possible.
I not can use the frame but I would use the included random
The script that you give me is in the page
http://www.palermoclub.com/index2.asp

We are some error.

I get this:

Provider error '80040e4d'
Authentication failed.
/file_comuni/apridb.asp, line 5

That is another problem.

It's inpossible to use the included page random? Whitouth frames?

Do you mean this??

<!--#include virtual ="/testa.asp"-->

Yes, that is possible, but all 3? pages will be fetched serverside
Your script is very interesting, but for my problem it not resolving.

Please keep experimenting!

Take away the /file_comuni/apridb.asp temporarily and try again.
 
A

alessandro

in this moment my index page it is:
<!--#include file="file_comuni/testa.asp"-->
<!--#include file="centro1.asp"-->
<!--#include file="file_comuni/sotto.asp"-->

the apridb.asp is included in testa.asp
the menu.asp is included in testa.asp

the menudestra.asp is included in sotto.asp
 
E

Evertjan.

alessandro wrote on 05 feb 2004 in
microsoft.public.inetserver.asp.general:
in this moment my index page it is:
<!--#include file="file_comuni/testa.asp"-->
<!--#include file="centro1.asp"-->
<!--#include file="file_comuni/sotto.asp"-->

the apridb.asp is included in testa.asp
the menu.asp is included in testa.asp

the menudestra.asp is included in sotto.asp

You heve an error in the autentication
/file_comuni/apridb.asp, line 5

====================

If you include a file this way,
the code is just added to the final asp-file.

This can be done:


<!--#include file="testa.asp"-->
<%
Randomize
r = Int(3 * Rnd)
if r=0 then %>
<!--#include file="centro.asp"-->
<% elseif r=1 then %>
<!--#include file="centro1.asp"-->
<% else %>
<!--#include file="centro2.asp"-->
<% end if %>
<!--#include file="sotto.asp"-->

but it is very inefficient, because 3 files are included !!
[and if you have 50 possible "centro"-files,
it becomes terrible inefficient]
 

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

Forum statistics

Threads
474,145
Messages
2,570,824
Members
47,371
Latest member
Brkaa

Latest Threads

Top