Click here to Skip to main content
15,897,891 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

I'm developing a Win form application with Client-Server model.
At server, I used a ASP Web Service, and at Client, I called the server through a Web Service Preference.
I created all object on Server and serialize them to Client, but I only serialized their properties with out their attribute.

Example:
I created an object on server:

[Serialize()]
public class Customer
{
    public Customer()
    {
    }
     
    [BrowsableAttribute(false)]
    public int Id {get; set;}
    
    [CategoryAttribute ("Customer infomation")]
    [DescriptionAttribute ("Id of customer")]
    public int CustomerId {get; set;}
 
    [CategoryAttribute ("Customer infomation")]
    [DescriptionAttribute ("Name of customer")]
    public string CustomerName {get; set;}
}


After I serialized Customer object to Client, it's has only properties without attributes of it's properties as behind:

[Serialize()]
public class Customer()
{
    public Customer()
    {
    }
    
    public int Id {get; set;}
        
    public int CustomerId {get; set;}
    
    public string CustomerName {get; set;}
}

Please help me!
Thanks!
Posted
Updated 18-Aug-10 23:34pm
v2

1 solution

Actually you will not get the properties....The properties are not XML Serialized and that's why it will not show up in the client proxy.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900