Server Error in '/' Application.

String cannot be of zero length.
Parameter name: oldValue

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.ArgumentException: String cannot be of zero length.
Parameter name: oldValue

Source Error:


Line 346:                        if (newsBlocks != null)
Line 347:                        {
Line 348:                            for (int i = 0; i < newsBlocks.Length; i++)
Line 349:                            {
Line 350:                                newsTextFirstParagraph += newsBlocks[i] + ".";

Source File: C:\Projects\HeadTopics\HeadTopics\Detail.aspx.cs    Line: 348

Stack Trace:


[ArgumentException: String cannot be of zero length.
Parameter name: oldValue]
   System.String.ReplaceInternal(String oldValue, String newValue) +0
   System.String.Replace(String oldValue, String newValue) +20
   HeadTopics.Detail.GetNewsDetail() in C:\Projects\HeadTopics\HeadTopics\Detail.aspx.cs:348
   System.Web.UI.Control.OnLoad(EventArgs e) +108
   HeadTopics.BasePage.OnLoad(EventArgs e) in C:\Projects\HeadTopics\HeadTopics\BasePage.cs:74
   System.Web.UI.Control.LoadRecursive() +90
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1533


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4654.0