How to display a "loading page, please wait" box...

G

Guest

I cannot figure this out and would appreciate any help.....
I have a datagrid view that displays the results from a Stored Procedure.
it can take awhile to load.....
the stored procedure fires when a Calendar is clicked. ( a date is part of
the stored procedure ) How can i just show a new page or a pop-up that says
"please wait" until the stored procedure has run and gotten all the data and
the page is completely loaded? In all the examples i have studied, there is
always a button click event or are written in C#....
I was hoping to just use the Visible = True on a new page until the stored
procedure page is completely loaded.


<%@ Page Language="VB" AutoEventWireup="false"
CodeFile="WorstPerfroming.aspx.vb" Inherits="WorstPerfroming" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Worst Performing Statements</title>
</head>
<body>
<form id="form1" runat="server">
<div>
Worst Performing Statements
<asp:LinkButton ID="LinkButton1" runat="server"
PostBackUrl="~/Default.aspx">Home</asp:LinkButton><br />
<br />
<asp:DropDownList ID="DropDownList1" runat="server"
DataSourceID="SqlDataSource1"
DataTextField="SQLServerInstanceName"
DataValueField="SQLServerInstanceName">
</asp:DropDownList><asp:SqlDataSource ID="SqlDataSource1"
runat="server" ConnectionString="<%$
ConnectionStrings:SQLDiagM46ConnectionString8 %>"
SelectCommand="select distinct SQLServerInstanceName from
MonitoredSQLServers
">
</asp:SqlDataSource>
<br />
<asp:Calendar ID="Calendar1" runat="server" BackColor="White"
BorderColor="#999999"
CellPadding="4" DayNameFormat="Shortest" Font-Names="Verdana"
Font-Size="8pt"
ForeColor="Black" Height="180px" Width="200px">
<SelectedDayStyle BackColor="#666666" Font-Bold="True"
ForeColor="White" />
<TodayDayStyle BackColor="#CCCCCC" ForeColor="Black" />
<SelectorStyle BackColor="#CCCCCC" />
<WeekendDayStyle BackColor="LightCyan" />
<OtherMonthDayStyle ForeColor="Gray" />
<NextPrevStyle VerticalAlign="Bottom" />
<DayHeaderStyle BackColor="#CCCCCC" Font-Bold="True"
Font-Size="7pt" />
<TitleStyle BackColor="#999999" BorderColor="Black"
Font-Bold="True" />
</asp:Calendar>

</div>
<br />
<asp:GridView ID="GridView1" runat="server"
DataSourceID="SqlDataSource2">
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource2" runat="server"
ConnectionString="<%$ ConnectionStrings:SQLDiagM46ConnectionString9 %>"
SelectCommand="usp_IderaWorstPerforming"
SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:ControlParameter ControlID="DropDownList1"
Name="sqlname" PropertyName="SelectedValue"
Type="String" />
<asp:ControlParameter ControlID="Calendar1" Name="thedate"
PropertyName="SelectedDate"
Type="DateTime" />
</SelectParameters>
</asp:SqlDataSource>
</form>
</body>
</html>
 
M

Masudur

I cannot figure this out and would appreciate any help.....
I have a datagrid view that displays the results from a Stored Procedure.
it can take awhile to load.....
the stored procedure fires when a Calendar is clicked. ( a date is part of
the stored procedure ) How can i just show a new page or a pop-up that says
"please wait" until the stored procedure has run and gotten all the data and
the page is completely loaded? In all the examples i have studied, there is
always a button click event or are written in C#....
I was hoping to just use the Visible = True on a new page until the stored
procedure page is completely loaded.

<%@ Page Language="VB" AutoEventWireup="false"
CodeFile="WorstPerfroming.aspx.vb" Inherits="WorstPerfroming" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Worst Performing Statements</title>
</head>
<body>
<form id="form1" runat="server">
<div>
Worst Performing Statements
<asp:LinkButton ID="LinkButton1" runat="server"
PostBackUrl="~/Default.aspx">Home</asp:LinkButton><br />
<br />
<asp:DropDownList ID="DropDownList1" runat="server"
DataSourceID="SqlDataSource1"
DataTextField="SQLServerInstanceName"
DataValueField="SQLServerInstanceName">
</asp:DropDownList><asp:SqlDataSource ID="SqlDataSource1"
runat="server" ConnectionString="<%$
ConnectionStrings:SQLDiagM46ConnectionString8 %>"
SelectCommand="select distinct SQLServerInstanceName from
MonitoredSQLServers
">
</asp:SqlDataSource>
<br />
<asp:Calendar ID="Calendar1" runat="server" BackColor="White"
BorderColor="#999999"
CellPadding="4" DayNameFormat="Shortest" Font-Names="Verdana"
Font-Size="8pt"
ForeColor="Black" Height="180px" Width="200px">
<SelectedDayStyle BackColor="#666666" Font-Bold="True"
ForeColor="White" />
<TodayDayStyle BackColor="#CCCCCC" ForeColor="Black" />
<SelectorStyle BackColor="#CCCCCC" />
<WeekendDayStyle BackColor="LightCyan" />
<OtherMonthDayStyle ForeColor="Gray" />
<NextPrevStyle VerticalAlign="Bottom" />
<DayHeaderStyle BackColor="#CCCCCC" Font-Bold="True"
Font-Size="7pt" />
<TitleStyle BackColor="#999999" BorderColor="Black"
Font-Bold="True" />
</asp:Calendar>

</div>
<br />
<asp:GridView ID="GridView1" runat="server"
DataSourceID="SqlDataSource2">
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource2" runat="server"
ConnectionString="<%$ ConnectionStrings:SQLDiagM46ConnectionString9 %>"
SelectCommand="usp_IderaWorstPerforming"
SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:ControlParameter ControlID="DropDownList1"
Name="sqlname" PropertyName="SelectedValue"
Type="String" />
<asp:ControlParameter ControlID="Calendar1" Name="thedate"
PropertyName="SelectedDate"
Type="DateTime" />
</SelectParameters>
</asp:SqlDataSource>
</form>
</body>
</html>

Hi...

Use javascript to do that...
on form submit show a div with absolute positioning ...

Thanks
Masudur
http://munnacs.110mb.com
 
J

Juan T. Llibre

re:
!> those examples do not work for my page.....

That's odd.

I have seen them work in dozens of pages,
after appropiate modifications have been made.

What special conditions do you have which invalidate that, good, code ?
 
J

jufemaiz: jc

those examples do not work for my page.....

Have a look at the Yahoo User Interface javascript library. The
YAHOO.util.event is what you're looking for and it's specifically the
on function that you'd be interested in - making it hide the "your
page is loading because our site is slow" information when the DOM
triggers that the element you are after (your table of data) is loaded.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top