Sending an object throug a webservice and retrieve data in asp.net or silverlight

alexanderover

New Member
I am using silverlight to develop a windows gadget,I need to call a asp.net web service and which is return an object with some data.I want to receive that object and show data.My codes are belowWeb services code.\[code\][WebMethod] public userdata LogIn(string username,string user_password) { return udata; } return new userdata(); } }\[/code\]My custom class code is \[code\] public class userdata { string name; public string Name { get { return name; } set { name = value; } } string userName; public string UserName { get { return userName; } set { userName = value; } } string department; public string Department { get { return department; } set { department = value; } } string designation; public string Designation { get { return designation; } set { designation = value; } } string email; public string Email { get { return email; } set { email = value; } } string mobile; public string Mobile { get { return mobile; } set { mobile = value; } } string ip; public string Ip { get { return ip; } set { ip = value; } } string id; public string Id { get { return id; } set { id = value; } } }\[/code\]it returns \[code\]<userdata><Name>Asik</Name><UserName>asikcse</UserName><Department>technical</Department><Designation>Software Programmer</Designation><Id>1</Id></userdata>\[/code\]And in the end of my project I add web references as that references but havent any solution to this.\[code\]LoginServiceSoapClient login = new LoginServiceSoapClient(); login.LogInCompleted+=new EventHandler<LogInCompletedEventArgs>(login_LogInCompleted); login.LogInAsync(log._nameText, log._surnameText); } void login_LogInCompleted(object sender, LogInCompletedEventArgs e) { How can I retrieve this object returned by webmethod }\[/code\]
 
Back
Top