Object reference not set to an instance of an object.

Server Error in '/DurkeeRecipes' Application.

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:


Line 281:        else if (SearchType == "category")
Line 282:            {
Line 283:            strURL = "../recipe-results?searchCat=" + Request.QueryString["searchCat"].ToString ( );
Line 284:            hlViewAll.NavigateUrl = strURL + "&view=all";
Line 285:            hlViewAll2.NavigateUrl = strURL + "&view=all";

Source File: c:\inetpub\ftproot\durkee.com\DurkeeRecipes\durkeeContent\RecipeSearch.aspx.cs    Line: 283

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   durkeeContent_RecipeSearch.BuildPaging(String SearchType, Int32 iCurrentPage, Int32 iCount) in c:\inetpub\ftproot\durkee.com\DurkeeRecipes\durkeeContent\RecipeSearch.aspx.cs:283
   durkeeContent_RecipeSearch.SearchByCategory(String CategoryList) in c:\inetpub\ftproot\durkee.com\DurkeeRecipes\durkeeContent\RecipeSearch.aspx.cs:207
   durkeeContent_RecipeSearch.Page_Load(Object sender, EventArgs e) in c:\inetpub\ftproot\durkee.com\DurkeeRecipes\durkeeContent\RecipeSearch.aspx.cs:70
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +51
   System.Web.UI.Control.OnLoad(EventArgs e) +95
   System.Web.UI.Control.LoadRecursive() +59
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +678


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.1055.0
1-800-247-5251