|
-
Mar 7th, 2005, 09:10 AM
#1
Thread Starter
Junior Member
How do i do this? I'm not sure what is it call...
hi guys, i've had a problem on doing this and hopefully you guys can help me
I intend to design pages such that when a webform is submitted, it will do updating and re-direct to a page.
This page will show something like "Updating..." and after a 3 sec duration, then it will re-direct back to the page where the form is submitted just now.
how should i do about doing it using asp.net and vb.net using visual studip.net 2003 pro. thanks alotz!
-
Mar 7th, 2005, 10:02 AM
#2
Addicted Member
Re: How do i do this? I'm not sure what is it call...
What I do is under the submit button for my form I have all the code that updates the database, then I use:
Response.Redirect('frmThankYou.aspx')
That will redirect the user to a page that thanks them for their submission.
Then on the thank you page under all the <meta> tags I have this:
<meta http-equiv="Refresh" content="5; frmMain.aspx">
Where the '5' represents the seconds the page will be displayed, and 'frmMain.aspx' is the page I want to direct them to.
I hope this helps, post here again if you have more questions about this.
-
Mar 7th, 2005, 08:13 PM
#3
Thread Starter
Junior Member
Re: How do i do this? I'm not sure what is it call...
 Originally Posted by token
What I do is under the submit button for my form I have all the code that updates the database, then I use:
Response.Redirect('frmThankYou.aspx')
That will redirect the user to a page that thanks them for their submission.
Then on the thank you page under all the <meta> tags I have this:
<meta http-equiv="Refresh" content="5; frmMain.aspx">
Where the '5' represents the seconds the page will be displayed, and 'frmMain.aspx' is the page I want to direct them to.
I hope this helps, post here again if you have more questions about this.
i intend to make the 'frmThankYou.aspx' page dynamic. Meaning that all the pages will pass through this with their own customised message on that 'frmThankYou.aspx' page such as "Deleting..." or "Updating..." etc. This page must be able to dynamically get the url of the page they came from and then re-direct back to the page it came from in like 3secs. How can i go about solving it? thanks!
-
Mar 7th, 2005, 08:32 PM
#4
Thread Starter
Junior Member
Re: How do i do this? I'm not sure what is it call...
 Originally Posted by token
What I do is under the submit button for my form I have all the code that updates the database, then I use:
Response.Redirect('frmThankYou.aspx')
That will redirect the user to a page that thanks them for their submission.
Then on the thank you page under all the <meta> tags I have this:
<meta http-equiv="Refresh" content="5; frmMain.aspx">
Where the '5' represents the seconds the page will be displayed, and 'frmMain.aspx' is the page I want to direct them to.
I hope this helps, post here again if you have more questions about this.
i tried <meta http-equiv="Refresh" content="5; frmMain.aspx">
but the delay seems to work but not the re-direct to the page after 5 secs. It will kind of loop on that page. 
however, if i use <meta http-equiv="Refresh" content="5; URL=http://www.yahoo.com"> it works
Last edited by asp.net_vb.net; Mar 7th, 2005 at 08:43 PM.
-
Mar 8th, 2005, 12:10 AM
#5
Thread Starter
Junior Member
Re: How do i do this? I'm not sure what is it call...
what i did was on the main page under the button event, i include
VB Code:
session.add("URL", request.RawUrl") /to pass the original url to the update page
response.redirect("Update.aspx")
and in the "Update.aspx" page that shows the progress, i include
VB Code:
Function GetURL()
Dim url as string = session("URL")
Return url
End Function
and for its html part i include
HTML Code:
<meta http-equiv="Refresh" content="5; URL='<%# GetURL() %>'">
It works for the 5 Secs delay but it doesn't re-direct back to the URL. Anyone have any idea?
-
Mar 8th, 2005, 10:06 AM
#6
Addicted Member
Re: How do i do this? I'm not sure what is it call...
Yeah sorry that was my fault, in the meta tag I completely forgot the 'URL='.
It would never work without it. I am glad you figured it out though.
Try this in the meta tag,
Set the session variable as you did in your code there and in the meta tag try this:
<meta http-equiv="Refresh" content="5; URL=<%= Request.Item("Url") %>">
Hope that works.
-
Mar 8th, 2005, 11:59 AM
#7
Thread Starter
Junior Member
Re: How do i do this? I'm not sure what is it call...
 Originally Posted by token
Yeah sorry that was my fault, in the meta tag I completely forgot the 'URL='.
It would never work without it. I am glad you figured it out though.
Try this in the meta tag,
Set the session variable as you did in your code there and in the meta tag try this:
<meta http-equiv="Refresh" content="5; URL=<%= Request.Item("Url") %>">
Hope that works.
it doesn't work. is there any other ways of doing it?
-
Mar 8th, 2005, 12:44 PM
#8
Addicted Member
Re: How do i do this? I'm not sure what is it call...
Sorry once again , i have screwed up.
Just a lesson to all you kids out there, dont go to work drunk. It's just not cool.
Anyways, in the meta tag it should look like this:
<meta http-equiv="Refresh" content="5; URL=<%= Session("Url") %>">
Not Request.Item, since that will look in the querystring not the session variables. Sorry, this has been a real wake up call for me, the minute i get sober i will seek help with AA....maybe not, but I will try to come to work with just a simple buzz and not full out drunk.
I tested it as well and it should work just fine now. Again tell me if it doesnt and we'll get through this...dont you die on me....we'll get through this.
-
Mar 9th, 2005, 01:39 AM
#9
Thread Starter
Junior Member
Re: How do i do this? I'm not sure what is it call...
 Originally Posted by token
Sorry once again , i have screwed up.
Just a lesson to all you kids out there, dont go to work drunk. It's just not cool.
Anyways, in the meta tag it should look like this:
<meta http-equiv="Refresh" content="5; URL=<%= Session("Url") %>">
Not Request.Item, since that will look in the querystring not the session variables. Sorry, this has been a real wake up call for me, the minute i get sober i will seek help with AA....maybe not, but I will try to come to work with just a simple buzz and not full out drunk.
I tested it as well and it should work just fine now. Again tell me if it doesnt and we'll get through this...dont you die on me....we'll get through this.
Thanks token! It works!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|