Input string was not in a correct format.

Server Error in '/' Application.

Input string was not in a correct format.

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.FormatException: Input string was not in a correct format.

Source Error:


Line 128:            if (objmlx_system_config.Count > 0 && objmlx_system_config != null)
Line 129:            {
Line 130:                int iReferralID = Convert.ToInt32(objmlx_homepage_settings.ReferralID);
Line 131:                string strReferralURL = objmlx_system_config[0].HealthTopicReferralURL + iReferralID;
Line 132:

Source File: c:\Project\Solution\ml\CMSWebParts\MLCustomWebParts\HomePageHeaderCustomization\HomePageheaderCustomization.ascx.cs    Line: 130

Stack Trace:


[FormatException: Input string was not in a correct format.]
   System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +12630933
   System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +224
   CMSWebParts_MLCustomWebParts_HomePageHeaderCustomization_HomePageheaderCustomization.RedirectToReferralBySiteID() in c:\Project\Solution\ml\CMSWebParts\MLCustomWebParts\HomePageHeaderCustomization\HomePageheaderCustomization.ascx.cs:130
   CMSWebParts_MLCustomWebParts_HomePageHeaderCustomization_HomePageheaderCustomization.Page_PreRenderComplete(Object sender, EventArgs e) in c:\Project\Solution\ml\CMSWebParts\MLCustomWebParts\HomePageHeaderCustomization\HomePageheaderCustomization.ascx.cs:116
   System.EventHandler.Invoke(Object sender, EventArgs e) +0
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4543


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