System.FormatException: 'Input string was not in a correct format.'

0
0

Getting this error thrown when loading a form with ShowDialog().

Seems to be a WiseJ error from ActiveLinkColor.Get and ColorTranslator.FromHtml(string htmlColor)

Is there any way to tell what is throwing it?

I can confirm there is no custom setting of LinkLabel.ActiveLinkColor anyway, it is using defaults (“Red”)

mscorlib.dll!System.Number.StringToNumber(string str, System.Globalization.NumberStyles options, ref System.Number.NumberBuffer number, System.Globalization.NumberFormatInfo info, bool parseDecimal) Line 1032 C#
mscorlib.dll!System.Number.ParseInt32(string s, System.Globalization.NumberStyles style, System.Globalization.NumberFormatInfo info) Line 706 C#
System.dll!System.ComponentModel.Int32Converter.FromString(string value, System.Globalization.NumberFormatInfo formatInfo) Line 45 C#
System.dll!System.ComponentModel.BaseNumberConverter.ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) Line 103 C#
System.Drawing.dll!System.Drawing.ColorConverter.ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) Unknown
System.Drawing.dll!System.Drawing.ColorTranslator.FromHtml(string htmlColor) Unknown
Wisej.Framework.dll!Wisej.Core.ClientThemeReader.TranslateColor(string value, string name) Unknown
Wisej.Framework.dll!Wisej.Core.ClientThemeReader.ReadFromMetricsCache<System.Drawing.Color>(Wisej.Core.ClientTheme theme, string key, System.Func<System.Drawing.Color> callback) Unknown
Wisej.Framework.dll!Wisej.Web.LinkLabel.ActiveLinkColor.get() Unknown
Wisej.Framework.dll!Wisej.Web.LinkLabel.OnWebRender(dynamic config) Unknown
System.Core.dll!System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid2<Wisej.Web.Control, object>(System.Runtime.CompilerServices.CallSite site, Wisej.Web.Control arg0, object arg1) Unknown
Wisej.Framework.dll!Wisej.Web.Control.Wisej.Core.IWisejComponent.Render(dynamic config) Unknown
Wisej.Framework.dll!Wisej.Core.ComponentManager.RenderComponent(Wisej.Core.ResponseManager response, Wisej.Core.IWisejComponent component) Unknown
Wisej.Framework.dll!Wisej.Core.ComponentManager.RenderReferenced(Wisej.Core.ResponseManager response, Wisej.Core.IWisejComponent component) Unknown
Wisej.Framework.dll!Wisej.Core.ComponentManager.RenderComponent(Wisej.Core.ResponseManager response, Wisej.Core.IWisejComponent component) Unknown
Wisej.Framework.dll!Wisej.Core.ComponentManager.RenderReferenced(Wisej.Core.ResponseManager response, Wisej.Core.IWisejComponent component) Unknown
Wisej.Framework.dll!Wisej.Core.ComponentManager.RenderComponent(Wisej.Core.ResponseManager response, Wisej.Core.IWisejComponent component) Unknown
Wisej.Framework.dll!Wisej.Core.ComponentManager.RenderReferenced(Wisej.Core.ResponseManager response, Wisej.Core.IWisejComponent component) Unknown
Wisej.Framework.dll!Wisej.Core.ComponentManager.RenderComponent(Wisej.Core.ResponseManager response, Wisej.Core.IWisejComponent component) Unknown
Wisej.Framework.dll!Wisej.Core.ComponentManager.RenderReferenced(Wisej.Core.ResponseManager response, Wisej.Core.IWisejComponent component) Unknown
Wisej.Framework.dll!Wisej.Core.ComponentManager.RenderComponent(Wisej.Core.ResponseManager response, Wisej.Core.IWisejComponent component) Unknown
Wisej.Framework.dll!Wisej.Core.ComponentManager.RenderComponents(Wisej.Core.ResponseManager response) Unknown
Wisej.Framework.dll!Wisej.Core.ComponentManager.Render.AnonymousMethod__0() Unknown
Wisej.Framework.dll!Wisej.Core.IWisejSynchronizedImplementation.Lock(Wisej.Core.IWisejSynchronized target, System.Action action) Unknown
Wisej.Framework.dll!Wisej.Core.ComponentManager.Render(Wisej.Core.ResponseManager response) Unknown
Wisej.Framework.dll!Wisej.Core.ResponseManager.ProcessResponse.AnonymousMethod__0() Unknown
Wisej.Framework.dll!Wisej.Core.IWisejSynchronizedImplementation.Lock(Wisej.Core.IWisejSynchronized target, System.Action action) Unknown
Wisej.Framework.dll!Wisej.Core.ResponseManager.WebSocket.DoModal(Wisej.Core.IWisejComponent component) Unknown
Wisej.Framework.dll!Wisej.Web.Form.ShowDialog(Wisej.Web.Form owner, System.Action<Wisej.Web.Form, Wisej.Web.DialogResult> onclose) Unknown
> FixityVB.dll!FixityVB.frmCityView.OpenCityControlPanel(int intIssueToLoad) Line 1537 C#

  • You must to post comments
0
0

If I go through every LinkLabel on the form, and change all the ActiveLinkColor properties to ‘Red’ using the designer, the property changes from ‘Red’ to 255,0,0.

Then, it throws the error on LinkColor.Get()

Did WiseJ at some point change the way the property was read? Because the LinkLabels are all encoded by color name (WiseJ default), but using the designer it sets them to RGB.

  • Luca (ITG)
    It doesn’t throw the exception. It’s handled. You must have the exceptions turned on in Visual Studio.
  • You must to post comments
0
0

The error is not a Wisej error. It’s all in the stack trace. It’s coming from:

System.Drawing.ColorTranslator.FromHtml

Turn off the exceptions in Visual Studio and it will be fine. There are thousands of exceptions that are handled in normal operations.

 

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.