Professional Web Applications Themes

Programmatically Refreshing the Page - ASP.NET Building Controls

One thing that I have often needed to do that I have been unable to find a way to do is refresh the page (basically do the same thing as pressing the browser's Refresh button). I know how to do this using Javascript/JScript, but I have situations in which I need it to be done immediately after code that is part of my other code. Is there any way to do this? Thanks. -- Nathan Sokalski [email]njsokalskihotmail.com[/email] [url]http://www.nathansokalski.com/[/url]...

  1. #1

    Default Programmatically Refreshing the Page

    One thing that I have often needed to do that I have been unable to find a
    way to do is refresh the page (basically do the same thing as pressing the
    browser's Refresh button). I know how to do this using Javascript/JScript,
    but I have situations in which I need it to be done immediately after code
    that is part of my other code. Is there any way to do this? Thanks.
    --
    Nathan Sokalski
    [email]njsokalskihotmail.com[/email]
    [url]http://www.nathansokalski.com/[/url]


    Nathan Sokalski Guest

  2. #2

    Default Re: Programmatically Refreshing the Page

    Nathan,

    I assume that the other sample I did sent in your other questions give you
    an answer on this?

    I hope this helps,

    Cor


    Cor Ligthert [MVP] Guest

  3. #3

    Default Re: Programmatically Refreshing the Page

    I'm not sure if this will help but; this is what I do when I want the page
    to be refreshed. It is server based, I find it nessary if a resource on the
    server has changed and I want it reflected in the browser.

    Public Shared Sub RefreshPage()
    Dim httpCxt As System.Web.HttpContext = GetHTTPContext()
    httpCxt.Response.Redirect(httpCxt.Request.RawUrl) ' RawUrl contains
    the full url, including parameters.
    End Sub

    Public Shared Function GetHTTPContext() As System.Web.HttpContext
    Return (System.Web.HttpContext.Current)
    End Function


    "Nathan Sokalski" <njsokalskihotmail.com> wrote in message
    news:eH0ql66nFHA.3408tk2msftngp13.phx.gbl...
    > One thing that I have often needed to do that I have been unable to find a
    > way to do is refresh the page (basically do the same thing as pressing the
    > browser's Refresh button). I know how to do this using Javascript/JScript,
    > but I have situations in which I need it to be done immediately after code
    > that is part of my other code. Is there any way to do this? Thanks.
    > --
    > Nathan Sokalski
    > [email]njsokalskihotmail.com[/email]
    > [url]http://www.nathansokalski.com/[/url]
    >

    Larry F. Burge Guest

Similar Threads

  1. refreshing page...
    By Kory in forum Dreamweaver AppDev
    Replies: 0
    Last Post: March 9th, 05:28 PM
  2. Refreshing a Page
    By Wayne Wengert in forum ASP
    Replies: 5
    Last Post: September 12th, 08:02 AM
  3. Refreshing Page through CodeBehind --- Is it possible?
    By Kevin Kenny in forum ASP.NET General
    Replies: 2
    Last Post: August 9th, 09:01 PM
  4. Web Page Refreshing...
    By G & H Transportation Co in forum Windows Networking
    Replies: 1
    Last Post: July 5th, 01:30 PM
  5. Refreshing the page
    By Ivo Teel in forum Macromedia Flash
    Replies: 2
    Last Post: July 1st, 12:04 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139