Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Macro substitution with ASP?
Message
De
07/09/2006 16:52:33
 
 
À
07/09/2006 12:36:41
Information générale
Forum:
Visual FoxPro
Catégorie:
COMCodebook
Divers
Thread ID:
01151943
Message ID:
01152094
Vues:
29
>I know this is a little off topic but can someone tell me if there is an equivalent to VFP macro substitution in HTML/ASP? Suppose I have a VFP COM server that creates and returns an object containing data. Such as:
>
>oData.P1 = 10
>oData.P2 = 24
>oData.P3 = 76
>etc.
>
>In the ASP page I want to write a loop that accesses this data, such as:
>
>for i = 1 to n
>  dataprop = "oData.P" + transform(i)
>  myvar = &dataprop
>  do something with myvar . . .
>next
>
>This would be easy in VFP but how would you do it in ASP?
>
>Thanks for any insights.
>
>- Don


If you are using VBscript on the server end, then you can use the Eval() function much like the Evaluate() function in FoxPro.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/a4ede5a0-5d7a-4a3e-adea-dad5105d0a2f.asp
Greg Reichert
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform