Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing back many fields
Message
 
À
06/06/2002 09:45:34
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00665402
Message ID:
00665511
Vues:
18
>Hi
>
>I have an ASP that will have various fields which the user will fill in, then when submitted, will pass them back to a COM which will create the new record with those values.
>
>Will I have to do something like
>
>
oServerObject.CreateNewUser(param1, param2, param3 ,etc.....)
>
>and pass each field value, or is there a better way to achieve this?
>
>Thanks
>Kev

You could pass the ASP request object and pull the posted form values from VFP. The VFP COM wrapper I use has a method call that creates VFP memory variables for posted form object values.
*Assumes reference to Request object available as oRequest.
*Create VFP variables for posted object values (Form Post)
*Uses form object names posted with "FORM_" prefix
For each fobj in oRequest.form
   fobjval=oRequest.form(fobj).item
   lcreatevar="form_"+fobj
   Public (lcreatevar)
   &lcreatevar = alltrim(fobjval)
Endfor

*Create VFP variables for querystring parameter values (FORM GET)
*Uses form querystring parameter names with "FORM_" prefix
For each fobj in oRequest.querystring
   fobjval=oRequest.querystring(fobj).item
   lcreatevar="form_"+fobj
   Public (lcreatevar)
   &lcreatevar = fobjval
Endfor
Michael McLain
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform