submitting data from page to page

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • cliff

    submitting data from page to page

    I am in the process of developing an application and would like to hide the
    query strings in the URLs. I want to POST data to a page then validate the
    data. If there is an error I have to send data back via a long query string.
    Is there anyway to POST data between pages programmaticall y?


  • Ray at

    #2
    Re: submitting data from page to page

    I'm not sure how your question relates to what you're trying to do. One
    method is to post to the same page, like so:


    <%
    If Request.ServerV ariables("REQUE ST_METHOD") = "POST" Then
    If Request.Form("s omething") <> "abc" Then
    Response.Write "You must enter &quot;abc&qu ot; in the textbox."
    Else
    Response.Redire ct "thanks.htm "
    End If
    End If
    %>

    <form method="post" action="thispag e.asp">
    <input name="something " type="text" value="<%=Reque st.Form("someth ing")%>">
    <input type="submit">
    </form>

    Ray at home


    "cliff" <no@nospamn.com > wrote in message
    news:OQrdLIbFEH A.3252@TK2MSFTN GP11.phx.gbl...[color=blue]
    > I am in the process of developing an application and would like to hide[/color]
    the[color=blue]
    > query strings in the URLs. I want to POST data to a page then validate the
    > data. If there is an error I have to send data back via a long query[/color]
    string.[color=blue]
    > Is there anyway to POST data between pages programmaticall y?[/color]



    Comment

    • cliff

      #3
      Re: submitting data from page to page

      I am trying to send data from page to page without using GET. I want to hide
      all data from my users.

      "Ray at <%=sLocation% > [MVP]" <myfirstname at lane34 dot com> wrote in
      message news:e#qhAxiFEH A.2976@TK2MSFTN GP10.phx.gbl...[color=blue]
      > I'm not sure how your question relates to what you're trying to do. One
      > method is to post to the same page, like so:
      >
      >
      > <%
      > If Request.ServerV ariables("REQUE ST_METHOD") = "POST" Then
      > If Request.Form("s omething") <> "abc" Then
      > Response.Write "You must enter &quot;abc&qu ot; in the textbox."
      > Else
      > Response.Redire ct "thanks.htm "
      > End If
      > End If
      > %>
      >
      > <form method="post" action="thispag e.asp">
      > <input name="something " type="text"[/color]
      value="<%=Reque st.Form("someth ing")%>">[color=blue]
      > <input type="submit">
      > </form>
      >
      > Ray at home
      >
      >
      > "cliff" <no@nospamn.com > wrote in message
      > news:OQrdLIbFEH A.3252@TK2MSFTN GP11.phx.gbl...[color=green]
      > > I am in the process of developing an application and would like to hide[/color]
      > the[color=green]
      > > query strings in the URLs. I want to POST data to a page then validate[/color][/color]
      the[color=blue][color=green]
      > > data. If there is an error I have to send data back via a long query[/color]
      > string.[color=green]
      > > Is there anyway to POST data between pages programmaticall y?[/color]
      >
      >
      >[/color]


      Comment

      • Roland Hall

        #4
        Re: submitting data from page to page

        "cliff" wrote in message news:eitXae1FEH A.3912@TK2MSFTN GP10.phx.gbl...
        : I am trying to send data from page to page without using GET. I want to
        hide
        : all data from my users.

        Cliff...

        Ray provided an example that would POST to the same page. If you want to
        POST to a different page, set the action to a different page on your form
        and use Request.Form("s omeformfield") to grab data from the header. This
        will not show on the URL as it does when you use GET.

        You should consider a design change for validating data. It is better to
        validate on the client-side for valid input rather than making a trip to the
        server. That is off topic for this group but the consideration would be to
        use javascript if it is inTERnet available. If it is inTRAnet available and
        all clients are IE, you could also consider using VBScript.

        If you need help with validation routines, please post in the appropriate
        groups and someone will help you.
        m.p.scripting.j script
        m.p.scripting.v bscript

        HTH...

        --
        Roland Hall
        /* This information is distributed in the hope that it will be useful, but
        without any warranty; without even the implied warranty of merchantability
        or fitness for a particular purpose. */
        Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
        WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
        MSDN Library - http://msdn.microsoft.com/library/default.asp


        Comment

        • cliff

          #5
          Re: submitting data from page to page

          Thanks for the suggestions. I prefer to validate on the server side as
          someone can disable javascript controls on their browser.

          "Roland Hall" <nobody@nowhere > wrote in message
          news:ONOUyS3FEH A.2512@TK2MSFTN GP10.phx.gbl...[color=blue]
          > "cliff" wrote in message news:eitXae1FEH A.3912@TK2MSFTN GP10.phx.gbl...
          > : I am trying to send data from page to page without using GET. I want to
          > hide
          > : all data from my users.
          >
          > Cliff...
          >
          > Ray provided an example that would POST to the same page. If you want to
          > POST to a different page, set the action to a different page on your form
          > and use Request.Form("s omeformfield") to grab data from the header. This
          > will not show on the URL as it does when you use GET.
          >
          > You should consider a design change for validating data. It is better to
          > validate on the client-side for valid input rather than making a trip to[/color]
          the[color=blue]
          > server. That is off topic for this group but the consideration would be[/color]
          to[color=blue]
          > use javascript if it is inTERnet available. If it is inTRAnet available[/color]
          and[color=blue]
          > all clients are IE, you could also consider using VBScript.
          >
          > If you need help with validation routines, please post in the appropriate
          > groups and someone will help you.
          > m.p.scripting.j script
          > m.p.scripting.v bscript
          >
          > HTH...
          >
          > --
          > Roland Hall
          > /* This information is distributed in the hope that it will be useful, but
          > without any warranty; without even the implied warranty of merchantability
          > or fitness for a particular purpose. */
          > Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
          > WSH 5.6 Documentation -[/color]
          http://msdn.microsoft.com/downloads/list/webdev.asp[color=blue]
          > MSDN Library - http://msdn.microsoft.com/library/default.asp
          >
          >[/color]


          Comment

          • Roland Hall

            #6
            Re: submitting data from page to page

            "cliff" wrote in message news:u%23LIrPDG EHA.2768@tk2msf tngp13.phx.gbl. ..
            : Thanks for the suggestions. I prefer to validate on the server side as
            : someone can disable javascript controls on their browser.

            You really didn't answer my questions but since you want to connect to the
            server each time, then posting to the same page as Ray provided is your best
            solution. This eliminates the need to go back to your submit (form page)
            because you're always on the same page. One the user is successful, then
            you redirect to another page.

            --
            Roland Hall
            /* This information is distributed in the hope that it will be useful, but
            without any warranty; without even the implied warranty of merchantability
            or fitness for a particular purpose. */
            Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
            WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
            MSDN Library - http://msdn.microsoft.com/library/default.asp



            Comment

            Working...