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 8637279
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T10:26:24+00:00 2026-06-12T10:26:24+00:00

How can i iterate the following list and print its values? public class DummyVersions

  • 0

How can i iterate the following list and print its values?

 public class DummyVersions
 {
      public List<string> Version { get; set; }
 }

 [WebMethod]
 public static DummyVersions GetDummyVersions()
 {
      DummyVersions dummyversions = new DummyVersions
      {
           Version = new List<string>
           {
                "1.1.0",
                "1.1.1",
                "1.1.2",
                "1.1.3",
                "1.1.4",
                "1.1.5",
           }
      };
      return dummyversions;
 }
 $.ajax({
      type: "POST",
      url: "ManagerBaseKit.aspx/GetDummyVersions",
      contentType: "application/json; charset=utf-8",
      dataType: "json",
      success: function (result) {
           $.each(result, function (i, val) {
                alert(); // ??? here i want to print all version one by one
           });
      }
 });
  • 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-12T10:26:26+00:00Added an answer on June 12, 2026 at 10:26 am

    With the WebMethod your resonse is automatically converted to json by ASP.NET, so you can iterate through your versions using the code below:

    $.each(result.d.Version, function (i, val) {
      alert(val);
    });
    

    It can be result.d.Version or result.Version depending on your ASP.NET version more info about that can be found here: A breaking change between versions of ASP.NET AJAX

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

Sidebar

Related Questions

How can i iterate over the (public or private) properties of a php class?
How can I iterate ResultSet ? I've tried with the following code, but i
I'm trying to iterate through all nodes, so I can print them out for
I have a list of questions that the user will iterate through, they can
I've got the following problem and I can't seem to get why it's not
I'm getting values from the html using the following method: javascript: var list =
I have the following Class which basically creates a list of categories (called commands,
I have the following class. Inside of the Parent class is a List of
How can I iterate over a tuple (using C++11)? I tried the following: for(int
I have the following Generic List which is populated with a list of string:

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.