Amie wrote:
Quote:
Hi,
>
I have an atlas related question..
>
I have a web form that submits the information to a web service
method, and it's done thru Atlas by binding the web methods to client
functions.
>
It seems to be working fine, except for when the class has a property
with only getter (no setter), it freaks out, and returns the following
error:
>
new Sys.Net.MethodRequestError("The type \'Project\' does not have a
public property or field named
>
\'StartDateDisplay\'"," at
Microsoft.Web.Script.Serialization.ObjectConverter .AssignToPropertyOrField
>
(Object propertyValue, Object o, String memberName)\r\n at
Microsoft.Web.Script.Serialization.ObjectConverter
>
Hi, I guess a problem is not in Atlas. You trying to serialize an
object of the class which has a property that can not be serialized.
Try to explicitly exclude this property from the serialization.
[Serializable]
public class Project
{
public bool NormalProperty
{
get { ... }
set { ... }
}
[NonSerialized]
public string StartDateDisplay
{
get { ... }
}
}