newbie: removing UserControl from template

Vote:
 

Hi folks,

I am trying to get a handle on Relate+ (my first EpiServer dev), I have started by changing the start page to the layout that I require however there's a few controls that I don't need.When I try to remove them I get "Object reference not set to an instance of an object. Server Error in '/' Application."

This is what I did, what am I missing?

Removed from start.aspx

<%@ Register TagPrefix="RelatePlus" TagName="ArticlesList" src="~/Templates/RelatePlus/UserControls/ArticleUserControls/ArticleList.ascx" %>

<RelatePlus:ArticlesList ID="ucArticleList" runat="server" />

Removed from start.aspx.cs

 ucArticleList.DataBind();

Removed from start.aspx.designer.cs

 protected global::EPiServer.Templates.RelatePlus.UserControls.ArticleUserControls.ArticleList ucArticleList;

Thanks a lot

#29795
May 15, 2009 1:47
Vote:
 

Hi Saar,

That should work. I also verified that it did with my local installation of Relate+ and it did. So my guess is that something else is wrong.

Does the error message say anything else?

#29812
May 16, 2009 17:14
Vote:
 

and yet, I am getting an error...

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: 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: Object reference not set to an instance of an object.]
EPiServer.Templates.RelatePlus.Pages.Start.OnLoad(EventArgs e) +305
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627

#29897
May 21, 2009 0:55
Vote:
 

Hi Saar,

I have also done this and I don't get any errors. Are you sure you have not changed anything else that can cause this behavior?

Could you try running it in debug mode and see if you can get some more information on the error?

Best regards,
Tom Stenius

#30040
May 27, 2009 20:32
Vote:
 
Hi Saar,

It's seems like you were using the wrong type of project; Web Site instead of Web Application. Hopefully it will do the trick to change this!

//Tom

#30095
Jun 01, 2009 16:23
This thread is locked and should be used for reference only. Please use the Legacy add-ons forum to open new discussions.
* 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.