473,734 Members | 2,349 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

call post w/ classic asp

I've got a form that posts to itself when submitted.

Right now, after the form is submitted, the code checks that all of its
fields are valid, then processes the information. If all goes well, visitors
are then redirected using Response.Redire ct("thanks.asp" ).

What I'd like to do is replace Response.Redire ct("thanks.asp" ) with
something more like the post that happens on the form so that "thanks.asp "
can display a summary of what was submitted.

Is there a way to do this? Can you call a "post" somehow from Classic ASP?

I have not spent a lot of time with ASP, so it could be something simple!
Sep 19 '07 #1
7 17448
"jp2code" <poojo.com/mailwrote:
>I've got a form that posts to itself when submitted.

Right now, after the form is submitted, the code checks that all of its
fields are valid, then processes the information. If all goes well, visitors
are then redirected using Response.Redire ct("thanks.asp" ).

What I'd like to do is replace Response.Redire ct("thanks.asp" ) with
something more like the post that happens on the form so that "thanks.asp "
can display a summary of what was submitted.

Is there a way to do this? Can you call a "post" somehow from Classic ASP?
No. IMHO the best way to handle this is to store the data from the
form into the session object (Session("myvar ")=whatever ). Then the
page you forward to can retrieve the data from there and do whatever
it wants with it.

--
Tim Slattery
MS MVP(DTS)
Sl********@bls. gov
http://members.cox.net/slatteryt
Sep 19 '07 #2

"jp2code" <poojo.com/mailwrote in message
news:%2******** *********@TK2MS FTNGP04.phx.gbl ...
I've got a form that posts to itself when submitted.

Right now, after the form is submitted, the code checks that all of its
fields are valid, then processes the information. If all goes well,
visitors are then redirected using Response.Redire ct("thanks.asp" ).

What I'd like to do is replace Response.Redire ct("thanks.asp" ) with
something more like the post that happens on the form so that "thanks.asp "
can display a summary of what was submitted.

Is there a way to do this? Can you call a "post" somehow from Classic ASP?
Instead of Response.Redire ct, use Response.Write to summarise what was
submitted. Yes, it really is that simple.

<%
Sub showform
%>
<form method="post">
Your Name: <input type="text" name="FirstName " /><br />
<input type="submit" name="Submit" value="Submit" />
</form>
<%
End Sub

If Request.Form("S ubmit") = "" Then
call showform()
Else
If Len(Trim(Reques t.Form("FirstNa me")))>0 Then
Response.Write "Your name is " & Trim(Request.Fo rm("FirstName") )
Response.Write "<br />Thanks!!"
Else
Response.Write "You forgot to enter your name"
call showform()
End If
End If
%>

--
Mike Brind
Sep 19 '07 #3
Mr. Slattery:

Thanks! That was even easy to implement! I've already got it working.

A+

"Tim Slattery" wrote:
>
No. IMHO the best way to handle this is to store the data from the
form into the session object (Session("myvar ")=whatever ). Then the
page you forward to can retrieve the data from there and do whatever
it wants with it.

--
Tim Slattery
MS MVP(DTS)
Sl********@bls. gov
http://members.cox.net/slatteryt

Sep 19 '07 #4
instead of redirecting, you can use "server.execute ". When you need to process that code, use :

server.execute( "thanks.asp ")

the "thanks.asp " file will have use of all information in the request object.
"jp2code" <poojo.com/mailwrote in message news:%2******** *********@TK2MS FTNGP04.phx.gbl ...
I've got a form that posts to itself when submitted.

Right now, after the form is submitted, the code checks that all of its fields are valid, then processes the information. If all
goes well, visitors are then redirected using Response.Redire ct("thanks.asp" ).

What I'd like to do is replace Response.Redire ct("thanks.asp" ) with something more like the post that happens on the form so that
"thanks.asp " can display a summary of what was submitted.

Is there a way to do this? Can you call a "post" somehow from Classic ASP?

I have not spent a lot of time with ASP, so it could be something simple!

Sep 19 '07 #5
So, lots of different tricks for doing the same thing! I like it!

"Jon Paal [MSMD]" pointed out:
instead of redirecting, you can use "server.execute ". When you need to
process that code, use :

server.execute( "thanks.asp ")

the "thanks.asp " file will have use of all information in the request
object.

Sep 19 '07 #6
"jp2code" wrote:
So, lots of different tricks for doing the same thing! I like it!
Can you stand another? There is also Server.Transfer :
http://msdn2.microsoft.com/en-us/library/ms525800.aspx

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.

Sep 19 '07 #7
Gazing into my crystal ball I observed "jp2code" <poojo.com/mail>
writing in news:#e******** *****@TK2MSFTNG P04.phx.gbl:
I've got a form that posts to itself when submitted.

Right now, after the form is submitted, the code checks that all of
its fields are valid, then processes the information. If all goes
well, visitors are then redirected using
Response.Redire ct("thanks.asp" ).

What I'd like to do is replace Response.Redire ct("thanks.asp" ) with
something more like the post that happens on the form so that
"thanks.asp " can display a summary of what was submitted.

Is there a way to do this? Can you call a "post" somehow from Classic
ASP?

I have not spent a lot of time with ASP, so it could be something
simple!

The way I deal with this is this:
1. Start the page off with issubmitted = false
2. Validate and do whatever posting to db I need to do.
3. Change issubmitted to true

HTML is something like:
<% if not issubmitted then%>
<form method="post" action="<%=requ est.servervaria bles("Script_na me")%>">
<div>
<label for="name" id="name1">Name :</label<input type="text" name="name"
value="<%=name% >" id="name"><br>
<input type="submit" value="Submit">
</form>
<%else%>
<p>Thank you for submitting the information below:</p>
<dl>
<%For ix = 1 to Request.Form.Co unt
field = request.form.ke y(ix)
inputvalue = request.form.it em(ix)%>
<dt><%=field% ></dt>
<dd><%=inputval ue%></dd>
<%next%>
</dl>
<%end if%>

--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

Sep 21 '07 #8

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

Similar topics

0
2098
by: paulette | last post by:
I have read a zillion and one posts on this exact same problem, but none of them has suggested anything that works for me. So... I am using .Net Framework Version 1.1.4322 I have: 1. Created a C# Class Library project and tested it. It generates the correct output when I use it from a tester class from another project in the same solution 2. Generated a key and inserted the correct key information into the
6
26185
by: Keith E. | last post by:
Does any one know of resources or can you offer direction on how to use classic ASP as a web service client. I have found all kinds of stuff for the ASP.NET But, I need to be able tap into a web service from a ASP 3.0 as a client I have webservice on a IIS platform w/ the SOAP 3.0 kit installed and can talk to it via a VB 6 client.
6
12762
by: ASPfool | last post by:
Hello everyone, Please help me before I throw my computer out of the window: I'm working on a web application in classic ASP (vbscript), which is making calls to some webservices. The calls are made using SOAP - i installed the SOAP3 toolkit on my windows 2k server to enable this. The webservice calls are returning String Arrays which I can't seem to do anything useful with. The call shown below returns a string array with two...
3
3792
by: Mark | last post by:
Hi From what I understand, you can pass arrays from classic ASP to .NET using interop, but you have to change the type of the.NET parameter to object. This seems to be because classic ASP passes a variant containing an array, and interop expects a parameter of type object if you are passing a variant (you are expected to cast it to the correct type in your code). I'd like to find a way of passing arrays so that you don't need to change...
2
1610
by: Rob Shorney | last post by:
Hi, We currently have a classic asp web application. We are currently looking at upgrading this to ASP.NET. However I have a couple of problems that need to be resolved. 1. aspx forms always post back to themselves. how do I get it to post to another web page.
7
6343
by: MeAgin | last post by:
Hi all, I want to call a classic ASP page from my vb.net code. How this can be done? Normally I would create an object from MSXML2.XMLHTTP and then call the Get method and the ResponseText wiuld have the return value. Thnaks. Nadee
1
1126
by: prabodha | last post by:
I am developping a new module for an existing application written in classic ASP.The requirement is such , I have to call a classic ASP code segment from within the ASP.net .I am using C# as the main language.(I am new to ASP.)Can I know whether it is possible to call classic ASP from ASP.net and if possible how that can be achieved?Thankx a lot in advance.
3
5513
by: alandiit | last post by:
Hi every body I would like connect three combo box (CascadingDropDown with a Database) MYSQL by asp classic or Java Script . But I have a problem with this example , when I will change City , returen the curser to the old select -City . Can you Solve this problem for me. Thanks Const cServer="localhost"
0
8946
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9453
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9242
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8188
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6739
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6033
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4551
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4814
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3262
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.