| Vitor's profileIT ChroniclesPhotosBlogLists | Help |
IT ChroniclesErratic adventures in IT dimensions |
|||||
|
April 21 The Title field trapYesterday I had an argument exception ("value does not fall within the expected range") within my code. I was submiting some data from a form to a SharePoint custom list when this happened. Debugging the application showed me that the exception was at the line with the expression item[field_name] = value.
I thought "how does this not fall into the expected range?! The field type is text and I'm using a string value for Christ sake!". After a short checking and reflection I thought "Well... maybe it's the name of the field..." and so I checked it. Nope! The name was alright. The column name was "Name" and it was alright!
So I went around and around trying to solve it: web, colleagues,... and suddenly something hit me (not literally). "Wait! I changed the name of the field! The original name is Title!". I changed the name in the item[field_name] and everything started working correctly.
I know this situation may be a lame one, but I think it can help someone with a similar problem. At least is another post about this issue. : )
All the best and good coding! Understanding the 'using' statement in C#I found in CodeProject this excellent article about the 'using' keyword in C#. Enjoy. April 16 Best practices for codingBack again!
I just have read an article about coding best practices that I found really interesting and want to share with you. It is just the first part, but very interesting all the same. Click here to read it.
All the best October 29 Visual Studio Team System 2010 Overview
The new version of VS Team System comes with some powerful goodies. Here are a few features:
To know more, just click here. |
|
||||
|
|