Login

Username

Password





Register   Reset password

Get Cuyahoga at SourceForge.net. Fast, secure and Free Open Source software downloads

Forum

Welcome Guest Search | Active Topics | Members

error rendering control TreeView Options
pedro
Posted: Friday, May 4, 2012 4:51:28 PM

Rank: Advanced Member
Groups: Member

Joined: 4/14/2008
Posts: 33
Points: 99
Location: Cali Colombia
Hello, can someone tell me how to use the control Treeview in a page .aspx ?.It is generating an error rendering:


[NullReferenceException: Object reference not set to an instance of an object.]
CSSFriendly.Helpers.HeadContainsLinkHref(Page page, String href) +48
CSSFriendly.Helpers.RegisterEmbeddedCSS(String css, Type type, Page page) +74
CSSFriendly.TreeViewAdapter.RegisterScripts() +84
CSSFriendly.TreeViewAdapter.OnInit(EventArgs e) +119
System.Web.UI.Control.InitRecursive(Control namingContainer) +8705966
System.Web.UI.Control.InitRecursive(Control namingContainer) +210
System.Web.UI.Control.InitRecursive(Control namingContainer) +210
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +378

thank you very much.
Constructor
Posted: Saturday, May 5, 2012 5:54:59 AM
Rank: Administration
Groups: Administration , Member

Joined: 10/7/2008
Posts: 505
Points: 1,515
There seems to be a bug in the CSSFriendlyAdapters project (an old project to clean up asp.net html output).

http://www.asp.net/cssadapters/
http://cssfriendly.codeplex.com/
http://code.google.com/p/aspnetcontroladapters/

Not all controls had adapters. Custom adapters were added by contribs.

As a fix:

\Cuyahoga.Web\App_Browsers\CSSFriendlyAdapters.browser

Comment out the entry for the TreeViewAdapter that is causing you the error.

Code:

< !-- < adapter controlType="System.Web.UI.WebControls.TreeView" adapterType="CSSFriendly.TreeViewAdapter" / > -- >


This should make things work again.
Constructor
Posted: Sunday, May 6, 2012 7:39:09 AM
Rank: Administration
Groups: Administration , Member

Joined: 10/7/2008
Posts: 505
Points: 1,515
The TreeViewAdadpter tries to register javascripts directly to the page head:

Code:
// TreeViewAdapter.js
            Helpers.RegisterClientScript("CSSFriendly.JavaScript.TreeViewAdapter.js", type, this.Page);



This throws a null reference error as Cuyahoga registers css and js to the template.

So css friendly adapters that require js can not be used. I have never used the TreeView control with Cuyahoga and as such never had this error. It is good to know about it though.
Users browsing this topic
Guest


Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS

Yet Another Forum.net version 1.9.0 running under Cuyahoga.
Copyright © 2003-2006 Yet Another Forum.net. All rights reserved.