T
Ted Ngo
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
txtSource.Focus();
frmMain.Visible = true;
divWait.Visible = false;
btnsubmit.Visible = true;
}
else
{
frmMain.Visible = false;
divWait.Visible = true;
btnsubmit.Visible = false;
LoadData();
}
}
private void LoadData()
{
//Do something
//Aftere do something
divWait.Visible = true;
}
<body bgColor=#ffffff leftMargin=0 topMargin=0 rightMargin=0
bottomMargin=0>
<form id="frmMain" Visible="False" runat="server">
<table id=tbl1 runat=server border=0 width=100%>
<tr>
<td width=20% class=lbltxt>
<asp:Label ID=Label1 Text="testone:"
runat=server></asp:Label>
</td>
<td class=lbltxt>
<asp:TextBox ID=txtSource Width=250px
runat=server></asp:TextBox>
</td>
</tr>
<tr>
<td colspan=2 class=lbltxt>
<asp:Button ID=btnsubmit runat=server
Text="Submit"/>
</td>
</tr>
</table>
</form>
<div id="divWait" style="display:none; font-weight: bold;
font-size: 12pt; color: navy; font-family: Verdana; background-color:
#ffff99;"
Visible="False" runat="server">
<center>
<span id="Span1">Please, wait ... </span>
</center>
</div>
</body>
</html>
When I click on the submit button, it go to the posk back, but it did
not hide the my Form, my submit button, and also it does not turn on
the div "DivWait". I show up on after the LoadData function finish.
Why?
I did try
mtaRefresh.Attributes.Add("http-equiv", "refresh")
mtaRefresh.Attributes.Add("content", "0;url=" & sRefreshURL)
but it still does not work;
Basicly I want to dispaly the wait message, when I data is loading at
all, and turn it off ater I done loading.
Please help.
{
if (!Page.IsPostBack)
{
txtSource.Focus();
frmMain.Visible = true;
divWait.Visible = false;
btnsubmit.Visible = true;
}
else
{
frmMain.Visible = false;
divWait.Visible = true;
btnsubmit.Visible = false;
LoadData();
}
}
private void LoadData()
{
//Do something
//Aftere do something
divWait.Visible = true;
}
<body bgColor=#ffffff leftMargin=0 topMargin=0 rightMargin=0
bottomMargin=0>
<form id="frmMain" Visible="False" runat="server">
<table id=tbl1 runat=server border=0 width=100%>
<tr>
<td width=20% class=lbltxt>
<asp:Label ID=Label1 Text="testone:"
runat=server></asp:Label>
</td>
<td class=lbltxt>
<asp:TextBox ID=txtSource Width=250px
runat=server></asp:TextBox>
</td>
</tr>
<tr>
<td colspan=2 class=lbltxt>
<asp:Button ID=btnsubmit runat=server
Text="Submit"/>
</td>
</tr>
</table>
</form>
<div id="divWait" style="display:none; font-weight: bold;
font-size: 12pt; color: navy; font-family: Verdana; background-color:
#ffff99;"
Visible="False" runat="server">
<center>
<span id="Span1">Please, wait ... </span>
</center>
</div>
</body>
</html>
When I click on the submit button, it go to the posk back, but it did
not hide the my Form, my submit button, and also it does not turn on
the div "DivWait". I show up on after the LoadData function finish.
Why?
I did try
mtaRefresh.Attributes.Add("http-equiv", "refresh")
mtaRefresh.Attributes.Add("content", "0;url=" & sRefreshURL)
but it still does not work;
Basicly I want to dispaly the wait message, when I data is loading at
all, and turn it off ater I done loading.
Please help.