1
[WebMethod]
public List<Stream> GetStream()
{
    List<Stream> Streams = Stream.GetRange(0, 10, HttpContext.Current.User.Identity.Name);
    return Streams;
}

I would like this same method to also include the following:

List<Comment> Comment = Comment.GetByStreamId(for each stream id 
here of the retrieved streams above);

I would also like to return both lists as array of their objects of List so that they are consumed with jQuery ajax.

How can I achieve that and handle them with jQuery after json is returned.

Suggestions? Thanks

1
  • Comment and Stream has same members? Commented Nov 17, 2011 at 13:46

1 Answer 1

1

as you need to return both Items in a single list Then define struct class read the values one by one to add into the List

public struct CommentandStream

{

public int Item1;

public int Item2;

}

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.