473,387 Members | 1,553 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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 programmatically?
Jul 19 '05 #1
5 1543
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.ServerVariables("REQUEST_METHOD") = "POST" Then
If Request.Form("something") <> "abc" Then
Response.Write "You must enter &quot;abc&quot; in the textbox."
Else
Response.Redirect "thanks.htm"
End If
End If
%>

<form method="post" action="thispage.asp">
<input name="something" type="text" value="<%=Request.Form("something")%>">
<input type="submit">
</form>

Ray at home
"cliff" <no@nospamn.com> wrote in message
news:OQ**************@TK2MSFTNGP11.phx.gbl...
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 programmatically?


Jul 19 '05 #2
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#**************@TK2MSFTNGP10.phx.gbl...
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.ServerVariables("REQUEST_METHOD") = "POST" Then
If Request.Form("something") <> "abc" Then
Response.Write "You must enter &quot;abc&quot; in the textbox."
Else
Response.Redirect "thanks.htm"
End If
End If
%>

<form method="post" action="thispage.asp">
<input name="something" type="text" value="<%=Request.Form("something")%>"> <input type="submit">
</form>

Ray at home
"cliff" <no@nospamn.com> wrote in message
news:OQ**************@TK2MSFTNGP11.phx.gbl...
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 programmatically?


Jul 19 '05 #3
"cliff" wrote in message news:ei**************@TK2MSFTNGP10.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("someformfield") 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.jscript
m.p.scripting.vbscript

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
Jul 19 '05 #4
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:ON**************@TK2MSFTNGP10.phx.gbl...
"cliff" wrote in message news:ei**************@TK2MSFTNGP10.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("someformfield") 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.jscript
m.p.scripting.vbscript

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

Jul 19 '05 #5
"cliff" wrote in message news:u%****************@tk2msftngp13.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

Jul 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Mats | last post by:
Hi Maybee a little bit of topic, but is it possible to stay on the submitting page once you've clicked submit. This is to get processing done on page B when you submit on page A, and the page...
5
by: Don | last post by:
I have a need to submit a form, but don't need the user to click on a button. How do I do this? Is there some way, using JavaScript, to setup a <form> tag to do this? Thanks, Don ----==...
4
by: Rick | last post by:
Hello, I'm having trouble with submitting my form when checking to see if data is present in the user-inputted fields. What I want to happen is for the user to input various pieces of data,...
0
by: Mike Kingscott | last post by:
Totally hacked off here. I've written a user control that contains a text box, a required field validator and a button (these being the cornerstone of a search facility), all as ASP.Net server...
2
by: Jackal | last post by:
I have a form page(abc.aspx) that contains some fields need to be filled in before submitting, and the action of the form is "def.aspx". After peocessing the filled-in data, it'll return the...
2
by: Syam | last post by:
Hello everyone, I am just barely two months old into learning asp.net and vb.net. Currently I am working on a project to store customer database. I have a question about creating a preview page:...
1
by: cakecam | last post by:
Hi Several years ago I programmed a javascript for login using a pop-up window that required a username and a password. I can not find the code so I will appreciate if somebody out there...
1
by: SachinBhargava | last post by:
Hi, I am faceing the problem while submitting the same page in ASP. When i am submitting the page, I am showing the java script alert message before closing the pop up window. My problem is, when...
1
by: asp beginner | last post by:
I am building an Eccomerce site and I am trying to make my shopping cart work. I am having a problem with when I have entered data into my form it is not submitting into my access database. This my...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.