Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx thread: can't control visibility of Web controls inside <DIV> tag


Message #1 by "Kan Yu Ting" <yu-ting.kan@p...> on Mon, 3 Jun 2002 04:36:21
Hi all,

I try to place a webcontrol (menu) within <DIV> tag and control its 
visibility with Javascript. however only static HTML code effected but not 
web control. Any help would be appreciated. Thanks a lot.

<%@ Register TagPrefix="cc1" Namespace="mintLab.webServerControls" 
Assembly="mlcMenu" %>
<%@ Control Language="c#" AutoEventWireup="false" 
Codebehind="PWR_TaskPanel.ascx.cs" 
Inherits="LoginAuth.UserControl.PWR_TaskPanel" 
TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
<div STYLE="Z-INDEX:1; LEFT:0px; VISIBILITY:hidden; POSITION:absolute; 
TOP:0px" id="PWR_TaskPanel">
	<table border="0" cellspacing="0" cellpadding="0">
		<!--tr bgcolor="#F7F3EF"-->
		<tr bgcolor="#F7F3EF">
			<td>
				&nbsp;</td>
		</tr>
		<tr bgcolor="#F7F3EF">
			<td>
				<cc1:cMenu id="TaskPanelMenu" 
runat="server" XmlDataFileName="../Login_PWRDBA.xml"></cc1:cMenu></td>
		</tr>
	</table>
</div>
Message #2 by Feduke Cntr Charles R <FedukeCR@m...> on Mon, 3 Jun 2002 09:05:18 -0400
	I've done similiar with style="visibility: hidden;".  When you look
at the source code of the HTML page, is the HTML code for the UserControl
inserted where you'd expect it, or is there nothing at all there (i.e. you
get "<td></td>")?  My guess would be that the div is being
RunAt="server"-ified and the visibility: hidden marks it as hidden in
ASP.NET (in other words for ASP.NET, don't bother rendering this because it
doesn't exist, just give me a reference to it).

- Chuck

-----Original Message-----
From: Kan Yu Ting [mailto:yu-ting.kan@p...]
Sent: Monday, June 03, 2002 12:36 AM
To: ASP+
Subject: [aspx] can't control visibility of Web controls inside <DIV>
tag


Hi all,

I try to place a webcontrol (menu) within <DIV> tag and control its 
visibility with Javascript. however only static HTML code effected but not 
web control. Any help would be appreciated. Thanks a lot.

<%@ Register TagPrefix="cc1" Namespace="mintLab.webServerControls" 
Assembly="mlcMenu" %>
<%@ Control Language="c#" AutoEventWireup="false" 
Codebehind="PWR_TaskPanel.ascx.cs" 
Inherits="LoginAuth.UserControl.PWR_TaskPanel" 
TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
<div STYLE="Z-INDEX:1; LEFT:0px; VISIBILITY:hidden; POSITION:absolute; 
TOP:0px" id="PWR_TaskPanel">
	<table border="0" cellspacing="0" cellpadding="0">
		<!--tr bgcolor="#F7F3EF"-->
		<tr bgcolor="#F7F3EF">
			<td>
				&nbsp;</td>
		</tr>
		<tr bgcolor="#F7F3EF">
			<td>
				<cc1:cMenu id="TaskPanelMenu" 
runat="server" XmlDataFileName="../Login_PWRDBA.xml"></cc1:cMenu></td>
		</tr>
	</table>
</div>

  Return to Index