473,414 Members | 1,876 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

Div section does not dispaly

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.

Oct 16 '06 #1
5 1631
The Visible property does not refer to the 'display' property of the 'style'
that you are setting.

Visible controls whether or not the HTML for the element is generated at
all. When it is false, that div won't even exist in the HTML on the client.
When it is visible, that HTML will be sent down.

However, you are setting the visibility on the client side by setting
"display: none", so it's not visible. You should stick to either toggling
the server side Visibility property of your div (which can change whether
HTML is generated for it), or you can do it on the client (in which case the
div will alway be there, but you can on the client control whether or not it
is visible).

"Ted Ngo" <nt******@yahoo.comwrote in message
news:11*********************@k70g2000cwa.googlegro ups.com...
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.

Oct 16 '06 #2
Hi

I also try this, but it still does not show: my P2 does not show up at
all.

<script>
function Validate()
{
document.getElementById("P2").style.visibility = "visible";
document.getElementById("btnsubmit").style.visibil ity =
"hidden";
document.getElementById("btnsubmit").style.display =
"none";

}

</script>

<form id="frmMain" runat="server">
<asp:Panel ID=P1 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>

</asp:Panel>

<asp:Panel ID=P2 runat=server visiable=false
<table id="Table1" runat=server>

<tr>
<td>
Please Wait ...1
</td>
</tr>
</table>
</asp:Panel>

</asp:Panel>

<asp:Button ID=btnsubmit runat=server
Text="Submit"/>

protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{

}
else
{
CreateFile();
}

this.btnsubmit.Attributes.Add("onclick", "Validate()");
}


Marina Levit [MVP] wrote:
The Visible property does not refer to the 'display' property of the 'style'
that you are setting.

Visible controls whether or not the HTML for the element is generated at
all. When it is false, that div won't even exist in the HTML on the client.
When it is visible, that HTML will be sent down.

However, you are setting the visibility on the client side by setting
"display: none", so it's not visible. You should stick to either toggling
the server side Visibility property of your div (which can change whether
HTML is generated for it), or you can do it on the client (in which case the
div will alway be there, but you can on the client control whether or not it
is visible).

"Ted Ngo" <nt******@yahoo.comwrote in message
news:11*********************@k70g2000cwa.googlegro ups.com...
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.
Oct 17 '06 #3
There is no such thing as
style.visibility = "visible";

Use
document.getElementById("P2").style.display = "inline";

George

"Ted Ngo" <nt******@yahoo.comwrote in message
news:11*********************@b28g2000cwb.googlegro ups.com...
Hi

I also try this, but it still does not show: my P2 does not show up at
all.

<script>
function Validate()
{
document.getElementById("P2").style.visibility = "visible";
document.getElementById("btnsubmit").style.visibil ity =
"hidden";
document.getElementById("btnsubmit").style.display =
"none";

}

</script>

<form id="frmMain" runat="server">
<asp:Panel ID=P1 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>


</asp:Panel>

<asp:Panel ID=P2 runat=server visiable=false
<table id="Table1" runat=server>

<tr>
<td>
Please Wait ...1
</td>
</tr>
</table>
</asp:Panel>

</asp:Panel>

<asp:Button ID=btnsubmit runat=server
Text="Submit"/>


protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{

}
else
{
CreateFile();
}

this.btnsubmit.Attributes.Add("onclick", "Validate()");
}


Marina Levit [MVP] wrote:
>The Visible property does not refer to the 'display' property of the
'style'
that you are setting.

Visible controls whether or not the HTML for the element is generated at
all. When it is false, that div won't even exist in the HTML on the
client.
When it is visible, that HTML will be sent down.

However, you are setting the visibility on the client side by setting
"display: none", so it's not visible. You should stick to either
toggling
the server side Visibility property of your div (which can change whether
HTML is generated for it), or you can do it on the client (in which case
the
div will alway be there, but you can on the client control whether or not
it
is visible).

"Ted Ngo" <nt******@yahoo.comwrote in message
news:11*********************@k70g2000cwa.googlegr oups.com...
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.

Oct 17 '06 #4
Hi George,

Actually, visibility is defined in CSS2 according to this document:

visibility style attribute on MSDN:
http://msdn.microsoft.com/library/de...visibility.asp

--
Dave Sexton

"George Ter-Saakov" <gt****@cardone.comwrote in message news:%2****************@TK2MSFTNGP04.phx.gbl...
There is no such thing as
style.visibility = "visible";

Use
document.getElementById("P2").style.display = "inline";

George

"Ted Ngo" <nt******@yahoo.comwrote in message news:11*********************@b28g2000cwb.googlegro ups.com...
>Hi

I also try this, but it still does not show: my P2 does not show up at
all.

<script>
function Validate()
{
document.getElementById("P2").style.visibility = "visible";
document.getElementById("btnsubmit").style.visibil ity =
"hidden";
document.getElementById("btnsubmit").style.display =
"none";

}

</script>

<form id="frmMain" runat="server">
<asp:Panel ID=P1 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>


</asp:Panel>

<asp:Panel ID=P2 runat=server visiable=false
<table id="Table1" runat=server>

<tr>
<td>
Please Wait ...1
</td>
</tr>
</table>
</asp:Panel>

</asp:Panel>

<asp:Button ID=btnsubmit runat=server
>Text="Submit"/>


protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{

}
else
{
CreateFile();
}

this.btnsubmit.Attributes.Add("onclick", "Validate()");
}


Marina Levit [MVP] wrote:
>>The Visible property does not refer to the 'display' property of the 'style'
that you are setting.

Visible controls whether or not the HTML for the element is generated at
all. When it is false, that div won't even exist in the HTML on the client.
When it is visible, that HTML will be sent down.

However, you are setting the visibility on the client side by setting
"display: none", so it's not visible. You should stick to either toggling
the server side Visibility property of your div (which can change whether
HTML is generated for it), or you can do it on the client (in which case the
div will alway be there, but you can on the client control whether or not it
is visible).

"Ted Ngo" <nt******@yahoo.comwrote in message
news:11*********************@k70g2000cwa.googleg roups.com...
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.


Oct 18 '06 #5
Hi Ted,

I believe that Marina already answered this for you.

You told the browser to make P2 visible by using javascript:

document.getElementById("P2").style.visibility = "visible";

But the browser is never even receiving the P2 html because of the Visible attribute in the server declaration:

<asp:Panel ID=P2 runat=server visiable=false

(which, BTW, is invalid html and won't compile. visiable should be visible, and you forgot the closing ">")

As Marina stated, you can have it only one way or the other. Either visibility is controlled via the Visible=false attribute in the
server tag, in which case the browser will never receive the P2 markup, or you can leave Visible=true on the server tag and use CSS
on the client-side to control visibility via the style's "visibility" or "display" attributes.

--
Dave Sexton

"Ted Ngo" <nt******@yahoo.comwrote in message news:11*********************@b28g2000cwb.googlegro ups.com...
Hi

I also try this, but it still does not show: my P2 does not show up at
all.

<script>
function Validate()
{
document.getElementById("P2").style.visibility = "visible";
document.getElementById("btnsubmit").style.visibil ity =
"hidden";
document.getElementById("btnsubmit").style.display =
"none";

}

</script>

<form id="frmMain" runat="server">
<asp:Panel ID=P1 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>


</asp:Panel>

<asp:Panel ID=P2 runat=server visiable=false
<table id="Table1" runat=server>

<tr>
<td>
Please Wait ...1
</td>
</tr>
</table>
</asp:Panel>

</asp:Panel>

<asp:Button ID=btnsubmit runat=server
Text="Submit"/>


protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{

}
else
{
CreateFile();
}

this.btnsubmit.Attributes.Add("onclick", "Validate()");
}


Marina Levit [MVP] wrote:
>The Visible property does not refer to the 'display' property of the 'style'
that you are setting.

Visible controls whether or not the HTML for the element is generated at
all. When it is false, that div won't even exist in the HTML on the client.
When it is visible, that HTML will be sent down.

However, you are setting the visibility on the client side by setting
"display: none", so it's not visible. You should stick to either toggling
the server side Visibility property of your div (which can change whether
HTML is generated for it), or you can do it on the client (in which case the
div will alway be there, but you can on the client control whether or not it
is visible).

"Ted Ngo" <nt******@yahoo.comwrote in message
news:11*********************@k70g2000cwa.googlegr oups.com...
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.

Oct 18 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Duncan Jones | last post by:
I'm having some problems placing a table in a section. The problem seems to arise when I have a small section within a section, and then try to place a table in the outer section afterwards. ...
3
by: Tjerk Wolterink | last post by:
Why o Why does a browser treat this xml file as an xhtml file. <!DOCTYPE xc:content > <xc:xcontent xmlns:xc="http://www.wolterinkwebdesign.com/xml/xcontent"...
1
by: hullyi | last post by:
i have 2 frames one is a header with a menu and the other one is for dispaly, i want that all the aspx forms will be displayed in that frame even if i use 'response.redirecty' action
6
by: Tabi | last post by:
Hi, I want to create a custom section in my web.config that can hold my custom values. I created a section in web.config as written below. <configSections> <section name="myCustomSection"...
0
by: Ted Ngo | last post by:
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { txtSource.Focus(); frmMain.Visible = true; divWait.Visible = false; btnsubmit.Visible = true;
9
by: vsraot | last post by:
Hi, How to dispaly two dicimal points in java (Example 1) 5.70 Example 2) 561 but it should display as 561.00) Example1) Here I am able to display 5.7 but it should display as 5.70 Example...
1
by: Dheeraj Gupta | last post by:
Hi all, actully i made one jsp and from there i have sended request in Ajax object for getting an XML file, that file i can see it by responseText property of Ajax but whenever i use responseXML...
0
by: ARCHANAA | last post by:
hi, i m using asp.net ,oracle10g. my os is windows xp . i m also using office 2003 . in my application i want to dispaly data from an excel file to datagrid in asp.net page send me an...
1
by: sunilkumar123 | last post by:
sir, i am getting problem to dispaly 10 rows at my page and the next 10 record at next page and if you want to come back to previous page
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.