ASP Web Get/Post

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • greenace
    Forum Member
    • May 2003
    • 20

    ASP Web Get/Post

    There is vry little information on using the Web Post/Get with ASP. Other users have asked, but I haven't found any good examples that I can make work.

    I love SUF, but I need to authorize installations. Perhaps a sample PHP script, and I can muddle my way through that. Prefer ASP - Already know that pretty well.
  • Corey
    Indigo Rose Staff Alumni
    • Aug 2002
    • 9745

    #2
    Re: ASP Web Get/Post

    Indigo Rose uses PHP for 100% of our web stuff so as a result we are simply not fluent in ASP. Although we get an occasional ASP request, the overwhelming majority of our users appear to be using PHP also it's just a logical way for us to operate.

    We apologize to any ASP users who need code examples and can't find them.Maybe we'll be able to address this at some future time but for the moment it's a PHP only environment.

    That being said maybe we can still help, what exact problem(s) are you having trying to make this work? Please describe exactly what you have done so far to get this actionh working, and the results you received in the process...

    Corey Milner
    Creative Director, Indigo Rose Software

    Comment

    • greenace
      Forum Member
      • May 2003
      • 20

      #3
      Re: ASP Web Get/Post

      On 11/15/02 you replied to another user
      "It doesn't matter what type of form you are submitting to, variables are all passed the same way, i.e. JSP, PHP, ASP. If Cold Fusion has some special syntax you'll need to create some sort of form to translate it, i.e. I use PHP to translate AMS data for MySQL. "

      Perhaps that has now changed.

      All I want to do is a simple install verification. I want to submit a couple of fields to the web page, validate the information against an MS Access Database, and provide a return authorization code, and expiration date. I would imagine this is quit common, and quite simple to do.

      The ASP limitation is that the "<%" and "%>" characters are ASP directives - that is they are used in ASP to indicate a switch between ASP and HTML code. Another user 'kaylward' submitted what appeared to be a solution on 11-30-2002, but I havn't been able to get that to work.

      Here is what happens - I do the web submit, it appears to communicate, but to verify if it is getting information back, I added the following to a subsequent screen.

      From Web: %tusername%, %authorized%
      Lasterror %LastErrorNum% - %LastErrorDetails% - %LastErrorMsg%

      When this displays, it looks like:

      From Web: %tusername%, %authorized%
      Lasterror 0 - -

      It looks to me like I am not getting an error, but I simply am not getting the variables %tusername% and %authorized%.

      I feel quite certain it's the syntax of my return page because of the difficulty with the "<%" and "%>".

      Any thoughts - I can help you with a basic ASP page so you can try it out if that would help.

      Comment

      • Corey
        Indigo Rose Staff Alumni
        • Aug 2002
        • 9745

        #4
        Re: ASP Web Get/Post

        No nothing's changed. Everything is exactly like I said, but as I said we are unable to offer any ASP assistance simply because we are not fluent in it.

        The program can easily handle any scripting lanuguage perfectly but I promise you that no software support team on earth provides support for PHP *and* ASP *and* JSP *and* Cold Fusion usage. That scenario simply does not exist, although if I knew ASP I would help.

        So when you say you can supply me with an ASP page I'm not sure if you even read my first post. I don't do any ASP ergo we don't have it installed nor are we in the process of installing it. And accordingly I have no insights into ASP usage to offer at all. Sorry...

        As you can see by the amount of users who have jumped in on this thread to help, no one seems to be using ASP. That's why I don't, not to mention that PHP is 39% faster than ASP in benchmark tests. If 95% of our users used ASP I would learn it, but asit happens about 95% of our users seem to be using PHP.

        Surely you can understand my position.

        Corey Milner
        Creative Director, Indigo Rose Software

        Comment

        • Brett
          Indigo Rose Staff Member
          • Jan 2000
          • 2001

          #5
          Re: ASP Web Get/Post

          Is there a way to escape the "<%" and "%>" characters in ASP? Try poking around the Web a bit to find that out. In every programming language there is usually a way to escape special characters.

          It is not that we do not want to support ASP or anything else out there, it is just that we don't have the resources to become proficient in all of the development tools and technologies out there. Like Corey says, we are mainly a PHP shop so that is the advice we give. However, there is all sorts of good information out there about ASP, JSP, etc.

          Comment

          • greenace
            Forum Member
            • May 2003
            • 20

            #6
            Re: ASP Web Get/Post

            I have found no way to get away from the "<%" and "%>" characters in ASP. However, I have managed a solution. Evidently, building a series of small strings - then concatenating them together produces the desired output.

            The following ASP code works with SUF.

            <%
            p1 = "<SUF60>"+"%OKtoinstall%,%ReturnText%,%expdate%,%W ebKey%</SUF60>"
            p2 = "<"+"%OKtoinstall%"+">" &amp; oktoinstall &amp; "</%OKtoinstall%"+">"
            p3 = "<"+"%ReturnText%"+">" &amp; returntext &amp; "</%ReturnText%"+">"
            p4 = "<"+"%expdate%"+">" &amp; edate &amp; "</%expdate%"+">"
            p5 = "<"+"%WebKey%"+">" &amp; InstallKey &amp; "</%WebKey%"+">"

            response.write p1
            response.write p2
            response.write p3
            response.write p4
            response.write p5
            %>

            Show this to any ASP Developer, and they can run with it.

            As you can see, the code simply takes the string variable "<" and concatenates another string with the "%" to it. This fools ASP into producing the desired output of "<%" The same thing is done to produce the ">%" - put that together with the rest of the needed output, and the problem is solved.

            SUF is once again - the favorite part of my development cycle.

            Comment

            • Corey
              Indigo Rose Staff Alumni
              • Aug 2002
              • 9745

              #7
              Re: ASP Web Get/Post

              I think you'd have found Brett's approach better, there is always a way to escape characters in any scripting language, i.e. a backslash (Which I believe applies to ASP also) but hey as long as you're happy, all's well...

              Corey Milner
              Creative Director, Indigo Rose Software

              Comment

              • kaylward
                Forum Member
                • Nov 2002
                • 33

                #8
                Re: ASP Web Get/Post

                This is an issue that I have noted before. I didn't have any luck encoding the <% or %>, but if it can be done with the code shown, all the better. Next time the question comes up you'll have two threads to point to...


                Comment

                • Corey
                  Indigo Rose Staff Alumni
                  • Aug 2002
                  • 9745

                  #9
                  Re: ASP Web Get/Post

                  Did you try using a backslash escape character?

                  Corey Milner
                  Creative Director, Indigo Rose Software

                  Comment

                  • arthurb
                    Forum Member
                    • Jul 2000
                    • 8

                    #10
                    Re: ASP Web Get/Post

                    FYI, see http://www.aspfaq.com/show.asp?id=2100

                    Comment

                    Working...
                    X