dynamically initialize variable variablenames :D

Results 1 to 2 of 2

Thread: dynamically initialize variable variablenames :D

  1. #1
    Join Date
    Dec 1969

    Default dynamically initialize variable variablenames :D

    hey guys, &#039;ve been struggeling with this problem for quite a while now, and i hope you guys can help me crack this one!<BR><BR>I am fixing a dynamic mailform from which i dont now the variablenames. so to use them i use request.form and loop the output. so far so good. what i also need is for the variablename to hold his value again, after the post, so when something isnt filled out correctly, the form is filled with the information posted, so people dont need to write everything down again.<BR><BR>that means i need to dynamically define a variable AND hold the value posted...<BR><BR>makes sense???<BR><BR>tnx in advance!<BR><BR>gr. EJ<BR><BR>code:<BR>For Each Item in Request.Form<BR> Item = Request.Form(Item)<BR>Next<BR><BR>translated: senderEmail = "e@c.com"

  2. #2
    Join Date
    Dec 1969

    Default No, it doesn't.

    Ok, it makes sense. But, I remember an epic discussion between Shelby and Bill W a while ago about this. It&#039;s possible using Server.Execute(), but it&#039;s a HUGE performance hit. You REALLY want to avoid this, of possible.<BR><BR>Just out of interest, what&#039;s the problem with doing:<BR>For Each Item in Request.Form<BR> Session(Item) = Request.Form(Item)<BR>Next<BR><BR>Surely that&#039;s going to do something similar. You&#039;ll probably want to do some Session.Remove()&#039;s, or a Session.RemoveAll as soon as you&#039;re sure that the form&#039;s correctly filled in...<BR><BR>Either that, or what&#039;s wrong with writing out a good old "&#060;script&#062;history.back()&#060;/script&#062;"? That&#039;ll keep 90% of it filled in.<BR><BR>Craig.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts