Ask a Question related to ASP.NET General, Design and Development.
-
Kevin Kenny #1
Re: Refreshing Page through CodeBehind --- Is it possible?
Temp wrote:
I presume that you mean some app running on the server? There isn't a>Can anyone tell me if it is possible to refresh the client's browser from
>the Codebehind?
>
>If so, how can it be done?
>
>If not, does anyone have any suggestions as to how I can trick the browser
>to refresh when a timer has been disposed of?
>
>Thanks
>
>
>
way to do this server side once the page has been dispatched back to the
browser but you could try client side javascript to poll a status page
periodically to see if whatever work is running has been done.
Kev
Kevin Kenny Guest
-
refreshing page...
I have page that is opened in a small window and after a user submits the form on that page I want the window to close and then refresh the page... -
Refreshing a Page
I have a menu that calls a specific asp page and passes a variable data1page.asp?year=2001 where the value of the year variable is determined... -
automtically refreshing a page
Greetings I found this in the DWMX help but unfortunately it doesn't actually say how to do it: Setting Refresh properties Use the Refresh... -
Web Page Refreshing...
I was just wondering... Our company must use a web site for order information from one of our customers. They place an order on the web site and... -
Refreshing the page
I was wondering if there is any way through for instance getURL(), to refresh the current page? (Like the page the SWF is currently included on.)... -
Carl Prothman [MVP] #2
Re: Refreshing Page through CodeBehind --- Is it possible?
"Temp" <tempmail@temp.com> wrote
Sure, just output a refresh meta tag:> Can anyone tell me if it is possible to refresh the client's browser from
> the Codebehind?
>
<meta http-equiv="refresh" content="10">
e.g.
Add an ID and RunAt attribute on the HEAD tag
<HEAD id="head1" runat="server">
<title>WebForm1</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
Then in your code-behind, and the following class level member:
Protected WithEvents Head1 As System.Web.UI.HtmlControls.HtmlGenericControl
Then in your Page_Load event hander, do the following:
Head1.InnerHtml += "<meta http-equiv='refresh' content='10'>"
--
Thanks,
Carl Prothman
Microsoft ASP.NET MVP
[url]http://www.able-consulting.com[/url]
Carl Prothman [MVP] Guest
-
Michal A. Valasek #3
Re: Refreshing Page through CodeBehind --- Is it possible?
| <HEAD id="head1" runat="server">
| <title>WebForm1</title>
| <meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
| <meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
| <meta name="vs_defaultClientScript" content="JavaScript">
| <meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
| </HEAD>
As it probably would work, better solution is (AFAIK) simply add the HTTP
header directly, instead of mimicking it in HTML:
Response.AddHeader("refresh", "n")
or
Response.AddHeader("refresh", "n; url=address")
"n" is time in seconds, "address" is address you want redirect to.
--
Michal A. Valasek, Altair Communications, [url]http://www.altaircom.net[/url]
Please do not reply to this e-mail, for contact see [url]http://www.rider.cz[/url]
Keeping Freedom safe from Democracy
Michal A. Valasek Guest



Reply With Quote

