Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jul 17, 2012 09:45 AM by vklaus
Member
113 Points
74 Posts
Jul 06, 2012 07:16 PM|LINK
Hello,
I'd like to ask you how to refresh current page (I mean something as "F5" from CSHTML code).
Vladimir
All-Star
154818 Points
19853 Posts
Moderator
MVP
Jul 06, 2012 08:15 PM|LINK
You can use the meta refresh tag:
<meta http-equiv="refresh" content="30">
That will cause the page to refresh every 30 seconds
http://en.wikipedia.org/wiki/Meta_refresh
Jul 09, 2012 12:08 PM|LINK
Hello Mike,
thanks, but it's not what I'm looking for... I need something like this:
if XXX {
CurrentPage.Refresh;
XXX = false;
}
Contributor
5438 Points
730 Posts
Jul 09, 2012 04:34 PM|LINK
Maybe this thread could give you some ideas.
Participant
828 Points
185 Posts
Jul 09, 2012 05:12 PM|LINK
if(condition = true) { window.location.href= window.location; }
Jul 09, 2012 05:15 PM|LINK
vklaus if XXX { CurrentPage.Refresh; XXX = false;
Could you give a better idea of what XXX might be? The fact is that you cannot refresh a page from server-side code. You have to have something on the client initiate it. Knowin what XXX might be will help in arriving at a better solution.
Jul 17, 2012 09:45 AM|LINK
Thanks! This is what I'm looking for.
Response.Redirect(Request.RawUrl);
vklaus
Member
113 Points
74 Posts
Refresh current page incl. parameters
Jul 06, 2012 07:16 PM|LINK
Hello,
I'd like to ask you how to refresh current page (I mean something as "F5" from CSHTML code).
Vladimir
Mikesdotnett...
All-Star
154818 Points
19853 Posts
Moderator
MVP
Re: Refresh current page incl. parameters
Jul 06, 2012 08:15 PM|LINK
You can use the meta refresh tag:
That will cause the page to refresh every 30 seconds
http://en.wikipedia.org/wiki/Meta_refresh
Beginning ASP.NET Web Pages with WebMatrix | My Site | Twitter
vklaus
Member
113 Points
74 Posts
Re: Refresh current page incl. parameters
Jul 09, 2012 12:08 PM|LINK
Hello Mike,
thanks, but it's not what I'm looking for... I need something like this:
if XXX {
CurrentPage.Refresh;
XXX = false;
}
Vladimir
GmGregori
Contributor
5438 Points
730 Posts
Re: Refresh current page incl. parameters
Jul 09, 2012 04:34 PM|LINK
Maybe this thread could give you some ideas.
pon_prabhu
Participant
828 Points
185 Posts
Re: Refresh current page incl. parameters
Jul 09, 2012 05:12 PM|LINK
if(condition = true)
{
window.location.href= window.location;
}
Mikesdotnett...
All-Star
154818 Points
19853 Posts
Moderator
MVP
Re: Refresh current page incl. parameters
Jul 09, 2012 05:15 PM|LINK
Could you give a better idea of what XXX might be? The fact is that you cannot refresh a page from server-side code. You have to have something on the client initiate it. Knowin what XXX might be will help in arriving at a better solution.
Beginning ASP.NET Web Pages with WebMatrix | My Site | Twitter
vklaus
Member
113 Points
74 Posts
Re: Refresh current page incl. parameters
Jul 17, 2012 09:45 AM|LINK
Thanks! This is what I'm looking for.