Redirect name/value add?

Results 1 to 7 of 7

Thread: Redirect name/value add?

  1. #1
    bart_bart Guest

    Default Redirect name/value add?

    Is it possible to add name value pairs to the url defined in a redirect statement.<BR> <BR>&#060;% response.redirect "data.asp?test=15,name=bart" %&#062;<BR><BR><BR>I&#039m trying to figure out a way to auto submit data to another asp page after I&#039ve added the information into a datatbase.<BR><BR><BR>I keep getting the &#039can&#039t change http header&#039 error (sorry ad libing the error msg)<BR><BR><BR><BR>Thanks<BR><BR>Bart N

  2. #2
    David Morgan Guest

    Default RE: Redirect name/value add?

    Could it be your syntax:<BR><BR>&#060;% response.redirect "data.asp?test=15,name=bart" %&#062; <BR><BR>should be:<BR><BR>&#060;% response.redirect "data.asp?test=15&name=bart" %&#062; <BR> <BR>No comma, rather ampersand.<BR><BR>I&#039m trying to do the same thing, but forward the results to a CGI processor. Will the CGI understand the items in the querystring instead of the form element?<BR><BR><BR>David<BR><BR><BR>

  3. #3
    bart_bart Guest

    Default RE: Redirect name/value add?

    Sorry about the syntax, just made it fo ra quick demo/example.<BR>The CGI processing could be done i asp using the Request.Querystring("item_x") to pull out the name value pair desired.<BR><BR>The other option I&#039m looking at right now is writing the following script the &#039Response.write&#039 method...have to do some testing to see if it works...<BR><BR>this problem seems like something that should be a commonly<BR>requested item?!<BR><BR><BR>&#060;SCRIPT LANGUAGE="JAVASCRIPT"&#062;<BR>&#039Open Up a new window<BR>Window.Open("PAGE3.ASP?SomeVariable=info rmation");<BR>Window.location="Page1.ASP";<BR>&#06 0;/SCRIPT&#062;<BR><BR>

  4. #4
    David Morgan Guest

    Default RE: Redirect name/value add?

    Geesh, tell me about it. I&#039m even thinking about using Javascript and when the page loads, populate it dynamically from the previous page, and via the onload javascript post it to the next page. <BR><BR>Of course I haven&#039t nailed that down yet either. <BR><BR>I tried the the request.querystring you mentioned in your first post. I didn&#039t get an error, but the value doesn&#039t seem to be passed.<BR><BR>Thanks,<BR>David<BR>

  5. #5
    bart_bart Guest

    Default RE: Redirect name/value add?

    Dave-<BR>I&#039ll keep working on this nice to figure it out.<BR><BR>My post-work email is if you have any questions or need to discuss items in more detail or swap some script for debugging...otherwise I&#039ll check this forum periodically throughtout the day/night (6am-1am)<BR><BR>Thanks for input<BR><BR>Bart N.<BR>

  6. #6
    Rupali Guest

    Default RE: Redirect name/value add?

    Hi,<BR> The header error might be because you haven&#039t added<BR>&#060;%response.buffer=True%&#062; at the top of the asp page(the first line).<BR>Just try it.It might solve your problem.<BR><BR>Bye.

  7. #7
    Espen ( Guest

    Default RE: Redirect name/value add?

    To redirect pairs I think you have to use a syntax like this:<BR><BR>&#060;% Response.Redirect "data.asp?test=15&name=bart" %&#062;<BR><BR>The can&#039t change header msg, is most probably appearing beacuse you try to Response.Redirect after you have written some html. Any code like &#060;html&#062;, &#060;body&#062;, etc. must be entered AFTER you have written a Response.Redirect.

Posting Permissions

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