Can't redirect or Submit after BinaryRead

Results 1 to 2 of 2

Thread: Can't redirect or Submit after BinaryRead

  1. #1
    Join Date
    Dec 1969

    Default Can't redirect or Submit after BinaryRead

    Could anyone help me with my problem. Here is the scenario. I am long-winded, your patience is most appreciated.<BR><BR>I have three pages. User select a file to upload on the first page. The second page uploads the file and then redirect to the third page which does some other processing. There is no user intervention after using hitting the submit button on the first page. User will be notified of process completion at the end of the process.<BR><BR>The first page has a form and a file type input<BR>&#060;form method="post" ENCTYPE="multipart/form-data" name="SendFile1"&#062;<BR>&#060;input type="file" name="txtFileName" size="40"&#062;<BR><BR>I submit this form to the second page using POST method and calling this javascript function<BR><BR>function submitForm(frm)<BR>{<BR> var fn = frm.txtFileName.value;<BR> frm.action = "Palmup.asp?filename=" + fn;<BR> frm.submit();<BR>}<BR><BR>The second page (Palmup.asp) calls a third-party component object to perform file upload.<BR><BR>If UCase(Request.ServerVariables("HTTP_METHOD")) = "POST" Then<BR> Set fu = Server.CreateObject("AspUtil.FileUpload")<BR> = Server.MapPath("..DataPalm")<BR> rc = fu.Upload<BR>.<BR>.<BR>.<BR>End If<BR><BR>I know the second page is doing a BinaryRead becasue I first used Request.Form to retrieve the filename passed from the first page but ASP gave me a BinaryRead error and I must use Request.QueryString to retrieve the file name.<BR><BR>The file upload works but the problem is in redirecting to the third page. If I put a Response.Redirect after End If, or use html and put &#039;window.location.href=blah&#039; in &#060;body&#062; onLoad event, I got the infamous Page Not Found error. If I create an html form and a hidden input, then use form.submit() to post the form to the third page, the challenge/response authentication dialog opens, ie, the dialog box asking for user name, password, domain for authentication.<BR><BR>I plead for help on any advice or workaround which could pass the user input to the third page.<BR><BR>Thanks.

  2. #2
    Join Date
    Dec 1969

    Default RE: Can't redirect or Submit after BinaryRead

    the component will have it&#039;s own .form collection which you should use. please read the docs for the component.<BR><BR>j

Posting Permissions

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