Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic error in postback (Read 1722 times)
hans
Junior Member
**
Offline


I Love MindFusion!

Posts: 81
Location: Netherlands
Joined: Mar 17th, 2012
error in postback
Apr 9th, 2013 at 2:37pm
Print Post  
using canvas javascript, i use setTextColor(myColor) where myColor =  $(this).css("background-color") (it evals to RGB(72,198,72)).
This textcolor works fine on my screen but when I postback my diagram, i get an error from the server.
[Exception: rgb(255 is not a valid value for Int32.]

When I use setTextColor(#666666) it works fine


This is the complete error:

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:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 

Stack Trace:


[FormatException: Input string was not in a correct format.]
   System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +12638565
   System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +224
   System.ComponentModel.Int32Converter.FromString(String value, NumberFormatInfo formatInfo) +46
   System.ComponentModel.BaseNumberConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value) +497

[Exception: rgb(255 is not a valid value for Int32.]
   System.ComponentModel.BaseNumberConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value) +8027453
   System.Drawing.ColorConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value) +1030
   System.Drawing.ColorTranslator.FromHtml(String htmlColor) +1211
   A.c11941951d1a217fe413d2aa0601bfabd.c77627f82bae584b761fb1cce96ac4424(JavaScript
Serializer c57814d6c5c8e0b9b9ed12968b457ed16, Diagram c5347d2082ccee606e0a8d8b7f1668b7e, DiagramItem ce21627ed1d5d67a11005303f5bea62ae, Dictionary`2 cedc1bd8fb88acb5b817242e9e1136e4c) +643
   A.c11941951d1a217fe413d2aa0601bfabd.c7594c7aa6ecfaf2d4ac486b4a2be8b56(JavaScript
Serializer c57814d6c5c8e0b9b9ed12968b457ed16, Diagram c5347d2082ccee606e0a8d8b7f1668b7e, DiagramNode cea1ec4ca90a63c2b39adca63d2cb6e1f, Dictionary`2 cedc1bd8fb88acb5b817242e9e1136e4c) +54
   A.c11941951d1a217fe413d2aa0601bfabd.cbbf592332de50228c4bd5b75abaea207(DiagramVie
w c5c59c6a4a2a6c4948790bb75e068d36f, String cbb2cc7e35972c9b4f274ffacff72079c) +3752
   A.c11941951d1a217fe413d2aa0601bfabd.c6aa5f7fdc2e26faac71768535b65443e(DiagramVie
w c3d2ea328bcae2cddab9c206fcedee40b, String c9ec0dbdde9b6a1a1d537757377d801dc, NameValueCollection c5c11b67bc18f800a1449180ab80777f2) +106
   MindFusion.Diagramming.WebForms.DiagramView.LoadPostData(String postDataKey, NameValueCollection postCollection) +157
   System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +1018
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2653


  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: error in postback
Reply #1 - Apr 9th, 2013 at 2:57pm
Print Post  
We don't plan supporting the rgb() format, use the function here to convert to hex format:
http://haacked.com/archive/2009/12/29/convert-rgb-to-hex.aspx

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint