Last post Apr 07, 2007 07:43 AM by Russ Helfand
Feb 06, 2007 04:17 PM|dayodave|LINK
Here's hoping someone knows how to integrate the CSS Adapter for the TreeView and a Masterpage. It seems like it would be the perfect marriage but I get errors each time I try. Any ideas on how to get this working?
CSS Control Adapters
Feb 11, 2007 12:50 PM|Russ Helfand|LINK
Apologies for taking so long to respond to your post. If you are still interested in digging into this, I'd like to help.
Frankly, I'm not sure what the problem might be. I need you to post more details. Perhaps you can provide the markup and code you are trying to use. Also, it would help to see the exact error messages you are getting.
I tried an experiment that seemed to show that the adapted TreeView can live on a simple master page. Here is what I tried:
<asp:contentplaceholder id="ContentPlaceHolder1" runat="server">
Now I created a new page within the Walkthrough folder and called it test.aspx. Its content looks like this:
<%@ Page Language="C#" MasterPageFile="~/WalkThru/SimpleTreeView.master" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
This is a test
When I run this page everything works as I would expect. I see the TreeView from the master page and I see the "this is a test" text that was added through the content placeholder. I don't have any error messages or other problems.
I realize that this is a pretty simple test. Maybe it works because it is too simple! Still, it provides a good data-point to establish that fundamentally master pages and adapted TreeView instances are compatible at some basic level. Let's see how this
differs from what you are trying to accomplish.
Apr 05, 2007 06:33 PM|junglemason|LINK
I am also having a problem that sounds like the one Dave posted about.
Placing a TreeView in a Master Page works just fine.
When I place a TreeView (with CSS Friendly Adapters installed) within an asp:Content control, I get the following exception:
The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
I believe this has something to do with how the ViewState is set up at runtime. Luckily for me, I don't need a ViewState for this particular control since I'm not using the expanding/collapsing feature, so I can just add EnableViewState="false" to the TreeView and
it works fine. But this won't work for many people.
If anyone can solve the issue of it breaking with a ViewState, I look forward to the solution.
Apr 06, 2007 05:43 AM|Dmitry Karpenkov|LINK
I proposed solution for this problem in another thread some days ago.
You can see it at http://forums.asp.net/thread/1488821.asp
Apr 06, 2007 05:46 AM|Dmitry Karpenkov|LINK
Apr 07, 2007 07:43 AM|Russ Helfand|LINK