473,604 Members | 2,681 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASP / Redirect

I am new to ASP, still learning.

I have a page that has a submit button.

<form action="move.as p" method="GET">
<input type="submit" value="Query">

The form is sending values to the move.asp page. Which will in turn be
inserted into a database. My questions is can I do the insert without
having to go/see the another page.

For example.
I click on the submit button, it adds the record and then goes back to the
original page.

Thanks in advance



Jul 22 '05 #1
5 2612
Ofcourse, you can post back to the same page,

Here is the psudo code for you.
<%
If Request.Form("S omeformfield") <> "" Then --Poor mans IsPostback() ;)
' Save record
End If

Render your page here

%>

--
Roji. P. Thomas
Net Asset Management
https://www.netassetmanagement.com
"SyrUser03" <sy*******@syr. edu> wrote in message
news:O0******** ******@TK2MSFTN GP14.phx.gbl...
I am new to ASP, still learning.

I have a page that has a submit button.

<form action="move.as p" method="GET">
<input type="submit" value="Query">

The form is sending values to the move.asp page. Which will in turn be
inserted into a database. My questions is can I do the insert without
having to go/see the another page.

For example.
I click on the submit button, it adds the record and then goes back to the
original page.

Thanks in advance


Jul 22 '05 #2
"Roji. P. Thomas" <th********@gma il.com> wrote in message
news:#y******** ******@TK2MSFTN GP14.phx.gbl...
Ofcourse, you can post back to the same page,

Here is the psudo code for you.
<%
If Request.Form("S omeformfield") <> "" Then --Poor mans IsPostback() ;)
' Save record
End If

Render your page here

%>

--
Roji. P. Thomas
Net Asset Management
https://www.netassetmanagement.com
"SyrUser03" <sy*******@syr. edu> wrote in message
news:O0******** ******@TK2MSFTN GP14.phx.gbl...
I am new to ASP, still learning.

I have a page that has a submit button.

<form action="move.as p" method="GET">
<input type="submit" value="Query">

The form is sending values to the move.asp page. Which will in turn be
inserted into a database. My questions is can I do the insert without
having to go/see the another page.

For example.
I click on the submit button, it adds the record and then goes back to the original page.

Thanks in advance


However, since the OP uses "GET", it would be:

<%
If Request.QuerySt ring() <> "" Then
' Save record
End If

' Render your page here

%>
Jul 22 '05 #3
"McKirahan" wrote in message news:UP******** ************@co mcast.com...
: "Roji. P. Thomas" <th********@gma il.com> wrote in message
: news:#y******** ******@TK2MSFTN GP14.phx.gbl...
: > Ofcourse, you can post back to the same page,
: >
: > Here is the psudo code for you.
: > <%
: > If Request.Form("S omeformfield") <> "" Then --Poor mans IsPostback() ;)
: > ' Save record
: > End If
: >
: > Render your page here
: >
: > %>
: >
: >
: >
: > --
: > Roji. P. Thomas
: > Net Asset Management
: > https://www.netassetmanagement.com
: >
: >
: > "SyrUser03" <sy*******@syr. edu> wrote in message
: > news:O0******** ******@TK2MSFTN GP14.phx.gbl...
: > >I am new to ASP, still learning.
: > >
: > > I have a page that has a submit button.
: > >
: > > <form action="move.as p" method="GET">
: > > <input type="submit" value="Query">
: > >
: > > The form is sending values to the move.asp page. Which will in turn
be
: > > inserted into a database. My questions is can I do the insert without
: > > having to go/see the another page.
: > >
: > > For example.
: > > I click on the submit button, it adds the record and then goes back to
: the
: > > original page.
: > >
: > > Thanks in advance
:
: However, since the OP uses "GET", it would be:
:
: <%
: If Request.QuerySt ring() <> "" Then
: ' Save record
: End If
:
: ' Render your page here
:
: %>

I thought for QueryString is was preferable to use:
<%
if len(request.que ryString) <> 0 then
'Save record
end if

' Render your page here
%>

--
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 22 '05 #4
I dont think that approach is safe because
len(request.que ryString) can be greater than zero even when the page
is not post backed.

--
Roji. P. Thomas
Net Asset Management
https://www.netassetmanagement.com
"Roland Hall" <nobody@nowhere > wrote in message
news:eC******** ******@TK2MSFTN GP14.phx.gbl...
"McKirahan" wrote in message news:UP******** ************@co mcast.com...
: "Roji. P. Thomas" <th********@gma il.com> wrote in message
: news:#y******** ******@TK2MSFTN GP14.phx.gbl...
: > Ofcourse, you can post back to the same page,
: >
: > Here is the psudo code for you.
: > <%
: > If Request.Form("S omeformfield") <> "" Then --Poor mans IsPostback()
;)
: > ' Save record
: > End If
: >
: > Render your page here
: >
: > %>
: >
: >
: >
: > --
: > Roji. P. Thomas
: > Net Asset Management
: > https://www.netassetmanagement.com
: >
: >
: > "SyrUser03" <sy*******@syr. edu> wrote in message
: > news:O0******** ******@TK2MSFTN GP14.phx.gbl...
: > >I am new to ASP, still learning.
: > >
: > > I have a page that has a submit button.
: > >
: > > <form action="move.as p" method="GET">
: > > <input type="submit" value="Query">
: > >
: > > The form is sending values to the move.asp page. Which will in turn
be
: > > inserted into a database. My questions is can I do the insert
without
: > > having to go/see the another page.
: > >
: > > For example.
: > > I click on the submit button, it adds the record and then goes back
to
: the
: > > original page.
: > >
: > > Thanks in advance
:
: However, since the OP uses "GET", it would be:
:
: <%
: If Request.QuerySt ring() <> "" Then
: ' Save record
: End If
:
: ' Render your page here
:
: %>

I thought for QueryString is was preferable to use:
<%
if len(request.que ryString) <> 0 then
'Save record
end if

' Render your page here
%>

--
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 22 '05 #5
On Mon, 28 Feb 2005 08:44:11 -0500, "SyrUser03" <sy*******@syr. edu>
wrote:
I am new to ASP, still learning.

I have a page that has a submit button.

<form action="move.as p" method="GET">
<input type="submit" value="Query">

The form is sending values to the move.asp page. Which will in turn be
inserted into a database. My questions is can I do the insert without
having to go/see the another page.

For example.
I click on the submit button, it adds the record and then goes back to the
original page.

Thanks in advance

Send the values to the move.asp page, have it do what it needs to do
then if everything is okay finish the move.asp page with a
response.redire ct to the original page.

eg. Response.Redire ct("form.asp")

You don't even need any html in the move.asp page, unless you want to
report an error.
I

--
Iain Norman | http://www.eliteforum.org
Jul 22 '05 #6

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

Similar topics

10
9342
by: Bob Garbados | last post by:
forgive my ignorance, as I'm new to php coming from a ms background... If I create a page named redirect.php and it's only content is: <?php header("Location: http://www.google.com"); ?> Should it not redirect to www.google.com? I can't get the header() function to redirect. I'm trying to take an online reservation... the customer fills out
3
3897
by: Paul | last post by:
I'm not getting the results I want when I use Response.Redirct in a ASP page. I enter this line of code in a asp page from domain1.com. Response.Redirect "http://www.domain2.com/VDIR2/table.asp" & "?PubID=" & PubID & "&PubName=" & PubName The query string is data to open a DB. the page displays
7
15909
by: Donna Hawkins | last post by:
I want to use javascript to redirect to a URL which has been passed as a variable (in php). I have searched but cannot find any solution. I think this code is a basic redirect: <script type="text/javascript"> window.location = "http://www.someserver.com/somePage.html"; </script>
1
15289
by: Peter Kirk | last post by:
Hi there I have a program written by another company (it's a "web control" which returns a web-page: can I compare this to a servlet in the Java world?), which they think is causing problems on their server. But no-one really knows if this program is at fault because the problem only exhibits itself every once and a while, and the only thing they can see is that their web-users suddenly stop receiving responses.
2
3163
by: Mark Dengler | last post by:
Is it possible to do a Response.Redirect to multiple URLs? I have tried the following and it simply ignores the first redirect: Response.Redirect("test.aspx", false); Response.Redirect(p.UrlSend, true); I have designed the test.aspx page to simple write a cookie, just to see if it is working and it is not. I have also used to VS.Net
3
9068
by: Justin | last post by:
Hi, Im confused here over the usage of Response.Redirect and Server.Transfer. I used frameset for my work, what are the proper usages of the two methods that seems working similar.. The problem i faced while using Response.Redirect is that the page that is directed to, does not looks as desired..the textboxes are not visible anymore and so as
6
4312
by: Sam | last post by:
I have some issues with HTTP Headers and I was hoping for some pointers or references to good articles. Here is the problem. I have 6 .aspx pages, each page contains a common .ascx. This ascx serves two purposes, 1. it contains a tab strip with response.redirects to navigate to the other pages; 2. I authenticate the user by check to see if a cookie exists, if it doesn't I redirect to a login screen.
6
6914
by: Peter Row | last post by:
Hi, I am writing a DLL in VB.NET that implements IHttpHandler.ProcessRequest. This code calls a sub and I need to know if that sub did a response redirect or not. Specifically I need to know that either the sub did a redirect or a specific value was specified in the URL. If neither a redirect was done and a certain value was
5
4556
by: venner | last post by:
I'm having an issue with an ASP.NET website after upgrading to ASP.NET 2.0. The website makes use of a central authentication service (CAS) provided at the university I work for. Each page checks a session variable, and if it is not present, does a Response.Redirect to a webpage for the CAS passing a url parameter for the url to post back to. The CAS provides a page for the user to log into, validates the username and password, and then...
10
9012
by: Eirik Eldorsen | last post by:
How can I 301 redirect www.example.com/default.aspx to www.example.com without using ISAPI filters?
0
7997
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
7929
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8406
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8065
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
6737
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
5882
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
5441
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();...
1
2433
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
1
1522
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.