Portal Admin Edit or MoveUp/MoveDown problem

Results 1 to 2 of 2

Thread: Portal Admin Edit or MoveUp/MoveDown problem

  1. #1
    Join Date
    Dec 1969

    Default Portal Admin Edit or MoveUp/MoveDown problem

    I am using the C# Visual Studio version of the ASP.NET Portal Starter kit...<BR><BR>I am having a problem after I login as a user with Admin rights and try to edit a "tab".<BR><BR>The Admin tab loads fine, until I click on either the up/down arrows or the edit image buttons...<BR><BR>I am wanting to edit one of the tabs, but get this error:<BR><BR>Object reference not set to an instance of an object. <BR><BR>With this stack trace output...<BR><BR>[NullReferenceException: Object reference not set to an instance of an object.]<BR> Tulsa.Tech.Portal.Tabs.EditBtn_Click(Object sender, ImageClickEventArgs e)<BR> System.Web.UI.WebControls.ImageButton.OnClick(Imag eClickEventArgs e) +109<BR> System.Web.UI.WebControls.ImageButton.System.Web.U I.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +69<BR> System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument) +18<BR> System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33<BR> System.Web.UI.Page.ProcessRequestMain() +1258<BR><BR><BR>If anyone can help, I would like to understand why I get this error and how I can read the stack trace to figure out where to look to fix it.<BR><BR>Thanks<BR><BR>Chuke

  2. #2
    Join Date
    Dec 1969

    Default a guess

    Hi,<BR><BR>While I typically find the stack trace useless (to me), the error seems reasonable. It is a common error, and is usually thrown if you don&#039;t instantiate an object properly.<BR><BR>I don&#039;t do C# yet, but fairly proficient in VB.NET. And it&#039;s the difference between dimensioning a variable or custom class as:<BR><BR>Dim _WrongWay As CustomClass<BR><BR>vs.<BR><BR>Dim _RightWay As New CustomClass<BR><BR>-------------<BR><BR>Another possibility is that you&#039;re reading in an arraylist or collection of items (possibly the collection of tabs) and when it goes to do the for loop, it does not find an object to loop through. That can be solved by verifying the collection is not a null object before looping.<BR><BR>--------------<BR><BR>Like it says in the title, just a guess, but hopefully something might match up and put you in the right direction.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts