By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,719 Members | 1,056 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,719 IT Pros & Developers. It's quick & easy.

PostBack "Please Wait..." Message.

P: n/a
Hi,
I have a datagrid with a radiobutton template column, with AutoPostBack set
to TRUE. When the user clicks on a radiobutton the application will
PostBack, and in the PostBack there will be certain logic performed, and the
dataview will be re-binded to the datagrid. There turns out to be about 2-5
seconds delay between the time the user clicks the radiobutton and when the
page is completely re-loaded. During this time the user may try clicking
into other controls unaware that the page is being refreshed, so what I'd
like to have happen is as soon as they click on the radiobutton I'll have a
popup window that states for them "to please wait..", and when the page is
finished re-loading have the popup window close. I tried doing this with
javascript and window.open and window.close but could not get it working.
Does anybody have a suggestion, or possibly sample code?

Thanks,
John

Nov 19 '05 #1
Share this Question
Share on Google+
9 Replies


P: n/a
John,

Entertain Users During Lengthy Operations may be interested for you.

Eliyahu

"John Walker" <Jo********@discussions.microsoft.com> wrote in message
news:CB**********************************@microsof t.com...
Hi,
I have a datagrid with a radiobutton template column, with AutoPostBack set to TRUE. When the user clicks on a radiobutton the application will
PostBack, and in the PostBack there will be certain logic performed, and the dataview will be re-binded to the datagrid. There turns out to be about 2-5 seconds delay between the time the user clicks the radiobutton and when the page is completely re-loaded. During this time the user may try clicking
into other controls unaware that the page is being refreshed, so what I'd
like to have happen is as soon as they click on the radiobutton I'll have a popup window that states for them "to please wait..", and when the page is
finished re-loading have the popup window close. I tried doing this with
javascript and window.open and window.close but could not get it working.
Does anybody have a suggestion, or possibly sample code?

Thanks,
John

Nov 19 '05 #2

P: n/a
John Walker wrote:
Hi,
I have a datagrid with a radiobutton template column, with AutoPostBack set
to TRUE. When the user clicks on a radiobutton the application will
PostBack, and in the PostBack there will be certain logic performed, and the
dataview will be re-binded to the datagrid. There turns out to be about 2-5
seconds delay between the time the user clicks the radiobutton and when the
page is completely re-loaded. During this time the user may try clicking
into other controls unaware that the page is being refreshed, so what I'd
like to have happen is as soon as they click on the radiobutton I'll have a
popup window that states for them "to please wait..", and when the page is
finished re-loading have the popup window close. I tried doing this with
javascript and window.open and window.close but could not get it working.
Does anybody have a suggestion, or possibly sample code?

Thanks,
John

You'll have to stick with client side code, perhaps hit a javascript
group. The server side execution has no control.

You are on the right lines... you should be able to "window.open()" with
the client event and have the page send back a close call to the other
window

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com
Nov 19 '05 #3

P: n/a
Eliyahu,
I found that article, but that solution was for "particularly time-consuming
operation over the Web. By 'time consuming operation' I mean all those
operations that, in a Windows Forms scenario, typically require a progress
bar."

My situation deals with only a couple to a few seconds that the user should
know not to try to make changes till the screen is refreshed. Is there a
simple way to indicate to the user that 'page is refreshing'?

"Eliyahu Goldin" wrote:
John,

Entertain Users During Lengthy Operations may be interested for you.

Eliyahu

"John Walker" <Jo********@discussions.microsoft.com> wrote in message
news:CB**********************************@microsof t.com...
Hi,
I have a datagrid with a radiobutton template column, with AutoPostBack

set
to TRUE. When the user clicks on a radiobutton the application will
PostBack, and in the PostBack there will be certain logic performed, and

the
dataview will be re-binded to the datagrid. There turns out to be about

2-5
seconds delay between the time the user clicks the radiobutton and when

the
page is completely re-loaded. During this time the user may try clicking
into other controls unaware that the page is being refreshed, so what I'd
like to have happen is as soon as they click on the radiobutton I'll have

a
popup window that states for them "to please wait..", and when the page is
finished re-loading have the popup window close. I tried doing this with
javascript and window.open and window.close but could not get it working.
Does anybody have a suggestion, or possibly sample code?

Thanks,
John


Nov 19 '05 #4

P: n/a
John,

Sorry for the missing link, it was supposed to be there.

Even if you tell the user that 'page is refreshing', you are more interested
in disabling input controls. What about handling client-side onclick events
to disable all html inputs and show a hidden text "The page is refreshing"?
It's a hassle, but if you really want it...

Eliyahu

"John Walker" <Jo********@discussions.microsoft.com> wrote in message
news:10**********************************@microsof t.com...
Eliyahu,
I found that article, but that solution was for "particularly time-consuming operation over the Web. By 'time consuming operation' I mean all those
operations that, in a Windows Forms scenario, typically require a progress
bar."

My situation deals with only a couple to a few seconds that the user should know not to try to make changes till the screen is refreshed. Is there a
simple way to indicate to the user that 'page is refreshing'?

"Eliyahu Goldin" wrote:
John,

Entertain Users During Lengthy Operations may be interested for you.

Eliyahu

"John Walker" <Jo********@discussions.microsoft.com> wrote in message
news:CB**********************************@microsof t.com...
Hi,
I have a datagrid with a radiobutton template column, with AutoPostBack
set
to TRUE. When the user clicks on a radiobutton the application will
PostBack, and in the PostBack there will be certain logic performed,
and the
dataview will be re-binded to the datagrid. There turns out to be
about 2-5
seconds delay between the time the user clicks the radiobutton and
when the
page is completely re-loaded. During this time the user may try
clicking into other controls unaware that the page is being refreshed, so what I'd like to have happen is as soon as they click on the radiobutton I'll have a
popup window that states for them "to please wait..", and when the

page is finished re-loading have the popup window close. I tried doing this with javascript and window.open and window.close but could not get it working. Does anybody have a suggestion, or possibly sample code?

Thanks,
John


Nov 19 '05 #5

P: n/a
John,

this article might help you.
http://www.codeproject.com/useritems...ableButton.asp

I'll post some code later/tomorrow which shows you how to pop up a window.
Basically all you have to do is to open a popup in the onsubmit event of
your form

HTHs

Daniel
"John Walker" <Jo********@discussions.microsoft.com> schrieb im Newsbeitrag
news:CB**********************************@microsof t.com...
Hi,
I have a datagrid with a radiobutton template column, with AutoPostBack
set
to TRUE. When the user clicks on a radiobutton the application will
PostBack, and in the PostBack there will be certain logic performed, and
the
dataview will be re-binded to the datagrid. There turns out to be about
2-5
seconds delay between the time the user clicks the radiobutton and when
the
page is completely re-loaded. During this time the user may try clicking
into other controls unaware that the page is being refreshed, so what I'd
like to have happen is as soon as they click on the radiobutton I'll have
a
popup window that states for them "to please wait..", and when the page is
finished re-loading have the popup window close. I tried doing this with
javascript and window.open and window.close but could not get it working.
Does anybody have a suggestion, or possibly sample code?

Thanks,
John

Nov 19 '05 #6

P: n/a
Here you go. I know this solution is not perfect but it's a start

..aspx
************************************************** ************************************************** **

<%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb"
Inherits="ATV2004.WebForm1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<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">
<LINK href="/ATV2004/css/Styles.css" type="text/css" rel="stylesheet">

<script language="javascript">
<!--

var hMD;

function showMD()
{
hMD = window.showModelessDialog("SaveDialog.htm", "SaveDialog",
"dialogHeight:100px; dialogWidth:200px; scroll:no; status:no; help:no;");
}

function closeMD()
{
// debugger;
if(hMD != null)
{
hMD.close();
}
}

//-->
</script>
</HEAD>
<body MS_POSITIONING="FlowLayout" onload="closeMD();">
<form id="Form1" method="post" runat="server" onsubmit="showMD();">
<asp:Button id="Button3" runat="server" Text="Button"></asp:Button>
</form>
</body>
</HTML>
codebehind
************************************************** ************************************************** **

Public Class WebForm1
Inherits System.Web.UI.Page

#Region " Vom Web Form Designer generierter Code "

'Dieser Aufruf ist für den Web Form-Designer erforderlich.

<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

End Sub

Protected WithEvents Button1 As System.Web.UI.WebControls.Button

Protected WithEvents Button2 As System.Web.UI.WebControls.Button

Protected WithEvents Button3 As System.Web.UI.WebControls.Button

'HINWEIS: Die folgende Platzhalterdeklaration ist für den Web Form-Designer
erforderlich.

'Nicht löschen oder verschieben.

Private designerPlaceholderDeclaration As System.Object

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init

'CODEGEN: Dieser Methodenaufruf ist für den Web Form-Designer erforderlich

'Verwenden Sie nicht den Code-Editor zur Bearbeitung.

InitializeComponent()

End Sub

#End Region

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

' Hier Benutzercode zur Seiteninitialisierung einfügen

End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button3.Click

System.Threading.Thread.Sleep(5000)

End Sub

End Class


"John Walker" <Jo********@discussions.microsoft.com> schrieb im Newsbeitrag
news:CB**********************************@microsof t.com...
Hi,
I have a datagrid with a radiobutton template column, with AutoPostBack
set
to TRUE. When the user clicks on a radiobutton the application will
PostBack, and in the PostBack there will be certain logic performed, and
the
dataview will be re-binded to the datagrid. There turns out to be about
2-5
seconds delay between the time the user clicks the radiobutton and when
the
page is completely re-loaded. During this time the user may try clicking
into other controls unaware that the page is being refreshed, so what I'd
like to have happen is as soon as they click on the radiobutton I'll have
a
popup window that states for them "to please wait..", and when the page is
finished re-loading have the popup window close. I tried doing this with
javascript and window.open and window.close but could not get it working.
Does anybody have a suggestion, or possibly sample code?

Thanks,
John

Nov 19 '05 #7

P: n/a
Daniel,
This looks like it may be a solution that I can use. Thanks!
John

"Daniel Walzenbach" wrote:
Here you go. I know this solution is not perfect but it's a start

..aspx
************************************************** ************************************************** **

<%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb"
Inherits="ATV2004.WebForm1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<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">
<LINK href="/ATV2004/css/Styles.css" type="text/css" rel="stylesheet">

<script language="javascript">
<!--

var hMD;

function showMD()
{
hMD = window.showModelessDialog("SaveDialog.htm", "SaveDialog",
"dialogHeight:100px; dialogWidth:200px; scroll:no; status:no; help:no;");
}

function closeMD()
{
// debugger;
if(hMD != null)
{
hMD.close();
}
}

//-->
</script>
</HEAD>
<body MS_POSITIONING="FlowLayout" onload="closeMD();">
<form id="Form1" method="post" runat="server" onsubmit="showMD();">
<asp:Button id="Button3" runat="server" Text="Button"></asp:Button>
</form>
</body>
</HTML>
codebehind
************************************************** ************************************************** **

Public Class WebForm1
Inherits System.Web.UI.Page

#Region " Vom Web Form Designer generierter Code "

'Dieser Aufruf ist für den Web Form-Designer erforderlich.

<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

End Sub

Protected WithEvents Button1 As System.Web.UI.WebControls.Button

Protected WithEvents Button2 As System.Web.UI.WebControls.Button

Protected WithEvents Button3 As System.Web.UI.WebControls.Button

'HINWEIS: Die folgende Platzhalterdeklaration ist für den Web Form-Designer
erforderlich.

'Nicht löschen oder verschieben.

Private designerPlaceholderDeclaration As System.Object

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init

'CODEGEN: Dieser Methodenaufruf ist für den Web Form-Designer erforderlich

'Verwenden Sie nicht den Code-Editor zur Bearbeitung.

InitializeComponent()

End Sub

#End Region

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

' Hier Benutzercode zur Seiteninitialisierung einfügen

End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button3.Click

System.Threading.Thread.Sleep(5000)

End Sub

End Class


"John Walker" <Jo********@discussions.microsoft.com> schrieb im Newsbeitrag
news:CB**********************************@microsof t.com...
Hi,
I have a datagrid with a radiobutton template column, with AutoPostBack
set
to TRUE. When the user clicks on a radiobutton the application will
PostBack, and in the PostBack there will be certain logic performed, and
the
dataview will be re-binded to the datagrid. There turns out to be about
2-5
seconds delay between the time the user clicks the radiobutton and when
the
page is completely re-loaded. During this time the user may try clicking
into other controls unaware that the page is being refreshed, so what I'd
like to have happen is as soon as they click on the radiobutton I'll have
a
popup window that states for them "to please wait..", and when the page is
finished re-loading have the popup window close. I tried doing this with
javascript and window.open and window.close but could not get it working.
Does anybody have a suggestion, or possibly sample code?

Thanks,
John


Nov 19 '05 #8

P: n/a
Daniel,
I was not familiar with the "showModelessDialog" method. This will do
exactly what I need it to do!
Thanks again,
John

"Daniel Walzenbach" wrote:
Here you go. I know this solution is not perfect but it's a start

..aspx
************************************************** ************************************************** **

<%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb"
Inherits="ATV2004.WebForm1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<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">
<LINK href="/ATV2004/css/Styles.css" type="text/css" rel="stylesheet">

<script language="javascript">
<!--

var hMD;

function showMD()
{
hMD = window.showModelessDialog("SaveDialog.htm", "SaveDialog",
"dialogHeight:100px; dialogWidth:200px; scroll:no; status:no; help:no;");
}

function closeMD()
{
// debugger;
if(hMD != null)
{
hMD.close();
}
}

//-->
</script>
</HEAD>
<body MS_POSITIONING="FlowLayout" onload="closeMD();">
<form id="Form1" method="post" runat="server" onsubmit="showMD();">
<asp:Button id="Button3" runat="server" Text="Button"></asp:Button>
</form>
</body>
</HTML>
codebehind
************************************************** ************************************************** **

Public Class WebForm1
Inherits System.Web.UI.Page

#Region " Vom Web Form Designer generierter Code "

'Dieser Aufruf ist für den Web Form-Designer erforderlich.

<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

End Sub

Protected WithEvents Button1 As System.Web.UI.WebControls.Button

Protected WithEvents Button2 As System.Web.UI.WebControls.Button

Protected WithEvents Button3 As System.Web.UI.WebControls.Button

'HINWEIS: Die folgende Platzhalterdeklaration ist für den Web Form-Designer
erforderlich.

'Nicht löschen oder verschieben.

Private designerPlaceholderDeclaration As System.Object

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init

'CODEGEN: Dieser Methodenaufruf ist für den Web Form-Designer erforderlich

'Verwenden Sie nicht den Code-Editor zur Bearbeitung.

InitializeComponent()

End Sub

#End Region

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

' Hier Benutzercode zur Seiteninitialisierung einfügen

End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button3.Click

System.Threading.Thread.Sleep(5000)

End Sub

End Class


"John Walker" <Jo********@discussions.microsoft.com> schrieb im Newsbeitrag
news:CB**********************************@microsof t.com...
Hi,
I have a datagrid with a radiobutton template column, with AutoPostBack
set
to TRUE. When the user clicks on a radiobutton the application will
PostBack, and in the PostBack there will be certain logic performed, and
the
dataview will be re-binded to the datagrid. There turns out to be about
2-5
seconds delay between the time the user clicks the radiobutton and when
the
page is completely re-loaded. During this time the user may try clicking
into other controls unaware that the page is being refreshed, so what I'd
like to have happen is as soon as they click on the radiobutton I'll have
a
popup window that states for them "to please wait..", and when the page is
finished re-loading have the popup window close. I tried doing this with
javascript and window.open and window.close but could not get it working.
Does anybody have a suggestion, or possibly sample code?

Thanks,
John


Nov 19 '05 #9

P: n/a
great :-)
"John Walker" <Jo********@discussions.microsoft.com> schrieb im Newsbeitrag
news:12**********************************@microsof t.com...
Daniel,
I was not familiar with the "showModelessDialog" method. This will do
exactly what I need it to do!
Thanks again,
John

"Daniel Walzenbach" wrote:
Here you go. I know this solution is not perfect but it's a start

..aspx
************************************************** ************************************************** **

<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="WebForm1.aspx.vb"
Inherits="ATV2004.WebForm1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<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">
<LINK href="/ATV2004/css/Styles.css" type="text/css" rel="stylesheet">

<script language="javascript">
<!--

var hMD;

function showMD()
{
hMD = window.showModelessDialog("SaveDialog.htm", "SaveDialog",
"dialogHeight:100px; dialogWidth:200px; scroll:no; status:no; help:no;");
}

function closeMD()
{
// debugger;
if(hMD != null)
{
hMD.close();
}
}

//-->
</script>
</HEAD>
<body MS_POSITIONING="FlowLayout" onload="closeMD();">
<form id="Form1" method="post" runat="server" onsubmit="showMD();">
<asp:Button id="Button3" runat="server" Text="Button"></asp:Button>
</form>
</body>
</HTML>
codebehind
************************************************** ************************************************** **

Public Class WebForm1
Inherits System.Web.UI.Page

#Region " Vom Web Form Designer generierter Code "

'Dieser Aufruf ist für den Web Form-Designer erforderlich.

<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()

End Sub

Protected WithEvents Button1 As System.Web.UI.WebControls.Button

Protected WithEvents Button2 As System.Web.UI.WebControls.Button

Protected WithEvents Button3 As System.Web.UI.WebControls.Button

'HINWEIS: Die folgende Platzhalterdeklaration ist für den Web
Form-Designer
erforderlich.

'Nicht löschen oder verschieben.

Private designerPlaceholderDeclaration As System.Object

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init

'CODEGEN: Dieser Methodenaufruf ist für den Web Form-Designer
erforderlich

'Verwenden Sie nicht den Code-Editor zur Bearbeitung.

InitializeComponent()

End Sub

#End Region

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

' Hier Benutzercode zur Seiteninitialisierung einfügen

End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button3.Click

System.Threading.Thread.Sleep(5000)

End Sub

End Class


"John Walker" <Jo********@discussions.microsoft.com> schrieb im
Newsbeitrag
news:CB**********************************@microsof t.com...
> Hi,
> I have a datagrid with a radiobutton template column, with AutoPostBack
> set
> to TRUE. When the user clicks on a radiobutton the application will
> PostBack, and in the PostBack there will be certain logic performed,
> and
> the
> dataview will be re-binded to the datagrid. There turns out to be
> about
> 2-5
> seconds delay between the time the user clicks the radiobutton and when
> the
> page is completely re-loaded. During this time the user may try
> clicking
> into other controls unaware that the page is being refreshed, so what
> I'd
> like to have happen is as soon as they click on the radiobutton I'll
> have
> a
> popup window that states for them "to please wait..", and when the page
> is
> finished re-loading have the popup window close. I tried doing this
> with
> javascript and window.open and window.close but could not get it
> working.
> Does anybody have a suggestion, or possibly sample code?
>
> Thanks,
> John
>


Nov 19 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.