Reusable Function with redirect

Results 1 to 2 of 2

Thread: Reusable Function with redirect

  1. #1
    Join Date
    Dec 1969

    Default Reusable Function with redirect

    Hi, I wrote a function (actually a sub, well, actually just an .asp page) that updates a record in a database and I want to be able to call this function through a link rather than using an include or a &#060;Form&#062;. What I did was just write an .asp page that performed the update, then redirects to the referrer. I allow the client to &#039;call&#039; it by simply adding a link to this page labeled &#039;Update&#039;.<BR><BR>Now, my problem is that in the referring page, I need some way to determin if the function call was made, so I was checking to see if the referrer was my function. Make sense? Ok, except Request.ServerVariables("HTTP_REFERER") doesn&#039;t work when using Response.Redirect() from the function.<BR><BR>Is there an easy solution, or am I going about this all wrong. Thank you.<BR><BR>-George

  2. #2
    Join Date
    Dec 1969

    Default RE: Reusable Function with redirect

    When you redirect, do something like<BR><BR>Response.redirect "Originalpage.asp?update=yes"<BR><BR>then on your original page...<BR>If Request.Querystring("update") = "yes" Then<BR> &#039;updated<BR>Else<BR> &#039;not so updated<BR>End If

Posting Permissions

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