passing variable from asp.net to asp

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • CroCrew
    Recognized Expert Contributor
    • Jan 2008
    • 564

    #16
    Sorry just made a change to "payResult. asp" Check that page again if you seen it before I made the edits.

    Comment

    • ryna
      New Member
      • Oct 2009
      • 12

      #17
      hi CroCrew,

      it show page not found (404)...

      Comment

      • CroCrew
        Recognized Expert Contributor
        • Jan 2008
        • 564

        #18
        Is "payResult. asp" in the same folder that "icePayment.asp x" is in? Are you getting a 404 when going to "payResult.asp" ? Post the error that your getting.

        Comment

        • Frinavale
          Recognized Expert Expert
          • Oct 2006
          • 9749

          #19
          Ryna, a 404 error means that it can't find the page that you're redirecting to.

          You should check to make sure that the URLs are correct.

          Try using the .NET debugger (that comes with VisualStudio) to step through your code and make sure that the URLs are pointing to the right place. If you don't want to use the debugger for some reason you could try hard coding the URL of the payResult.asp page:


          Code:
          'What are you doing here?????
          If (Left(Request.Form("return_url"), 7) <> "http://") Then
            errorInput = errorInput & "Invalid return URL path! <BR>"
            errorExist = True
            Response.Redirect("inputerror.aspx")
          'The following line will not be executed..................
          'Anything that comes after a Response.Redirect is not executed
            Response.Redirect("InvalidUrlError.aspx")
          Else  
            Session("res") = response_code
            Session("text") = response_text
          'Instead of this please try hard coding the return url 
          '  Response.Redirect((Request.Form("return_url")))
          'Try this instead 
          '(Make sure that the URL is correctly pointing to the payResult.asp page):
            Response.Redirect("http://localhost/websiteDirectory/payResult.asp?res=" & response_code,True)
          End If

          Comment

          • ryna
            New Member
            • Oct 2009
            • 12

            #20
            hi croCrew...
            my fault.The codes that you want me to test it works but

            Response.Redire ct(Request.Form ("return_url ") & "?res=" & response_code & "&text=" & response_text)
            the one in bold there's curly line below...
            it says variable"respon se_text" is used before it has been assigned a value.A null reference exception could result in at runtime.

            it almost working..

            Comment

            • ryna
              New Member
              • Oct 2009
              • 12

              #21
              when I enter the wrong credit card it did not show the error message
              which is : response_text = "Invalid Credit Card No"

              however when it is successful(ente r correct information) it print out this line:
              Response.Write( "Thank You for buying GOODS from our online Store!")

              Comment

              • CroCrew
                Recognized Expert Contributor
                • Jan 2008
                • 564

                #22
                Hello ryna,

                So, is this resolved? You have your answer?

                CroCrew~

                Comment

                • ryna
                  New Member
                  • Oct 2009
                  • 12

                  #23
                  im afraid not yet croCrew..
                  still stuck oon receiving the response_text.. .

                  Comment

                  • regan2007
                    New Member
                    • Oct 2009
                    • 12

                    #24
                    Sir I need help in understanding this code..Any help will be appreciated :

                    Dim conn As New SqlConnection(" data source=IFCDU2-WS23\SQLEXPRESS ;initial catalog=icebank ;integrated security=true")

                    Comment

                    Working...