Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7737947
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T08:08:12+00:00 2026-06-01T08:08:12+00:00

am accessing a class from my webservice as [WebMethod(EnableSession = true)] public string fetchAbsentees(string

  • 0

am accessing a class from my webservice as

[WebMethod(EnableSession = true)]
    public string fetchAbsentees(string date)
    {
        string data = string.Empty;

        StudentAttendances students = new StudentAttendances(date);

        SearchStudents fetchStudents =new SearchStudents(students);

            data = jsonSerialize.Serialize(fetchStudents);
        }
        return data; 
    }

when I execute this code am getting the values from the StudentAttendance class, I have StudentId property along with attendancestatus, date etc in the StudentAttendance class….

in the SearchStudentClass I have a constructor with one parameter(to accept the StudentId), my question is how can I get the StudentId alone from students and pass it to SearchStudents……..can anyone help me here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T08:08:13+00:00Added an answer on June 1, 2026 at 8:08 am

    To get a list of ids from students using Linq

    students.Select(student => student.StudentId);
    

    This will return an IEnumerable<YourIDType>. If that’s what you’re passing to SearchStudents().

    Above, you mention that SearchStudents accepts a single StudentId, so in that case you’d need to iterate over each of the students returned by StudentAttendances(date).

    I don’t know what your SearchStudents class looks like, nor what is returned by StudentAttendances(date) but you could iterate over each of the students returned by the latter, pass it in to the former, and aggregate the results before serializing to JSON.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a common base class from which all my ASMX webservice classes will
I have a class which makes a url request and stores data from that
I need help with accessing class from Form. So I'll put my code so
In my asmx file, I have [WebMethod] [ScriptMethod] public void Method(IDictionary<string, CustomClass> objectOfCustomClass) {
I had a webservice which i was directly accessing from my webform. I used
What is the preferred method of accessing ivars from different classes? Application Delegate Class
i'm very new to sencha.i have a bit problem in accessing the data from
I am finding trouble accessing a private member of a class from a friend
In a class derived from UIViewController there is a message implementation that is accessing
What is the difference between accessing a property from the class through $this or

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.