c# - System.FormatException: Input string was not in a correct format for decimal -


Specifying a sharingpoint item value by changing it to decimal and using the telecorse to specify the radarating value. Rated value is decimal and when there is an error when changing the list item.

  Radarating 1 Value = Convert. ToDecimal (Ollist ["Average Rating"]);   

I have also tried (decimal) but it gives another error message, why do not accept this statement as any idea?

List Population:

  Zero Load Suggestions () {SPList olstSuggestions = oWeb.Lists ["Suggestions"]; SPQQSuggestions = New SPQuery (); qSuggestions.RowLimit.Equals (10); QSuggestions.Query = string.Format (@ "& lt; ou <">  FieldRef Name = 'Archived' / & gt; & lt; Value Type = 'Options' & gt; No & Lt; / value & gt; & lt; / eq & gt; & lt; / where & gt; "); SPListItemCollection oSuggestionCollection = olstSuggestions.GetItems (qSuggestions); Int count = 1; Foreach (SPListItem oList in oSuggestionCollection) {& lt; Above statement & gt; ...}}    

Please try the following:

  convert Codeemical (Ollist ["Average Rating"], New Number Format Info () {NumberDecimalSeparator = "."}});    

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -