Server Error in '/' 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 7594:            Dim reg As New Regex("[^a-z 0-9 -]")
Line 7595:
Line 7596:            Return "/" & prefix & id & "-" & reg.Replace(name.ToLower().Replace(" ", "-"), "").Replace("---", "-").Replace("--", "-") & ".aspx"
Line 7597:        End Function
Line 7598:

Source File: D:\inetpub\wwwroot\ridgewayleisure.com\v1\App_Code\functions.vb    Line: 7596

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   Four_FX.Library.MakeURL(String prefix, Int32 id, String name) in D:\inetpub\wwwroot\ridgewayleisure.com\v1\App_Code\functions.vb:7596
   Four_FX.Library.CategoryURL(Int32 catId, String cat_name) in D:\inetpub\wwwroot\ridgewayleisure.com\v1\App_Code\functions.vb:7582
   view_product.breadcrumb(sProduct Product, sRange Category, sCategory SubCategory) in D:\inetpub\wwwroot\ridgewayleisure.com\v1\view_product.aspx.vb:361
   view_product.Page_Init(Object sender, EventArgs e) in D:\inetpub\wwwroot\ridgewayleisure.com\v1\view_product.aspx.vb:61
   System.Web.UI.Control.OnInit(EventArgs e) +131
   System.Web.UI.Page.OnInit(EventArgs e) +15
   System.Web.UI.Control.InitRecursive(Control namingContainer) +142
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1476


Version Information: Microsoft .NET Framework Version:2.0.50727.8974; ASP.NET Version:2.0.50727.8974