We help IT Professionals succeed at work.
Get Started

how to refresh a page every 5 mins asp.net c#

Codingitup
Codingitup asked
on
763 Views
Last Modified: 2012-05-12
Hi,

I've got the below asp.net code. I'm trying to find out how I refresh the page automatically every 5 minutes please.

Many Thanks
Lee
<%@ Page Title="" Language="C#" MasterPageFile="~/Global.Master" AutoEventWireup="true" CodeBehind="CurrentRushOrders.aspx.cs" Inherits="Reporting.CurrentRushOrders" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>


<asp:Content ID="Content1" ContentPlaceHolderID="ph_Content" runat="server">
    <h2>Current Rush Orders</h2>
	<asp:GridView ID="GridViewRushOrders" runat="server"  
		Caption="Current Rush Orders on System" AutoGenerateColumns="False" 
		 onrowdatabound="GridViewRushOrders_RowDataBound" 
		 OnRowCommand="GridViewRushOrders_RowCommand"
         OnRowUpdating="GridViewRushOrders_RowUpdating" 
		DataSourceID="SqlDataSourceRushOrders">
		<Columns>
			<asp:BoundField DataField="WorkOrder" HeaderText="Work Order" 
				SortExpression="Work Order" ReadOnly="True" />
			<asp:BoundField DataField="SalesOrder" HeaderText="Sales Order" 
				SortExpression="Sales Order" ReadOnly="True" />
			<asp:BoundField DataField="SalesLine" HeaderText="Line No" ReadOnly="True" 
				SortExpression="Line No" />
			<asp:BoundField DataField="Qty" HeaderText="Qty" ReadOnly="True" 
				SortExpression="Qty" />
			<asp:BoundField DataField="CustomerName" HeaderText="Customer Name" 
				SortExpression="Customer Name" ReadOnly="True" />
			<asp:BoundField DataField="RequestedDate" HeaderText="Requested Date" 
				ReadOnly="True" SortExpression="Requested Date" />
			<asp:BoundField DataField="Priority" HeaderText="Priority" 
				SortExpression="Priority" ReadOnly="True" />
			<asp:BoundField DataField="PartNo" HeaderText="Part Number" 
				SortExpression="Part Number" ReadOnly="True" />
			<asp:BoundField DataField="StatusNext" HeaderText="Status Next" 
				SortExpression="Status Next" ReadOnly="True" />
			<asp:BoundField DataField="Carrier" HeaderText="Carrier" 
				SortExpression="Carrier" />
			<asp:CommandField ButtonType="Image" CancelImageUrl="~/Images/cancel_48.png" EditImageUrl="~/Images/edit_48.png"
				ShowEditButton="True" UpdateImageUrl="~/Images/save_48.png" 
                HeaderText="Edit Carrier" />
			<asp:TemplateField ShowHeader="False" HeaderText="Ship It">
                <ItemTemplate>
                    <asp:ImageButton ID="ImageButton1" runat="server" CausesValidation="false" 
                        CommandName="Shipped" ImageUrl="~/Images/autoship_48.png" Text="shipped" CommandArgument='<%#Eval("WorkOrder") %>' />
                        <asp:ConfirmButtonExtender ID="Button1_ConfirmButtonExtender" runat="server" 
                            ConfirmText='<%# AddNumbers(Eval("SalesOrder").ToString(),Eval("SalesLine").ToString())%>' Enabled="True" TargetControlID="ImageButton1">
                        </asp:ConfirmButtonExtender>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="Completed" HeaderText="Shipped On" 
                DataFormatString="{0:dd/MM/yy HH:mm} " ReadOnly="True" />
    </Columns>
	</asp:GridView>
	<br />
	<asp:SqlDataSource ID="SqlDataSourceRushOrders" runat="server" 
		ConnectionString="<%$ ConnectionStrings:jdeConnectionString %>" SelectCommand="sales_RushDisplayOrders" 
        UpdateCommand="	UPDATE dbo.RushOrderStatus SET Carrier = @NewCarrier
		WHERE WorkOrder = @Workorder" 
        SelectCommandType="StoredProcedure">
        <UpdateParameters>
            <asp:Parameter Direction="Input"  Name="NewCarrier" />
            <asp:Parameter Direction="Input"  Name="Workorder" Type="Int32"  />
        </UpdateParameters>
    </asp:SqlDataSource>
	<br />

    <br />
    <asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
    <br />
	<br />
	<br />
	<br />

	<br />
</asp:Content>

Open in new window

Comment
Watch Question
This problem has been solved!
Unlock 1 Answer and 5 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE