473,399 Members | 3,106 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,399 software developers and data experts.

xml control visibility

-D-
How can I turn the visibility of the xml control on or off?

<%@ Control Language="c#" AutoEventWireup="false"
Codebehind="TopNavBar.ascx.cs" Inherits="compass.user_controls.TopNavBar"
TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
<table cellSpacing="0" cellPadding="0" border="0">
<colgroup span="1" align="left" width="50%">
</colgroup>
<colgroup span="1" align="right" width="50%">
</colgroup>
<tr>
<td>
<asp:Xml Runat="server" DocumentSource="../sitemap.xml"
TransformSource="../topnavigationbar.xslt"
id="Xml1"></asp:Xml>
</td>
<td>
<form style="MARGIN: 0px" name="frmSearch" action="search.asp"
method="post">
Search <input type="text" size="25" name="txtQuery"> <A
href="javascript:document.frmSearch.submit()">
<IMG src="images/go.gif" align="absMiddle" border="0"></A>
</form>
</td>
</tr>
</table>

This is the code behind:

namespace compass.user_controls
{
using System;
using System.Collections;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Xml;
using compass.ClassFiles;

/// <summary>
/// Summary description for TopNavBar.
/// </summary>
public class TopNavBar : System.Web.UI.UserControl
{
protected System.Web.UI.WebControls.Xml Xml1;
protected System.Web.UI.WebControls.Repeater Repeater1;

private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here

}

#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}

/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);

}
#endregion
}
}

Also, the xslt file generates an unordered list. Is there a way to set the
visibility for one of the list items on or off in the code behind?

For example, if five list items are displaying and I want to hide the
visibility of one of the items, is there a way to do this?
Jun 30 '06 #1
11 2590
Hello -D-,

Xml control has Visible property that can be set in True/False

-> How can I turn the visibility of the xml control on or off?
->
-> <%@ Control Language="c#" AutoEventWireup="false"
-> Codebehind="TopNavBar.ascx.cs"
-> Inherits="compass.user_controls.TopNavBar"
-> TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
-> <table cellSpacing="0" cellPadding="0" border="0">
-> <colgroup span="1" align="left" width="50%">
-> </colgroup>
-> <colgroup span="1" align="right" width="50%">
-> </colgroup>
-> <tr>
-> <td>
-> <asp:Xml Runat="server" DocumentSource="../sitemap.xml"
-> TransformSource="../topnavigationbar.xslt"
-> id="Xml1"></asp:Xml>
-> </td>
-> <td>
-> <form style="MARGIN: 0px" name="frmSearch" action="search.asp"
-> method="post">
-> Search <input type="text" size="25" name="txtQuery"> <A
-> href="javascript:document.frmSearch.submit()">
-> <IMG src="images/go.gif" align="absMiddle" border="0"></A>
-> </form>
-> </td>
-> </tr>
-> </table>
-> This is the code behind:
->
-> namespace compass.user_controls
-> {
-> using System;
-> using System.Collections;
-> using System.Data;
-> using System.Drawing;
-> using System.Web;
-> using System.Web.UI.WebControls;
-> using System.Web.UI.HtmlControls;
-> using System.Xml;
-> using compass.ClassFiles;
-> /// <summary>
-> /// Summary description for TopNavBar.
-> /// </summary>
-> public class TopNavBar : System.Web.UI.UserControl
-> {
-> protected System.Web.UI.WebControls.Xml Xml1;
-> protected System.Web.UI.WebControls.Repeater Repeater1;
-> private void Page_Load(object sender, System.EventArgs e)
-> {
-> // Put user code to initialize the page here
-> }
->
-> #region Web Form Designer generated code
-> override protected void OnInit(EventArgs e)
-> {
-> //
-> // CODEGEN: This call is required by the ASP.NET Web Form
-> Designer.
-> //
-> InitializeComponent();
-> base.OnInit(e);
-> }
-> /// <summary>
-> /// Required method for Designer support - do not modify
-> /// the contents of this method with the code editor.
-> /// </summary>
-> private void InitializeComponent()
-> {
-> this.Load += new System.EventHandler(this.Page_Load);
-> }
-> #endregion
-> }
-> }
-> Also, the xslt file generates an unordered list. Is there a way to
-> set the visibility for one of the list items on or off in the code
-> behind?
->
-> For example, if five list items are displaying and I want to hide the
-> visibility of one of the items, is there a way to do this?
->
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Jun 30 '06 #2
-D-
Michael,

Thanks for the info. I'm using the xml control within a user control that I
have placed in all my pages. On some of the pages, I want to turn the
visibility of the xml control to false.

How would I specify the xml control visibility in my aspx pages, so that I
can control the visibility independently for each one of my pages?

Thanks,
-D-

"Michael Nemtsev" <ne*****@msn.com> wrote in message
news:17***************************@msnews.microsof t.com...
Hello -D-,

Xml control has Visible property that can be set in True/False

-> How can I turn the visibility of the xml control on or off?
->
-> <%@ Control Language="c#" AutoEventWireup="false"
-> Codebehind="TopNavBar.ascx.cs"
-> Inherits="compass.user_controls.TopNavBar"
-> TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
-> <table cellSpacing="0" cellPadding="0" border="0">
-> <colgroup span="1" align="left" width="50%">
-> </colgroup>
-> <colgroup span="1" align="right" width="50%">
-> </colgroup>
-> <tr>
-> <td>
-> <asp:Xml Runat="server" DocumentSource="../sitemap.xml"
-> TransformSource="../topnavigationbar.xslt"
-> id="Xml1"></asp:Xml>
-> </td>
-> <td>
-> <form style="MARGIN: 0px" name="frmSearch" action="search.asp"
-> method="post">
-> Search <input type="text" size="25" name="txtQuery"> <A
-> href="javascript:document.frmSearch.submit()">
-> <IMG src="images/go.gif" align="absMiddle" border="0"></A>
-> </form>
-> </td>
-> </tr>
-> </table>
-> This is the code behind:
->
-> namespace compass.user_controls
-> {
-> using System;
-> using System.Collections;
-> using System.Data;
-> using System.Drawing;
-> using System.Web;
-> using System.Web.UI.WebControls;
-> using System.Web.UI.HtmlControls;
-> using System.Xml;
-> using compass.ClassFiles;
-> /// <summary>
-> /// Summary description for TopNavBar.
-> /// </summary>
-> public class TopNavBar : System.Web.UI.UserControl
-> {
-> protected System.Web.UI.WebControls.Xml Xml1;
-> protected System.Web.UI.WebControls.Repeater Repeater1;
-> private void Page_Load(object sender, System.EventArgs e)
-> {
-> // Put user code to initialize the page here
-> }
->
-> #region Web Form Designer generated code
-> override protected void OnInit(EventArgs e)
-> {
-> //
-> // CODEGEN: This call is required by the ASP.NET Web Form
-> Designer.
-> //
-> InitializeComponent();
-> base.OnInit(e);
-> }
-> /// <summary>
-> /// Required method for Designer support - do not modify
-> /// the contents of this method with the code editor.
-> /// </summary>
-> private void InitializeComponent()
-> {
-> this.Load += new System.EventHandler(this.Page_Load);
-> }
-> #endregion
-> }
-> }
-> Also, the xslt file generates an unordered list. Is there a way to
-> set the visibility for one of the list items on or off in the code
-> behind?
->
-> For example, if five list items are displaying and I want to hide the
-> visibility of one of the items, is there a way to do this?
->
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not cease to be insipid." (c) Friedrich Nietzsche

Jun 30 '06 #3
Hello -D-,

<asp:Xml Runat="server" Visible=false ..>
BTW, if you open IE with you page you can call context menu and press ViewSource,
found with html tag (probably <div>) is responsible for you Xml control and
then use JS document.getcontrolbyid().style.display to contol you visibility
dynamically
-> Michael,
->
-> Thanks for the info. I'm using the xml control within a user control
-> that I have placed in all my pages. On some of the pages, I want to
-> turn the visibility of the xml control to false.
->
-> How would I specify the xml control visibility in my aspx pages, so
-> that I can control the visibility independently for each one of my
-> pages?
->
-> Thanks,
-> -D-
-> "Michael Nemtsev" <ne*****@msn.com> wrote in message
-> news:17***************************@msnews.microsof t.com...
->
Hello -D-,

Xml control has Visible property that can be set in True/False

-> How can I turn the visibility of the xml control on or off?
->
-> <%@ Control Language="c#" AutoEventWireup="false"
-> Codebehind="TopNavBar.ascx.cs"
-> Inherits="compass.user_controls.TopNavBar"
-> TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
-> <table cellSpacing="0" cellPadding="0" border="0">
-> <colgroup span="1" align="left" width="50%">
-> </colgroup>
-> <colgroup span="1" align="right" width="50%">
-> </colgroup>
-> <tr>
-> <td>
-> <asp:Xml Runat="server" DocumentSource="../sitemap.xml"
-> TransformSource="../topnavigationbar.xslt"
-> id="Xml1"></asp:Xml>
-> </td>
-> <td>
-> <form style="MARGIN: 0px" name="frmSearch" action="search.asp"
-> method="post">
-> Search <input type="text" size="25" name="txtQuery"> <A
-> href="javascript:document.frmSearch.submit()">
-> <IMG src="images/go.gif" align="absMiddle" border="0"></A>
-> </form>
-> </td>
-> </tr>
-> </table>
-> This is the code behind:
->
-> namespace compass.user_controls
-> {
-> using System;
-> using System.Collections;
-> using System.Data;
-> using System.Drawing;
-> using System.Web;
-> using System.Web.UI.WebControls;
-> using System.Web.UI.HtmlControls;
-> using System.Xml;
-> using compass.ClassFiles;
-> /// <summary>
-> /// Summary description for TopNavBar.
-> /// </summary>
-> public class TopNavBar : System.Web.UI.UserControl
-> {
-> protected System.Web.UI.WebControls.Xml Xml1;
-> protected System.Web.UI.WebControls.Repeater Repeater1;
-> private void Page_Load(object sender, System.EventArgs e)
-> {
-> // Put user code to initialize the page here
-> }
->
-> #region Web Form Designer generated code
-> override protected void OnInit(EventArgs e)
-> {
-> //
-> // CODEGEN: This call is required by the ASP.NET Web Form
-> Designer.
-> //
-> InitializeComponent();
-> base.OnInit(e);
-> }
-> /// <summary>
-> /// Required method for Designer support - do not modify
-> /// the contents of this method with the code editor.
-> /// </summary>
-> private void InitializeComponent()
-> {
-> this.Load += new System.EventHandler(this.Page_Load);
-> }
-> #endregion
-> }
-> }
-> Also, the xslt file generates an unordered list. Is there a way
to
-> set the visibility for one of the list items on or off in the code
-> behind?
->
-> For example, if five list items are displaying and I want to hide
the
-> visibility of one of the items, is there a way to do this?
->
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour
"At times one remains faithful to a cause only because its opponents
do
-> not
-> cease to be insipid." (c) Friedrich Nietzsche

---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Jun 30 '06 #4
-D-
Thanks Michael,

I was looking for an id in the source to contol the visibility dynamically.
I checked the view source for the list items:

<?xml version="1.0" encoding="utf-8"?><ul><li><a
href="index.aspx">Home</a></li><li><a href="/about_us/index.aspx">About
Us</a></li><li><a href="contact.aspx">Contact Us</a></li><li><a
href="http://support.compasslearning.com">Customer Support</a></li><li><a
href="sitemap.aspx">Site Map</a></li></ul>

Should an id be generated automatically for the unordered list? Or, do I
need to specify one in the control?

"Michael Nemtsev" <ne*****@msn.com> wrote in message
news:17***************************@msnews.microsof t.com...
Hello -D-,

<asp:Xml Runat="server" Visible=false ..>
BTW, if you open IE with you page you can call context menu and press ViewSource, found with html tag (probably <div>) is responsible for you Xml control and then use JS document.getcontrolbyid().style.display to contol you visibility dynamically
-> Michael,
->
-> Thanks for the info. I'm using the xml control within a user control
-> that I have placed in all my pages. On some of the pages, I want to
-> turn the visibility of the xml control to false.
->
-> How would I specify the xml control visibility in my aspx pages, so
-> that I can control the visibility independently for each one of my
-> pages?
->
-> Thanks,
-> -D-
-> "Michael Nemtsev" <ne*****@msn.com> wrote in message
-> news:17***************************@msnews.microsof t.com...
->
Hello -D-,

Xml control has Visible property that can be set in True/False

-> How can I turn the visibility of the xml control on or off?
->
-> <%@ Control Language="c#" AutoEventWireup="false"
-> Codebehind="TopNavBar.ascx.cs"
-> Inherits="compass.user_controls.TopNavBar"
-> TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
-> <table cellSpacing="0" cellPadding="0" border="0">
-> <colgroup span="1" align="left" width="50%">
-> </colgroup>
-> <colgroup span="1" align="right" width="50%">
-> </colgroup>
-> <tr>
-> <td>
-> <asp:Xml Runat="server" DocumentSource="../sitemap.xml"
-> TransformSource="../topnavigationbar.xslt"
-> id="Xml1"></asp:Xml>
-> </td>
-> <td>
-> <form style="MARGIN: 0px" name="frmSearch" action="search.asp"
-> method="post">
-> Search <input type="text" size="25" name="txtQuery"> <A
-> href="javascript:document.frmSearch.submit()">
-> <IMG src="images/go.gif" align="absMiddle" border="0"></A>
-> </form>
-> </td>
-> </tr>
-> </table>
-> This is the code behind:
->
-> namespace compass.user_controls
-> {
-> using System;
-> using System.Collections;
-> using System.Data;
-> using System.Drawing;
-> using System.Web;
-> using System.Web.UI.WebControls;
-> using System.Web.UI.HtmlControls;
-> using System.Xml;
-> using compass.ClassFiles;
-> /// <summary>
-> /// Summary description for TopNavBar.
-> /// </summary>
-> public class TopNavBar : System.Web.UI.UserControl
-> {
-> protected System.Web.UI.WebControls.Xml Xml1;
-> protected System.Web.UI.WebControls.Repeater Repeater1;
-> private void Page_Load(object sender, System.EventArgs e)
-> {
-> // Put user code to initialize the page here
-> }
->
-> #region Web Form Designer generated code
-> override protected void OnInit(EventArgs e)
-> {
-> //
-> // CODEGEN: This call is required by the ASP.NET Web Form
-> Designer.
-> //
-> InitializeComponent();
-> base.OnInit(e);
-> }
-> /// <summary>
-> /// Required method for Designer support - do not modify
-> /// the contents of this method with the code editor.
-> /// </summary>
-> private void InitializeComponent()
-> {
-> this.Load += new System.EventHandler(this.Page_Load);
-> }
-> #endregion
-> }
-> }
-> Also, the xslt file generates an unordered list. Is there a way
to
-> set the visibility for one of the list items on or off in the code
-> behind?
->
-> For example, if five list items are displaying and I want to hide
the
-> visibility of one of the items, is there a way to do this?
->
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour
"At times one remains faithful to a cause only because its opponents
do
-> not
-> cease to be insipid." (c) Friedrich Nietzsche
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do

not cease to be insipid." (c) Friedrich Nietzsche

Jun 30 '06 #5
Hello -D-,

Have no wrapper for your xml control there.
In that case create <div> with ID around you XML control like

<div id="xmlDiv">
<asp:Xml Runat="server" DocumentSource="../sitemap.xml" TransformSource="../topnavigationbar.xslt"
id="Xml1"></asp:Xml>
</div>

and look for xmlDiv in you source, that will wrap you xml
-> Thanks Michael,
->
-> I was looking for an id in the source to contol the visibility
-> dynamically. I checked the view source for the list items:
->
-> <?xml version="1.0" encoding="utf-8"?><ul><li><a
-> href="index.aspx">Home</a></li><li><a
-> href="/about_us/index.aspx">About Us</a></li><li><a
-> href="contact.aspx">Contact Us</a></li><li><a
-> href="http://support.compasslearning.com">Customer
-> Support</a></li><li><a href="sitemap.aspx">Site Map</a></li></ul>
->
-> Should an id be generated automatically for the unordered list? Or,
-> do I need to specify one in the control?
->
-> "Michael Nemtsev" <ne*****@msn.com> wrote in message
-> news:17***************************@msnews.microsof t.com...
->
Hello -D-,

<asp:Xml Runat="server" Visible=false ..>
BTW, if you open IE with you page you can call context menu and press -> ViewSource,
-> found with html tag (probably <div>) is responsible for you Xml
control
-> and
-> then use JS document.getcontrolbyid().style.display to contol you
-> visibility
-> dynamically

-> Michael,
->
-> Thanks for the info. I'm using the xml control within a user
control
-> that I have placed in all my pages. On some of the pages, I want
to
-> turn the visibility of the xml control to false.
->
-> How would I specify the xml control visibility in my aspx pages,
so
-> that I can control the visibility independently for each one of my
-> pages?
->
-> Thanks,
-> -D-
-> "Michael Nemtsev" <ne*****@msn.com> wrote in message
-> news:17***************************@msnews.microsof t.com...
->
Hello -D-,

Xml control has Visible property that can be set in True/False

-> How can I turn the visibility of the xml control on or off?
->
-> <%@ Control Language="c#" AutoEventWireup="false"
-> Codebehind="TopNavBar.ascx.cs"
-> Inherits="compass.user_controls.TopNavBar"
-> TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
-> <table cellSpacing="0" cellPadding="0" border="0">
-> <colgroup span="1" align="left" width="50%">
-> </colgroup>
-> <colgroup span="1" align="right" width="50%">
-> </colgroup>
-> <tr>
-> <td>
-> <asp:Xml Runat="server" DocumentSource="../sitemap.xml"
-> TransformSource="../topnavigationbar.xslt"
-> id="Xml1"></asp:Xml>
-> </td>
-> <td>
-> <form style="MARGIN: 0px" name="frmSearch" action="search.asp"
-> method="post">
-> Search <input type="text" size="25" name="txtQuery"> <A
-> href="javascript:document.frmSearch.submit()">
-> <IMG src="images/go.gif" align="absMiddle" border="0"></A>
-> </form>
-> </td>
-> </tr>
-> </table>
-> This is the code behind:
->
-> namespace compass.user_controls
-> {
-> using System;
-> using System.Collections;
-> using System.Data;
-> using System.Drawing;
-> using System.Web;
-> using System.Web.UI.WebControls;
-> using System.Web.UI.HtmlControls;
-> using System.Xml;
-> using compass.ClassFiles;
-> /// <summary>
-> /// Summary description for TopNavBar.
-> /// </summary>
-> public class TopNavBar : System.Web.UI.UserControl
-> {
-> protected System.Web.UI.WebControls.Xml Xml1;
-> protected System.Web.UI.WebControls.Repeater Repeater1;
-> private void Page_Load(object sender, System.EventArgs e)
-> {
-> // Put user code to initialize the page here
-> }
->
-> #region Web Form Designer generated code
-> override protected void OnInit(EventArgs e)
-> {
-> //
-> // CODEGEN: This call is required by the ASP.NET Web Form
-> Designer.
-> //
-> InitializeComponent();
-> base.OnInit(e);
-> }
-> /// <summary>
-> /// Required method for Designer support - do not modify
-> /// the contents of this method with the code editor.
-> /// </summary>
-> private void InitializeComponent()
-> {
-> this.Load += new System.EventHandler(this.Page_Load);
-> }
-> #endregion
-> }
-> }
-> Also, the xslt file generates an unordered list. Is there a way
to
-> set the visibility for one of the list items on or off in the
code
-> behind?
->
-> For example, if five list items are displaying and I want to
hide
the
-> visibility of one of the items, is there a way to do this?
->


---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Jul 1 '06 #6
-D-
Hello Michael,

Thanks for the help. Okay, that works. I can turn the visibility of the
entire control on or off independently for specific pages. Is there a way
to control the visibility of a specific list item?

For example the xml control displays an unordered list with 5 list items.
So, on certain pages, I want to only show 4 of the 5 list items. Based on
your example, I'd need a different id for every <li> tag. How can I set an
id for each <li> tag? Is there a way to do that? Can I modify my xml/xslt
pages to add the id?

I really appreciate your help.

-D-
"Michael Nemtsev" <ne*****@msn.com> wrote in message
news:17***************************@msnews.microsof t.com...
Hello -D-,

Have no wrapper for your xml control there.
In that case create <div> with ID around you XML control like

<div id="xmlDiv">
<asp:Xml Runat="server" DocumentSource="../sitemap.xml" TransformSource="../topnavigationbar.xslt" id="Xml1"></asp:Xml>
</div>

and look for xmlDiv in you source, that will wrap you xml
-> Thanks Michael,
->
-> I was looking for an id in the source to contol the visibility
-> dynamically. I checked the view source for the list items:
->
-> <?xml version="1.0" encoding="utf-8"?><ul><li><a
-> href="index.aspx">Home</a></li><li><a
-> href="/about_us/index.aspx">About Us</a></li><li><a
-> href="contact.aspx">Contact Us</a></li><li><a
-> href="http://support.compasslearning.com">Customer
-> Support</a></li><li><a href="sitemap.aspx">Site Map</a></li></ul>
->
-> Should an id be generated automatically for the unordered list? Or,
-> do I need to specify one in the control?
->
-> "Michael Nemtsev" <ne*****@msn.com> wrote in message
-> news:17***************************@msnews.microsof t.com...
->
Hello -D-,

<asp:Xml Runat="server" Visible=false ..>
BTW, if you open IE with you page you can call context menu and press -> ViewSource,
-> found with html tag (probably <div>) is responsible for you Xml
control
-> and
-> then use JS document.getcontrolbyid().style.display to contol you
-> visibility
-> dynamically

-> Michael,
->
-> Thanks for the info. I'm using the xml control within a user
control
-> that I have placed in all my pages. On some of the pages, I want
to
-> turn the visibility of the xml control to false.
->
-> How would I specify the xml control visibility in my aspx pages,
so
-> that I can control the visibility independently for each one of my
-> pages?
->
-> Thanks,
-> -D-
-> "Michael Nemtsev" <ne*****@msn.com> wrote in message
-> news:17***************************@msnews.microsof t.com...
->
> Hello -D-,
>
> Xml control has Visible property that can be set in True/False
>
> -> How can I turn the visibility of the xml control on or off?
> ->
> -> <%@ Control Language="c#" AutoEventWireup="false"
> -> Codebehind="TopNavBar.ascx.cs"
> -> Inherits="compass.user_controls.TopNavBar"
> -> TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
> -> <table cellSpacing="0" cellPadding="0" border="0">
> -> <colgroup span="1" align="left" width="50%">
> -> </colgroup>
> -> <colgroup span="1" align="right" width="50%">
> -> </colgroup>
> -> <tr>
> -> <td>
> -> <asp:Xml Runat="server" DocumentSource="../sitemap.xml"
> -> TransformSource="../topnavigationbar.xslt"
> -> id="Xml1"></asp:Xml>
> -> </td>
> -> <td>
> -> <form style="MARGIN: 0px" name="frmSearch" action="search.asp"
> -> method="post">
> -> Search <input type="text" size="25" name="txtQuery"> <A
> -> href="javascript:document.frmSearch.submit()">
> -> <IMG src="images/go.gif" align="absMiddle" border="0"></A>
> -> </form>
> -> </td>
> -> </tr>
> -> </table>
> -> This is the code behind:
> ->
> -> namespace compass.user_controls
> -> {
> -> using System;
> -> using System.Collections;
> -> using System.Data;
> -> using System.Drawing;
> -> using System.Web;
> -> using System.Web.UI.WebControls;
> -> using System.Web.UI.HtmlControls;
> -> using System.Xml;
> -> using compass.ClassFiles;
> -> /// <summary>
> -> /// Summary description for TopNavBar.
> -> /// </summary>
> -> public class TopNavBar : System.Web.UI.UserControl
> -> {
> -> protected System.Web.UI.WebControls.Xml Xml1;
> -> protected System.Web.UI.WebControls.Repeater Repeater1;
> -> private void Page_Load(object sender, System.EventArgs e)
> -> {
> -> // Put user code to initialize the page here
> -> }
> ->
> -> #region Web Form Designer generated code
> -> override protected void OnInit(EventArgs e)
> -> {
> -> //
> -> // CODEGEN: This call is required by the ASP.NET Web Form
> -> Designer.
> -> //
> -> InitializeComponent();
> -> base.OnInit(e);
> -> }
> -> /// <summary>
> -> /// Required method for Designer support - do not modify
> -> /// the contents of this method with the code editor.
> -> /// </summary>
> -> private void InitializeComponent()
> -> {
> -> this.Load += new System.EventHandler(this.Page_Load);
> -> }
> -> #endregion
> -> }
> -> }
> -> Also, the xslt file generates an unordered list. Is there a way
> to
> -> set the visibility for one of the list items on or off in the
> code
> -> behind?
> ->
> -> For example, if five list items are displaying and I want to
> hide
> the
> -> visibility of one of the items, is there a way to do this?
> ->

---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do

not cease to be insipid." (c) Friedrich Nietzsche

Jul 1 '06 #7
Hello -D-,

Is that you form control? For that case you can set id for it, or try to
change your xslt

PS: could you post you project sample on some public places where it could
be downloaded to help u?

-Hello Michael,
->
-Thanks for the help. Okay, that works. I can turn the visibility of
-the entire control on or off independently for specific pages. Is
-there a way to control the visibility of a specific list item?
->
-For example the xml control displays an unordered list with 5 list
-items. So, on certain pages, I want to only show 4 of the 5 list
-items. Based on your example, I'd need a different id for every <li>
-tag. How can I set an id for each <litag? Is there a way to do
-that? Can I modify my xml/xslt pages to add the id?
->
-I really appreciate your help.
->
--D-
->
-"Michael Nemtsev" <ne*****@msn.comwrote in message
-news:17***************************@msnews.microsof t.com...
->
>Hello -D-,

Have no wrapper for your xml control there.
In that case create <divwith ID around you XML control like
<div id="xmlDiv">
<asp:Xml Runat="server" DocumentSource="../sitemap.xml"
-TransformSource="../topnavigationbar.xslt"
->
>id="Xml1"></asp:Xml>
</div>
and look for xmlDiv in you source, that will wrap you xml

-Thanks Michael,
->
-I was looking for an id in the source to contol the visibility
-dynamically. I checked the view source for the list items:
->
-<?xml version="1.0" encoding="utf-8"?><ul><li><a
-href="index.aspx">Home</a></li><li><a
-href="/about_us/index.aspx">About Us</a></li><li><a
-href="contact.aspx">Contact Us</a></li><li><a
-href="http://support.compasslearning.com">Customer
-Support</a></li><li><a href="sitemap.aspx">Site Map</a></li></ul>
->
-Should an id be generated automatically for the unordered list?
Or,
-do I need to specify one in the control?
->
-"Michael Nemtsev" <ne*****@msn.comwrote in message
-news:17***************************@msnews.microsof t.com...
->
>>>Hello -D-,

<asp:Xml Runat="server" Visible=false ..>
BTW, if you open IE with you page you can call context menu and
press
-ViewSource,
->
>>>found with html tag (probably <div>) is responsible for you Xml
control
-and
->
>>>then use JS document.getcontrolbyid().style.display to contol you
-visibility
->
>>>dynamically

-Michael,
->
-Thanks for the info. I'm using the xml control within a user
control
-that I have placed in all my pages. On some of the pages, I
want
to
-turn the visibility of the xml control to false.
->
-How would I specify the xml control visibility in my aspx pages,
so
-that I can control the visibility independently for each one of
my
-pages?
->
-Thanks,
--D-
-"Michael Nemtsev" <ne*****@msn.comwrote in message
-news:17***************************@msnews.microsof t.com...
->
>Hello -D-,
>>
>Xml control has Visible property that can be set in True/False
>>
>-How can I turn the visibility of the xml control on or off?
>->
>-<%@ Control Language="c#" AutoEventWireup="false"
>-Codebehind="TopNavBar.ascx.cs"
>-Inherits="compass.user_controls.TopNavBar"
>-TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
>-<table cellSpacing="0" cellPadding="0" border="0">
>-<colgroup span="1" align="left" width="50%">
>-</colgroup>
>-<colgroup span="1" align="right" width="50%">
>-</colgroup>
>-<tr>
>-<td>
>-<asp:Xml Runat="server" DocumentSource="../sitemap.xml"
>-TransformSource="../topnavigationbar.xslt"
>-id="Xml1"></asp:Xml>
>-</td>
>-<td>
>-<form style="MARGIN: 0px" name="frmSearch" action="search.asp"
>-method="post">
>-Search <input type="text" size="25" name="txtQuery"<A
>-href="javascript:document.frmSearch.submit()">
>-<IMG src="images/go.gif" align="absMiddle" border="0"></A>
>-</form>
>-</td>
>-</tr>
>-</table>
>-This is the code behind:
>->
>-namespace compass.user_controls
>-{
>-using System;
>-using System.Collections;
>-using System.Data;
>-using System.Drawing;
>-using System.Web;
>-using System.Web.UI.WebControls;
>-using System.Web.UI.HtmlControls;
>-using System.Xml;
>-using compass.ClassFiles;
>-/// <summary>
>-/// Summary description for TopNavBar.
>-/// </summary>
>-public class TopNavBar : System.Web.UI.UserControl
>-{
>-protected System.Web.UI.WebControls.Xml Xml1;
>-protected System.Web.UI.WebControls.Repeater Repeater1;
>-private void Page_Load(object sender, System.EventArgs e)
>-{
>-// Put user code to initialize the page here
>-}
>->
>-#region Web Form Designer generated code
>-override protected void OnInit(EventArgs e)
>-{
>-//
>-// CODEGEN: This call is required by the ASP.NET Web Form
>-Designer.
>-//
>-InitializeComponent();
>-base.OnInit(e);
>-}
>-/// <summary>
>-/// Required method for Designer support - do not modify
>-/// the contents of this method with the code editor.
>-/// </summary>
>-private void InitializeComponent()
>-{
>-this.Load += new System.EventHandler(this.Page_Load);
>-}
>-#endregion
>-}
>-}
>-Also, the xslt file generates an unordered list. Is there a
>way
>to
>-set the visibility for one of the list items on or off in the
>code
>-behind?
>->
>-For example, if five list items are displaying and I want to
>hide
>the
>-visibility of one of the items, is there a way to do this?
>->
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour
"At times one remains faithful to a cause only because its opponents
do
-not
->
>cease to be insipid." (c) Friedrich Nietzsche
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Jul 1 '06 #8
-D-
Hi Michael,

Yes, here is a link to download the sample files:
http://www.dwayneepps.com/download.asp

I've included the xml file that defines the sitemap navigation (there might
be a better way to structure the hierarchy).
The xslt file that defines the top navigation menu.
The user control (topnavbar.ascx) that contains the xml control
and the index.aspx file that holds the different user controls.

I'm using my index file as a template, which I can duplicate for any page in
the site and turn on or off the different user controls depending on what
navigation I want to show for a specific page.

Also, as in my previous post, I want to control the individual menu items
and not just the control itself.

If I need to include any additional files, just let me know.

Thanks again for taking the time to help me out. I'm still very new to
asp.net and learning my way around.

Regards,
-D-
"Michael Nemtsev" <ne*****@msn.comwrote in message
news:17***************************@msnews.microsof t.com...
Hello -D-,

Is that you form control? For that case you can set id for it, or try to
change your xslt

PS: could you post you project sample on some public places where it could
be downloaded to help u?

-Hello Michael,
->
-Thanks for the help. Okay, that works. I can turn the visibility of
-the entire control on or off independently for specific pages. Is
-there a way to control the visibility of a specific list item?
->
-For example the xml control displays an unordered list with 5 list
-items. So, on certain pages, I want to only show 4 of the 5 list
-items. Based on your example, I'd need a different id for every <li>
-tag. How can I set an id for each <litag? Is there a way to do
-that? Can I modify my xml/xslt pages to add the id?
->
-I really appreciate your help.
->
--D-
->
-"Michael Nemtsev" <ne*****@msn.comwrote in message
-news:17***************************@msnews.microsof t.com...
->
Hello -D-,

Have no wrapper for your xml control there.
In that case create <divwith ID around you XML control like
<div id="xmlDiv">
<asp:Xml Runat="server" DocumentSource="../sitemap.xml"
-TransformSource="../topnavigationbar.xslt"
->
id="Xml1"></asp:Xml>
</div>
and look for xmlDiv in you source, that will wrap you xml

-Thanks Michael,
->
-I was looking for an id in the source to contol the visibility
-dynamically. I checked the view source for the list items:
->
-<?xml version="1.0" encoding="utf-8"?><ul><li><a
-href="index.aspx">Home</a></li><li><a
-href="/about_us/index.aspx">About Us</a></li><li><a
-href="contact.aspx">Contact Us</a></li><li><a
-href="http://support.compasslearning.com">Customer
-Support</a></li><li><a href="sitemap.aspx">Site Map</a></li></ul>
->
-Should an id be generated automatically for the unordered list?
Or,
-do I need to specify one in the control?
->
-"Michael Nemtsev" <ne*****@msn.comwrote in message
-news:17***************************@msnews.microsof t.com...
->
Hello -D-,

<asp:Xml Runat="server" Visible=false ..>
BTW, if you open IE with you page you can call context menu and
press
-ViewSource,
->
found with html tag (probably <div>) is responsible for you Xml
control

-and
->
then use JS document.getcontrolbyid().style.display to contol you

-visibility
->
dynamically

-Michael,
->
-Thanks for the info. I'm using the xml control within a user
control
-that I have placed in all my pages. On some of the pages, I
want
to
-turn the visibility of the xml control to false.
->
-How would I specify the xml control visibility in my aspx pages,
so
-that I can control the visibility independently for each one of
my
-pages?
->
-Thanks,
--D-
-"Michael Nemtsev" <ne*****@msn.comwrote in message
-news:17***************************@msnews.microsof t.com...
->
Hello -D-,
>
Xml control has Visible property that can be set in True/False
>
-How can I turn the visibility of the xml control on or off?
->
-<%@ Control Language="c#" AutoEventWireup="false"
-Codebehind="TopNavBar.ascx.cs"
-Inherits="compass.user_controls.TopNavBar"
-TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
-<table cellSpacing="0" cellPadding="0" border="0">
-<colgroup span="1" align="left" width="50%">
-</colgroup>
-<colgroup span="1" align="right" width="50%">
-</colgroup>
-<tr>
-<td>
-<asp:Xml Runat="server" DocumentSource="../sitemap.xml"
-TransformSource="../topnavigationbar.xslt"
-id="Xml1"></asp:Xml>
-</td>
-<td>
-<form style="MARGIN: 0px" name="frmSearch" action="search.asp"
-method="post">
-Search <input type="text" size="25" name="txtQuery"<A
-href="javascript:document.frmSearch.submit()">
-<IMG src="images/go.gif" align="absMiddle" border="0"></A>
-</form>
-</td>
-</tr>
-</table>
-This is the code behind:
->
-namespace compass.user_controls
-{
-using System;
-using System.Collections;
-using System.Data;
-using System.Drawing;
-using System.Web;
-using System.Web.UI.WebControls;
-using System.Web.UI.HtmlControls;
-using System.Xml;
-using compass.ClassFiles;
-/// <summary>
-/// Summary description for TopNavBar.
-/// </summary>
-public class TopNavBar : System.Web.UI.UserControl
-{
-protected System.Web.UI.WebControls.Xml Xml1;
-protected System.Web.UI.WebControls.Repeater Repeater1;
-private void Page_Load(object sender, System.EventArgs e)
-{
-// Put user code to initialize the page here
-}
->
-#region Web Form Designer generated code
-override protected void OnInit(EventArgs e)
-{
-//
-// CODEGEN: This call is required by the ASP.NET Web Form
-Designer.
-//
-InitializeComponent();
-base.OnInit(e);
-}
-/// <summary>
-/// Required method for Designer support - do not modify
-/// the contents of this method with the code editor.
-/// </summary>
-private void InitializeComponent()
-{
-this.Load += new System.EventHandler(this.Page_Load);
-}
-#endregion
-}
-}
-Also, the xslt file generates an unordered list. Is there a
way
to
-set the visibility for one of the list items on or off in the
code
-behind?
->
-For example, if five list items are displaying and I want to
hide
the
-visibility of one of the items, is there a way to do this?
->
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour
"At times one remains faithful to a cause only because its opponents
do
-not
->
cease to be insipid." (c) Friedrich Nietzsche
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do
not
cease to be insipid." (c) Friedrich Nietzsche


Jul 1 '06 #9
Hello -D-,

What the problem with adding ID tag for the <LI>?
-Hi Michael,
->
-Yes, here is a link to download the sample files:
-http://www.dwayneepps.com/download.asp
-I've included the xml file that defines the sitemap navigation (there
-might
-be a better way to structure the hierarchy).
-The xslt file that defines the top navigation menu.
-The user control (topnavbar.ascx) that contains the xml control
-and the index.aspx file that holds the different user controls.
-I'm using my index file as a template, which I can duplicate for any
-page in the site and turn on or off the different user controls
-depending on what navigation I want to show for a specific page.
->
-Also, as in my previous post, I want to control the individual menu
-items and not just the control itself.
->
-If I need to include any additional files, just let me know.
->
-Thanks again for taking the time to help me out. I'm still very new
-to asp.net and learning my way around.
->
-Regards,
--D-
-"Michael Nemtsev" <ne*****@msn.comwrote in message
-news:17***************************@msnews.microsof t.com...
->
>Hello -D-,

Is that you form control? For that case you can set id for it, or try
to change your xslt

PS: could you post you project sample on some public places where it
could be downloaded to help u?

-Hello Michael,
->
-Thanks for the help. Okay, that works. I can turn the visibility
of
-the entire control on or off independently for specific pages. Is
-there a way to control the visibility of a specific list item?
->
-For example the xml control displays an unordered list with 5 list
-items. So, on certain pages, I want to only show 4 of the 5 list
-items. Based on your example, I'd need a different id for every
<li>
-tag. How can I set an id for each <litag? Is there a way to do
-that? Can I modify my xml/xslt pages to add the id?
->
-I really appreciate your help.
->
--D-
->
-"Michael Nemtsev" <ne*****@msn.comwrote in message
-news:17***************************@msnews.microsof t.com...
->
>>>Hello -D-,

Have no wrapper for your xml control there.
In that case create <divwith ID around you XML control like
<div id="xmlDiv">
<asp:Xml Runat="server" DocumentSource="../sitemap.xml"
-TransformSource="../topnavigationbar.xslt"
->
>>>id="Xml1"></asp:Xml>
</div>
and look for xmlDiv in you source, that will wrap you xml
-Thanks Michael,
->
-I was looking for an id in the source to contol the visibility
-dynamically. I checked the view source for the list items:
->
-<?xml version="1.0" encoding="utf-8"?><ul><li><a
-href="index.aspx">Home</a></li><li><a
-href="/about_us/index.aspx">About Us</a></li><li><a
-href="contact.aspx">Contact Us</a></li><li><a
-href="http://support.compasslearning.com">Customer
-Support</a></li><li><a href="sitemap.aspx">Site
Map</a></li></ul>
->
-Should an id be generated automatically for the unordered list?
Or,
-do I need to specify one in the control?
->
-"Michael Nemtsev" <ne*****@msn.comwrote in message
-news:17***************************@msnews.microsof t.com...
->
>Hello -D-,
>>
><asp:Xml Runat="server" Visible=false ..>
>BTW, if you open IE with you page you can call context menu and
>press
-ViewSource,
->
>found with html tag (probably <div>) is responsible for you Xml
>control
>>
-and
->
>then use JS document.getcontrolbyid().style.display to contol you
>>
-visibility
->
>dynamically
>>
>-Michael,
>->
>-Thanks for the info. I'm using the xml control within a user
>control
>-that I have placed in all my pages. On some of the pages, I
>want
>to
>-turn the visibility of the xml control to false.
>->
>-How would I specify the xml control visibility in my aspx
>pages,
>so
>-that I can control the visibility independently for each one
>of
>my
>-pages?
>->
>-Thanks,
>--D-
>-"Michael Nemtsev" <ne*****@msn.comwrote in message
>-news:17***************************@msnews.microsof t.com...
>->
>>>Hello -D-,
>>>>
>>>Xml control has Visible property that can be set in True/False
>>>>
>>>-How can I turn the visibility of the xml control on or off?
>>>->
>>>-<%@ Control Language="c#" AutoEventWireup="false"
>>>-Codebehind="TopNavBar.ascx.cs"
>>>-Inherits="compass.user_controls.TopNavBar"
>>>->
>>>TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
>>>-<table cellSpacing="0" cellPadding="0" border="0">
>>>-<colgroup span="1" align="left" width="50%">
>>>-</colgroup>
>>>-<colgroup span="1" align="right" width="50%">
>>>-</colgroup>
>>>-<tr>
>>>-<td>
>>>-<asp:Xml Runat="server" DocumentSource="../sitemap.xml"
>>>-TransformSource="../topnavigationbar.xslt"
>>>-id="Xml1"></asp:Xml>
>>>-</td>
>>>-<td>
>>>-<form style="MARGIN: 0px" name="frmSearch"
>>>action="search.asp"
>>>-method="post">
>>>-Search <input type="text" size="25" name="txtQuery"<A
>>>-href="javascript:document.frmSearch.submit()">
>>>-<IMG src="images/go.gif" align="absMiddle" border="0"></A>
>>>-</form>
>>>-</td>
>>>-</tr>
>>>-</table>
>>>-This is the code behind:
>>>->
>>>-namespace compass.user_controls
>>>-{
>>>-using System;
>>>-using System.Collections;
>>>-using System.Data;
>>>-using System.Drawing;
>>>-using System.Web;
>>>-using System.Web.UI.WebControls;
>>>-using System.Web.UI.HtmlControls;
>>>-using System.Xml;
>>>-using compass.ClassFiles;
>>>-/// <summary>
>>>-/// Summary description for TopNavBar.
>>>-/// </summary>
>>>-public class TopNavBar : System.Web.UI.UserControl
>>>-{
>>>-protected System.Web.UI.WebControls.Xml Xml1;
>>>-protected System.Web.UI.WebControls.Repeater Repeater1;
>>>-private void Page_Load(object sender, System.EventArgs e)
>>>-{
>>>-// Put user code to initialize the page here
>>>-}
>>>->
>>>-#region Web Form Designer generated code
>>>-override protected void OnInit(EventArgs e)
>>>-{
>>>-//
>>>-// CODEGEN: This call is required by the ASP.NET Web Form
>>>-Designer.
>>>-//
>>>-InitializeComponent();
>>>-base.OnInit(e);
>>>-}
>>>-/// <summary>
>>>-/// Required method for Designer support - do not modify
>>>-/// the contents of this method with the code editor.
>>>-/// </summary>
>>>-private void InitializeComponent()
>>>-{
>>>-this.Load += new System.EventHandler(this.Page_Load);
>>>-}
>>>-#endregion
>>>-}
>>>-}
>>>-Also, the xslt file generates an unordered list. Is there a
>>>way
>>>to
>>>-set the visibility for one of the list items on or off in
>>>the
>>>code
>>>-behind?
>>>->
>>>-For example, if five list items are displaying and I want to
>>>hide
>>>the
>>>-visibility of one of the items, is there a way to do this?
>>>->
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour
"At times one remains faithful to a cause only because its
opponents
do
-not
->
>>>cease to be insipid." (c) Friedrich Nietzsche
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour
"At times one remains faithful to a cause only because its opponents
do
-not
->
>cease to be insipid." (c) Friedrich Nietzsche
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Jul 2 '06 #10
-D-
each <litag would need a different id. The xslt file generates the
unordered list, so I wasn't sure how to specify a different id for each <li>
tag so I can control it independently.
"Michael Nemtsev" <ne*****@msn.comwrote in message
news:17***************************@msnews.microsof t.com...
Hello -D-,

What the problem with adding ID tag for the <LI>?
-Hi Michael,
->
-Yes, here is a link to download the sample files:
-http://www.dwayneepps.com/download.asp
-I've included the xml file that defines the sitemap navigation (there
-might
-be a better way to structure the hierarchy).
-The xslt file that defines the top navigation menu.
-The user control (topnavbar.ascx) that contains the xml control
-and the index.aspx file that holds the different user controls.
-I'm using my index file as a template, which I can duplicate for any
-page in the site and turn on or off the different user controls
-depending on what navigation I want to show for a specific page.
->
-Also, as in my previous post, I want to control the individual menu
-items and not just the control itself.
->
-If I need to include any additional files, just let me know.
->
-Thanks again for taking the time to help me out. I'm still very new
-to asp.net and learning my way around.
->
-Regards,
--D-
-"Michael Nemtsev" <ne*****@msn.comwrote in message
-news:17***************************@msnews.microsof t.com...
->
Hello -D-,

Is that you form control? For that case you can set id for it, or try
to change your xslt

PS: could you post you project sample on some public places where it
could be downloaded to help u?

-Hello Michael,
->
-Thanks for the help. Okay, that works. I can turn the visibility
of
-the entire control on or off independently for specific pages. Is
-there a way to control the visibility of a specific list item?
->
-For example the xml control displays an unordered list with 5 list
-items. So, on certain pages, I want to only show 4 of the 5 list
-items. Based on your example, I'd need a different id for every
<li>
-tag. How can I set an id for each <litag? Is there a way to do
-that? Can I modify my xml/xslt pages to add the id?
->
-I really appreciate your help.
->
--D-
->
-"Michael Nemtsev" <ne*****@msn.comwrote in message
-news:17***************************@msnews.microsof t.com...
->
Hello -D-,

Have no wrapper for your xml control there.
In that case create <divwith ID around you XML control like
<div id="xmlDiv">
<asp:Xml Runat="server" DocumentSource="../sitemap.xml"
-TransformSource="../topnavigationbar.xslt"
->
id="Xml1"></asp:Xml>
</div>
and look for xmlDiv in you source, that will wrap you xml
-Thanks Michael,
->
-I was looking for an id in the source to contol the visibility
-dynamically. I checked the view source for the list items:
->
-<?xml version="1.0" encoding="utf-8"?><ul><li><a
-href="index.aspx">Home</a></li><li><a
-href="/about_us/index.aspx">About Us</a></li><li><a
-href="contact.aspx">Contact Us</a></li><li><a
-href="http://support.compasslearning.com">Customer
-Support</a></li><li><a href="sitemap.aspx">Site
Map</a></li></ul>
->
-Should an id be generated automatically for the unordered list?
Or,
-do I need to specify one in the control?
->
-"Michael Nemtsev" <ne*****@msn.comwrote in message
-news:17***************************@msnews.microsof t.com...
->
Hello -D-,
>
<asp:Xml Runat="server" Visible=false ..>
BTW, if you open IE with you page you can call context menu and
press
-ViewSource,
->
found with html tag (probably <div>) is responsible for you Xml
control
>
-and
->
then use JS document.getcontrolbyid().style.display to contol you
>
-visibility
->
dynamically
>
-Michael,
->
-Thanks for the info. I'm using the xml control within a user
control
-that I have placed in all my pages. On some of the pages, I
want
to
-turn the visibility of the xml control to false.
->
-How would I specify the xml control visibility in my aspx
pages,
so
-that I can control the visibility independently for each one
of
my
-pages?
->
-Thanks,
--D-
-"Michael Nemtsev" <ne*****@msn.comwrote in message
-news:17***************************@msnews.microsof t.com...
->
>>Hello -D-,
>>>
>>Xml control has Visible property that can be set in True/False
>>>
>>-How can I turn the visibility of the xml control on or off?
>>->
>>-<%@ Control Language="c#" AutoEventWireup="false"
>>-Codebehind="TopNavBar.ascx.cs"
>>-Inherits="compass.user_controls.TopNavBar"
>>->
>>TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
>>-<table cellSpacing="0" cellPadding="0" border="0">
>>-<colgroup span="1" align="left" width="50%">
>>-</colgroup>
>>-<colgroup span="1" align="right" width="50%">
>>-</colgroup>
>>-<tr>
>>-<td>
>>-<asp:Xml Runat="server" DocumentSource="../sitemap.xml"
>>-TransformSource="../topnavigationbar.xslt"
>>-id="Xml1"></asp:Xml>
>>-</td>
>>-<td>
>>-<form style="MARGIN: 0px" name="frmSearch"
>>action="search.asp"
>>-method="post">
>>-Search <input type="text" size="25" name="txtQuery"<A
>>-href="javascript:document.frmSearch.submit()">
>>-<IMG src="images/go.gif" align="absMiddle" border="0"></A>
>>-</form>
>>-</td>
>>-</tr>
>>-</table>
>>-This is the code behind:
>>->
>>-namespace compass.user_controls
>>-{
>>-using System;
>>-using System.Collections;
>>-using System.Data;
>>-using System.Drawing;
>>-using System.Web;
>>-using System.Web.UI.WebControls;
>>-using System.Web.UI.HtmlControls;
>>-using System.Xml;
>>-using compass.ClassFiles;
>>-/// <summary>
>>-/// Summary description for TopNavBar.
>>-/// </summary>
>>-public class TopNavBar : System.Web.UI.UserControl
>>-{
>>-protected System.Web.UI.WebControls.Xml Xml1;
>>-protected System.Web.UI.WebControls.Repeater Repeater1;
>>-private void Page_Load(object sender, System.EventArgs e)
>>-{
>>-// Put user code to initialize the page here
>>-}
>>->
>>-#region Web Form Designer generated code
>>-override protected void OnInit(EventArgs e)
>>-{
>>-//
>>-// CODEGEN: This call is required by the ASP.NET Web Form
>>-Designer.
>>-//
>>-InitializeComponent();
>>-base.OnInit(e);
>>-}
>>-/// <summary>
>>-/// Required method for Designer support - do not modify
>>-/// the contents of this method with the code editor.
>>-/// </summary>
>>-private void InitializeComponent()
>>-{
>>-this.Load += new System.EventHandler(this.Page_Load);
>>-}
>>-#endregion
>>-}
>>-}
>>-Also, the xslt file generates an unordered list. Is there a
>>way
>>to
>>-set the visibility for one of the list items on or off in
>>the
>>code
>>-behind?
>>->
>>-For example, if five list items are displaying and I want to
>>hide
>>the
>>-visibility of one of the items, is there a way to do this?
>>->
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour
"At times one remains faithful to a cause only because its
opponents
do
-not
->
cease to be insipid." (c) Friedrich Nietzsche

---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour
"At times one remains faithful to a cause only because its opponents
do
-not
->
cease to be insipid." (c) Friedrich Nietzsche
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do
not
cease to be insipid." (c) Friedrich Nietzsche


Jul 2 '06 #11
Hello -D-,

Why not to put in LI's ID page url/title? Thus your LI's will be unique

-each <litag would need a different id. The xslt file generates the
-unordered list, so I wasn't sure how to specify a different id for
-each <litag so I can control it independently.
->
-"Michael Nemtsev" <ne*****@msn.comwrote in message
-news:17***************************@msnews.microsof t.com...
->
>Hello -D-,

What the problem with adding ID tag for the <LI>?

-Hi Michael,
->
-Yes, here is a link to download the sample files:
-http://www.dwayneepps.com/download.asp
-I've included the xml file that defines the sitemap navigation
(there
-might
-be a better way to structure the hierarchy).
-The xslt file that defines the top navigation menu.
-The user control (topnavbar.ascx) that contains the xml control
-and the index.aspx file that holds the different user controls.
-I'm using my index file as a template, which I can duplicate for
any
-page in the site and turn on or off the different user controls
-depending on what navigation I want to show for a specific page.
->
-Also, as in my previous post, I want to control the individual
menu
-items and not just the control itself.
->
-If I need to include any additional files, just let me know.
->
-Thanks again for taking the time to help me out. I'm still very
new
-to asp.net and learning my way around.
->
-Regards,
--D-
-"Michael Nemtsev" <ne*****@msn.comwrote in message
-news:17***************************@msnews.microsof t.com...
->
>>>Hello -D-,

Is that you form control? For that case you can set id for it, or
try to change your xslt

PS: could you post you project sample on some public places where
it could be downloaded to help u?

-Hello Michael,
->
-Thanks for the help. Okay, that works. I can turn the
visibility
of
-the entire control on or off independently for specific pages.
Is
-there a way to control the visibility of a specific list item?
->
-For example the xml control displays an unordered list with 5
list
-items. So, on certain pages, I want to only show 4 of the 5 list
-items. Based on your example, I'd need a different id for every
<li>
-tag. How can I set an id for each <litag? Is there a way to
do
-that? Can I modify my xml/xslt pages to add the id?
->
-I really appreciate your help.
->
--D-
->
-"Michael Nemtsev" <ne*****@msn.comwrote in message
-news:17***************************@msnews.microsof t.com...
->
>Hello -D-,
>>
>Have no wrapper for your xml control there.
>In that case create <divwith ID around you XML control like
><div id="xmlDiv">
><asp:Xml Runat="server" DocumentSource="../sitemap.xml"
-TransformSource="../topnavigationbar.xslt"
->
>id="Xml1"></asp:Xml>
></div>
>and look for xmlDiv in you source, that will wrap you xml
>-Thanks Michael,
>->
>-I was looking for an id in the source to contol the visibility
>-dynamically. I checked the view source for the list items:
>->
>-<?xml version="1.0" encoding="utf-8"?><ul><li><a
>-href="index.aspx">Home</a></li><li><a
>-href="/about_us/index.aspx">About Us</a></li><li><a
>-href="contact.aspx">Contact Us</a></li><li><a
>-href="http://support.compasslearning.com">Customer
>-Support</a></li><li><a href="sitemap.aspx">Site
>Map</a></li></ul>
>->
>-Should an id be generated automatically for the unordered
>list?
>Or,
>-do I need to specify one in the control?
>->
>-"Michael Nemtsev" <ne*****@msn.comwrote in message
>-news:17***************************@msnews.microsof t.com...
>->
>>>Hello -D-,
>>>>
>>><asp:Xml Runat="server" Visible=false ..>
>>>BTW, if you open IE with you page you can call context menu and
>>>press
>-ViewSource,
>->
>>>found with html tag (probably <div>) is responsible for you Xml
>>>control
>>>>
>-and
>->
>>>then use JS document.getcontrolbyid().style.display to contol
>>>you
>>>>
>-visibility
>->
>>>dynamically
>>>>
>>>-Michael,
>>>->
>>>-Thanks for the info. I'm using the xml control within a
>>>user
>>>control
>>>-that I have placed in all my pages. On some of the pages, I
>>>want
>>>to
>>>-turn the visibility of the xml control to false.
>>>->
>>>-How would I specify the xml control visibility in my aspx
>>>pages,
>>>so
>>>-that I can control the visibility independently for each one
>>>of
>>>my
>>>-pages?
>>>->
>>>-Thanks,
>>>--D-
>>>-"Michael Nemtsev" <ne*****@msn.comwrote in message
>>>-news:17***************************@msnews.microsof t.com...
>>>->
>>>>>Hello -D-,
>>>>>>
>>>>>Xml control has Visible property that can be set in
>>>>>True/False
>>>>>>
>>>>>-How can I turn the visibility of the xml control on or
>>>>>off?
>>>>>->
>>>>>-<%@ Control Language="c#" AutoEventWireup="false"
>>>>>-Codebehind="TopNavBar.ascx.cs"
>>>>>-Inherits="compass.user_controls.TopNavBar"
>>>>>->
>>>>>TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%
>>>>>
>>>>>-<table cellSpacing="0" cellPadding="0" border="0">
>>>>>-<colgroup span="1" align="left" width="50%">
>>>>>-</colgroup>
>>>>>-<colgroup span="1" align="right" width="50%">
>>>>>-</colgroup>
>>>>>-<tr>
>>>>>-<td>
>>>>>-<asp:Xml Runat="server" DocumentSource="../sitemap.xml"
>>>>>-TransformSource="../topnavigationbar.xslt"
>>>>>-id="Xml1"></asp:Xml>
>>>>>-</td>
>>>>>-<td>
>>>>>-<form style="MARGIN: 0px" name="frmSearch"
>>>>>action="search.asp"
>>>>>-method="post">
>>>>>-Search <input type="text" size="25" name="txtQuery"<A
>>>>>-href="javascript:document.frmSearch.submit()">
>>>>>-<IMG src="images/go.gif" align="absMiddle" border="0"></A>
>>>>>-</form>
>>>>>-</td>
>>>>>-</tr>
>>>>>-</table>
>>>>>-This is the code behind:
>>>>>->
>>>>>-namespace compass.user_controls
>>>>>-{
>>>>>-using System;
>>>>>-using System.Collections;
>>>>>-using System.Data;
>>>>>-using System.Drawing;
>>>>>-using System.Web;
>>>>>-using System.Web.UI.WebControls;
>>>>>-using System.Web.UI.HtmlControls;
>>>>>-using System.Xml;
>>>>>-using compass.ClassFiles;
>>>>>-/// <summary>
>>>>>-/// Summary description for TopNavBar.
>>>>>-/// </summary>
>>>>>-public class TopNavBar : System.Web.UI.UserControl
>>>>>-{
>>>>>-protected System.Web.UI.WebControls.Xml Xml1;
>>>>>-protected System.Web.UI.WebControls.Repeater Repeater1;
>>>>>-private void Page_Load(object sender, System.EventArgs e)
>>>>>-{
>>>>>-// Put user code to initialize the page here
>>>>>-}
>>>>>->
>>>>>-#region Web Form Designer generated code
>>>>>-override protected void OnInit(EventArgs e)
>>>>>-{
>>>>>-//
>>>>>-// CODEGEN: This call is required by the ASP.NET Web Form
>>>>>-Designer.
>>>>>-//
>>>>>-InitializeComponent();
>>>>>-base.OnInit(e);
>>>>>-}
>>>>>-/// <summary>
>>>>>-/// Required method for Designer support - do not modify
>>>>>-/// the contents of this method with the code editor.
>>>>>-/// </summary>
>>>>>-private void InitializeComponent()
>>>>>-{
>>>>>-this.Load += new System.EventHandler(this.Page_Load);
>>>>>-}
>>>>>-#endregion
>>>>>-}
>>>>>-}
>>>>>-Also, the xslt file generates an unordered list. Is there
>>>>>a
>>>>>way
>>>>>to
>>>>>-set the visibility for one of the list items on or off in
>>>>>the
>>>>>code
>>>>>-behind?
>>>>>->
>>>>>-For example, if five list items are displaying and I want
>>>>>to
>>>>>hide
>>>>>the
>>>>>-visibility of one of the items, is there a way to do this?
>>>>>->
>---
>WBR,
>Michael Nemtsev :: blog: http://spaces.msn.com/laflour
>"At times one remains faithful to a cause only because its
>opponents
>do
-not
->
>cease to be insipid." (c) Friedrich Nietzsche
>>
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour
"At times one remains faithful to a cause only because its
opponents
do
-not
->
>>>cease to be insipid." (c) Friedrich Nietzsche
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour
"At times one remains faithful to a cause only because its opponents
do
-not
->
>cease to be insipid." (c) Friedrich Nietzsche
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Jul 2 '06 #12

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

Similar topics

0
by: Michel | last post by:
Hi, I have written a custom control, which I use on 2 ASP.NET pages. The strange part of it : on the one page, it is displayed correctly, in the second it is not displayed. When I take a look...
4
by: Iain Porter | last post by:
Hi all, I have a usercontrol (a textbox with dropdown calendar that fills the textbox with the selected date) that I implement in a datagrid in a webform. On first loading the page, the datagrid's...
0
by: Manny Chohan | last post by:
Hi Guys, I am a newbie to .NET. I created a usercontrol to render Header and Footer of a webpage. I have a label on a usercontrol and i need to control the visibility of the control on page load....
1
by: Manny Chohan | last post by:
Hi, i have a template column in datagrid. Inside template column i have panel. I want to control the visibility of the panel with checkbox. can this be done? <asp:TemplateColumn> <ItemTemplate>...
6
by: Nick Stansbury | last post by:
Hi, I have a loop running on Page_PreRender that sets a number of controls to invisible based on a set of criteria. Before I do this however, I set all of the drop down lists to be visible with...
1
by: Stuart Shay | last post by:
Hello All: I hava a ASP.NET Web Page where I want to change the visibility of a Dropdown, I want to avoid using Postback since the selection of the Dropdown choices is always the same. The Code...
8
by: kevin.vaughan | last post by:
Good Afternoon Everyone, Could someone please explain why I can't set the Subform control Visible attribute to False as below? The statement for the locked attributes work but not for the...
6
by: =?Utf-8?B?U2FuZHBvaW50R3V5?= | last post by:
In the datagrid I would put key values (that I didnt want to display) in columns marked not visible, in the gridview I would put them in datakeys. Im need to apply greater control over my html, so...
7
by: RichB | last post by:
I am trying to get to grips with the asp.net ajaxcontrol toolkit, and am trying to add a tabbed control to the page. I have no problems within the aspx file, and can dynamically manipulate a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...

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.