Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > Programmatically Refreshing the Page

Reply
Thread Tools

Programmatically Refreshing the Page

 
 
Nathan Sokalski
Guest
Posts: n/a
 
      08-13-2005
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

http://www.nathansokalski.com/


 
Reply With Quote
 
 
 
 
Cor Ligthert [MVP]
Guest
Posts: n/a
 
      08-13-2005
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


 
Reply With Quote
 
 
 
 
Larry F. Burge
Guest
Posts: n/a
 
      08-13-2005
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" <> wrote in message
news:...
> 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
>
> http://www.nathansokalski.com/
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Refreshing page 1 after page 2 has been called from page 1 patrice.fiset@gmail.com Javascript 2 06-20-2007 10:13 PM
Self-refreshing and non-self-refreshing controls Harlan Messinger ASP .Net 1 08-04-2006 01:13 PM
Self-refreshing and non-self-refreshing controls Harlan Messinger ASP .Net Web Controls 0 08-03-2006 12:29 PM
Programmatically Refreshing the Page Nathan Sokalski ASP .Net 10 08-20-2005 07:32 AM
Programmatically Refreshing the Page Nathan Sokalski ASP .Net Web Controls 2 08-13-2005 02:46 PM



Advertisments
 



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