Results 1 to 9 of 9

Thread: How do i do this? I'm not sure what is it call...

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2005
    Posts
    20

    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!

  2. #2
    Addicted Member
    Join Date
    Nov 2004
    Posts
    149

    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.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Mar 2005
    Posts
    20

    Re: How do i do this? I'm not sure what is it call...

    Quote 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!

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Mar 2005
    Posts
    20

    Re: How do i do this? I'm not sure what is it call...

    Quote 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.

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Mar 2005
    Posts
    20

    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:
    1. session.add("URL", request.RawUrl")     /to pass the original url to the update page
    2.  
    3. response.redirect("Update.aspx")

    and in the "Update.aspx" page that shows the progress, i include

    VB Code:
    1. Function GetURL()
    2.  
    3. Dim url as string = session("URL")
    4.  
    5. Return url
    6.  
    7. 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?

  6. #6
    Addicted Member
    Join Date
    Nov 2004
    Posts
    149

    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.

  7. #7

    Thread Starter
    Junior Member
    Join Date
    Mar 2005
    Posts
    20

    Re: How do i do this? I'm not sure what is it call...

    Quote 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?

  8. #8
    Addicted Member
    Join Date
    Nov 2004
    Posts
    149

    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.

  9. #9

    Thread Starter
    Junior Member
    Join Date
    Mar 2005
    Posts
    20

    Re: How do i do this? I'm not sure what is it call...

    Quote 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
  •  



Click Here to Expand Forum to Full Width