Avatar of ube100
ube100
Flag for United Kingdom of Great Britain and Northern Ireland asked on

Web service result set data binding to a datagrid.

Hi,

I'm calling a third party web service like:

Exams.ExamBookingService.ExamBookingServiceSoapClient target = new Exams.ExamBookingService.ExamBookingServiceSoapClient();
                GetExamsServiceResponse esr;
               
Where response object is:

[DataContract(Namespace ="http://schemas.homelearningcollege.com/")]
    public class GetExamsServiceResponse    : ServiceResponse
    {

         [DataMember]//
        public List<ExamsDisplay> ExamsDisplay { get; set; }
       
    }

This is what I'm doing in my web form:

                esr = target.GetActiveExams("O6UJ9A001SUJ", "241222576");
                GridView1.DataSource = esr;
                GridView1.DataBind();

And I'm getting the following error:

datasource is an invalid data type. it must be either an IListSource, IEnumarable or IDataSource.

Can anybody advice me please!

Thanks in advance!
C#.NET Programming

Avatar of undefined
Last Comment
ube100

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
markmiddlemist

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
ube100

ASKER
You are star boy. Thanks you!!!
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy