sitemap problem

Vote:
 
Hej! Jag håller på med en sitemap i EpiServer och stöter på patrull. Jag har snott den sitemap som finns i exempelinstallationen och försöker modifiera denna för mitt behov men jag stöter på problem med denna, det blir något fel vid Databind. Är det någon som använt sitemap och vet vad det kan vara som är bekymret så är jag tacksam för tips. Nedan är felutskriften: Server Error in '/' Application. -------------------------------------------------------------------------------- A error occurred while databinding "DefaultFramework:MainRegionContent:SiteMap:SitemapControl", some values set on the page where null references [Object reference not set to an instance of an object.] Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.NullReferenceException: A error occurred while databinding "DefaultFramework:MainRegionContent:SiteMap:SitemapControl", some values set on the page where null references [Object reference not set to an instance of an object.] Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [NullReferenceException: A error occurred while databinding "DefaultFramework:MainRegionContent:SiteMap:SitemapControl", some values set on the page where null references [Object reference not set to an instance of an object.]] EPiServer.WebControls.PageControlBase.DataBind() +130 System.Web.UI.Control.DataBind() +86 System.Web.UI.Control.DataBind() +86 System.Web.UI.Control.DataBind() +86 System.Web.UI.Control.DataBind() +86 System.Web.UI.Control.DataBind() +86 Taxi.Intranet.Frameworks.DefaultFramework.Page_Load(Object sender, EventArgs e) +23 System.Web.UI.Control.OnLoad(EventArgs e) +67 System.Web.UI.Control.LoadRecursive() +35 System.Web.UI.Control.LoadRecursive() +98 System.Web.UI.Page.ProcessRequestMain() +750 -------------------------------------------------------------------------------- Version Information: Microsoft .NET Framework Version:1.1.4322.2300; ASP.NET Version:1.1.4322.2300 //Mats
#12484
Dec 30, 2005 11:03
Vote:
 
Hi! I will answer this in english. Mats is asking about null reference errors on databind when he is using the SiteMap control. The problem probably lies within a databound scriptblock that you are using in your user control. Silly example: you try to fetch the value of object's attrubute, but the object has not been instanciated: '> and in codebehind: protected PageData MyPage; //not instanciated Go through your scriptblocks and see if you find anything like this.
#14346
Dec 30, 2005 14:51
Vote:
 
Hi again! I think I'm missing something with all this. Abstact of my code looks like this:
#14347
Jan 02, 2006 16:07
Vote:
 
They are all EPiServer Properties that needs to be defined on the PageType implementing the sitemap. /HAXEN
#14348
Jan 03, 2006 13:41
Vote:
 
I would recomend to strip the sitemap control until it works. Then you should know whats causing the problem. I wouldn't stare blindly at the declaration of databound sitemap properties either. The problem might as well be any databound data inside of the sitemap's template declarations.
#14349
Jan 03, 2006 14:19
Vote:
 
And that it was, I was looking to much at control itself, and ASP.NET was trying to bind to the properties of the control. Problem solved.
#14350
Jan 04, 2006 11:21
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.