Adding Variables To Response.redirect
I have a page that contains processed variables that I'd like to
forward using the response.redirect method. However, because the
response.redirect contains the page within "pagename.asp", I have not
been able to pass the variable.
I've tried concatenating it, by doing
respone.redirect "pagename.asp?isbn=" & rs("isbn"), however it is not
working and is stopping at the ?isbn=
and not adding the variable value. What can I do to include this, or
is there any other way I can pass the variables when I'm using the
response.redirect method?
View Replies
ADVERTISEMENT
I have a page that contains a link. When a user clicks the link, the link runs a new page that the client does not see (i.e. server side only). The new page looks at a database to see if certain conditions are true. If they are, it updates the database and redirects the user back to page 1, where the client will see the updated information.
However, if the database conditions are false, the client will be redirected back to page1, but will have an error message saying that the database could not be updated.
So overall it looks something like:
PAGE1 ----> DATABASEUPDATER(checks conditions)
IF CONDITIONS=TRUE THEN
UPDATE STUFF
RESPONSE.REDIRECT(PAGE1.ASP)
ELSE
DONT TOUCH DATABASE
RESPONSE.WRITE("conditions have not been met")
XXXXXXXXXXXXXX
END IF
-----------------------------------------------------
My problem is deciding what goes in the XXXXXXXXXXXX section.
I have looked for other examples of this but I could not find something this specific....
If i use Response.Redirect, the explorer will go back to Page1.asp but will not display the error message and the client will not be aware that there is a problem.
If I use server.transfer (to put control back into the hands of page1.asp) or server.execute (to just run Page1.asp within the current script) the actual page that the user is looking at is not Page1.asp - they are actually looking at DatabaseUpdater.asp with Page1.asp executed inside it....unfortunately I require it to be Page1.asp itself, which is why i cannot work out what to put there.
Looking at other threads on similar topics, it might be possible to add something to the session variables or something and then get Page1 to look for whether a certain thing is written as a session variable (if that makes any sense!)
View Replies
View Related
I am simply passing session variables from one page to another. And I have no problem in doing so..... But when I use response.redirect none of the session values show up on the redirect page. What am I doing wrong?
View Replies
View Related
This is a most infuriating problem. I have one login.asp page on my localhost:
....
session("vandv_user_manager") = TRUE
Session("personid")=pid
response.redirect("users.asp")
....
and on my users.asp page I can do a:
response.write session("vandv_user_manager")
and that returns 'True'. I can also do the same on the login.asp page to confirm the session is set.
View Replies
View Related
I am trying to use the following in an ASP page to redirect a user to a
non-anonymous FTP site:
response.redirect("ftp://myusername:mypassword@ftp.mysite.com")
but I keep getting a "permission denied" error. If I just put the same
address string in IE6's Address box and go to it, IE opens myusername's FTP
home page just fine, so I know the FTP site is working as expected. Also,
if I put in an anonymous ftp site, without the username and password (e.g.
"ftp://ftp.microsoft.com"), the redirect works fine, too.
I don't want the user to be prompted by IE for the username and password at
the FTP site, so I am providing them from within the web site.
What can be preventing the response.redirect from handling non-anonymous FTP
access? Is there a better way to do this?
View Replies
View Related
What I would like is shown in the script below:
response.write rsuser("event_Day") & " "
response.write rsuser("event_Date") & " "
response.write rsuser("event_Month") & " " & " "
response.write rsuser("event_Year") & " " & " "
<font color="#990000">response.write rsuser("event_SoldOut")</font>
rsuser.movenext
I would like for the 5th response.write to be in a different font colour, but its not allowing me to do this.
View Replies
View Related
is it possible to add the contents of session variables?
for example I have 2 session variables, product1 & product2 , if I try and
add them I get a "type mismatch" error.
i.e. total = session("product1") + session("product2")
I've tried session("product1").contents or session("product1").value then I
get an error of "object required".
Any ideas?
View Replies
View Related
I have two session variables containing numeric values and I would like to be able to add them together. Currently I have the following code:
View Replies
View Related
I basically want to add together variables whilst my loop is running so I get a grand total at the end.
heres my loop (I've stripped out most of the code so it stays simple)
do while NOT oRSeofd2.EOF
varPrice = oRSeofd2("Price")
varDiscount = oRSeofd2("Discount")
varQty = oRSeofd2("Qty")
oRSeofd2.Movenext
loop
'What I would like to do here is to calculate the total of all the combined prices and qty. i.e. Code:
View Replies
View Related
Is there any point in having response.end after response.redirect?
View Replies
View Related
I have a Popup window where a user inputs soem data.
On successfully entering this data I redirect the user to
a page in the same popup indicating that the form has
submitted successfully.
I want to resize the page that I redirect the user to.
Is this possible in ASP?
View Replies
View Related
Can anyone tell me if Response.Redirect works with IE5?, for me its seems to be working with IE6 and Firefox, but seems ineffective with IE5.
I have also set Response.Buffer = True
View Replies
View Related
How to send more than one value using response redirect? For example i can send one like this:
response.Redirect "pregled.asp?ime=" & strUserName
but how to send two or more values? I tried:
response.Redirect("pregled.asp?ime=" & strUserName & " & prezime = " &
strUserLastName)but it didn't work.
View Replies
View Related
How do I use Response.Redirect to point to an interal private box/site? Code:
View Replies
View Related
IF Trim(Request.QueryString("v")) = "" THEN
Back = Replace(Request.ServerVariables("Http_REFERER"),"http://localhost/","")
ELSE
Back = Request.QueryString("v")
END IF
Response.Redirect(""&Response.write(Back)&"")
why i cannot Redirect to the page?
View Replies
View Related
is it possible to open a page in a new window with response.redirect, and if
so, what is the syntax.
View Replies
View Related
Code:
if left(request.Form("phone_nu"),3) = "234" and len(request.Form("phone_nu")) < 11 then
response.Redirect("sms.asp?error="&(request.Form("phone_nu")))
end if
View Replies
View Related
is there a way to response.redirect what's already in the address bar then add on what you want for each link? I have a page that will sort but I dont want to type out all the links. cant I do something like
response.write((whats in the address bar)&sort=asc)
I know I could do this
Response.write(request.servervariables("URL"))
but that doesnt give me the stuff in the address bar
View Replies
View Related
What is the proper syntax for this response.redirect? I am using mulitple IDs that I need to pass??
<%Response.Redirect("uGallery3.asp?ID=" & commInsert__ID & GalleryID= rsImages__MMID) %>
View Replies
View Related
I have a page, progress.asp?id=<%=rs("id")%>, all the insert function will be done to nextpage.asp. Then, on nextpage.asp, I will like to redirect back to progress.asp?id=<%=rs("id")%>, but I have problem with the id.
View Replies
View Related
I am using response.redirec to do the url redirection on my login page. The
login page is under http://myURL/test/dir1/login.aspx, when the user login
successfully, the login page redirects the user to the default.apsx page,
which is under http://myURL/test/dir1/default.aspx.
When I enter the IP address of myURL in the address bar, the redirection
works perfectly fine, but if I enter myURL (which is hostname) in the address
bar, the redirection in login page doesn't work anymore, the login page just
gets refreshed.
View Replies
View Related
I have an application form which on confirmation of details, takes you back to the page from where the person chose which course they want to apply for. The process has been working fine when I had just basic html (just the form tags) but when I put it into my html template I'm getting an error message when it comes to the response.redirect "index.asp". The error is
Header Error
The HTTP headers are already written to the client browser. Any HTTP header modifications must be made before writing page content.
View Replies
View Related
response.redirect seems to urlencode a querystring thrown across at it..
is there a way to disable this function that anyone knows of?
ie..
response.redirect "http://www.blurb.com/default.asp?test=sweet+%26+sour"
actually comes back after the redirect with the % urlencoded which obviously
considering its been given the encoding anyway is a nightmare.. ie
"http://www.blurb.com/default.asp?test=sweet+%2526+sour"
and subsequent redirections would just keep replacing the starting % with
%25...
tell meif it can be disabled through IIS somehow
View Replies
View Related
IF rsQuery("survey_taken") = "Y" Then
%>
<script language = "Javascript">
alert ("You have taken the survey.");
</script>
<%
Response.Redirect "page.asp"
Else
End IF
Is the codes wrong? becos after the msg box pop up, it doesnt redirect me to the page.asp
View Replies
View Related
Response.redirect(results.Fields("Url"))
but still give me file not found 404 and i print the content in database to ensure it contain the exactly file and when write the file name as string it is worked
response.redirect("HoCom.htm")
View Replies
View Related
response.redirect "activemovieframe?movie=" & movie & """
the error is :
Code:
Microsoft VBScript compilation error '800a0409'
Unterminated string constant
View Replies
View Related
is there a way to do a response.redirect with a target of _self?
View Replies
View Related
I'm using the following code:
If x=1 Then
Response.Redirect ("Page.asp")
End If
As I'm using frames I would like the Response.Redirect to contain a similar code entry as target_top for an HTML link. Please does anyone know if there is an asp equivalent?
View Replies
View Related
I have a .mdb file with name, email (which is really a URL), password, code, date, and ID. My goal is to put a form on the login.asp page. If the user logs in with their username and password, they'll be redirected toward their page.
I'll paste my code below for my login.asp page. Any help would be greatly appreciated. And I'm a "dummy programmer" ... I can understand it if it's simple. Basically, I want "Joe" to be able to put in his password, and go to "Joe.asp". Then "Jim" to put in his password, and go to "Jim.asp". My login.asp page: Code:
View Replies
View Related
after moving your user to a designated screen what server variable is it to look up the previous page you came from? isn't it something close to refer variable. i can't find an example anywhere.
View Replies
View Related
I'm working on an application in ASP and some pages which are already done by someone else work as follows:
There's a form with as many submit (!) buttons as there are links to pages. When a user presses a button, the form is submitted to itself... there If statements are used for each submit button and if the name of the one pressed is in the If statement a Response.Redirect is done to load some other page.
My question is... why not simply attach the link for the webpage directly to the button? Right now it feels like it's clumsy... submitting it, processing the if statements till there's a match, only to call another page.
Are there any advantages to the approach? The URL of the webpage which is called will still appear in the address-bar won't it?
View Replies
View Related
I have written following code and it is taking 40 to 50 seconds to redirect to the next page
<%
If Request.Form("submit") <> "" Then
Response.Redirect("SatishTest.Asp")
End If
%>
<html>
<body>
<form action="" method="post">
Satish
<input type="submit" name="submit" value="submit">
</form>
</body>
</html>
Even in SatishTest.Asp page is also having simple html text which displays Success.
when i click on submit button page is taking 40 to 50 seconds to opeing the SatishTest.asp
These 2 files i have create to explain the problem .... actual website is different but having only html code.
View Replies
View Related
can i redirect more than one pages with a variable in a single Response.Redirect("url1+var1,url2+var1,..") ??
if it is possible, can someone give me the script.
View Replies
View Related