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

  • Home
  • SEARCH
  • 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 4118528
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T22:58:20+00:00 2026-05-20T22:58:20+00:00

I’ve created a WebMethod that I want to access using a Silverlight application. My

  • 0

I’ve created a WebMethod that I want to access using a Silverlight application. My problem is that the information I want to send is in the form of a datatable and Silverlight doesn’t support System.Data.

This is how my WebMethod looks like so far.

[WebMethod]
    private string[,] ListAllUsers()
    {            
        UserUtility util = new UserUtility();
        var allUsers = util.GetAllUsers();
        string[,] data = new string[allUsers.Rows.Count,allUsers.Columns.Count];
        int r = 0;
        int c = 0;
        foreach (DataRow row in allUsers.Rows)
        {
            r++;
            foreach (DataColumn column in allUsers.Columns)
            {
                c++;
                data[r, c] = Convert.ToString((row[column]));
            }
        }
        return data;
    }

I understand that some sort of serialization is involved? Would like to know the best way to get this information to my silverlight application so I can present them.

  • 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-05-20T22:58:20+00:00Added an answer on May 20, 2026 at 10:58 pm

    If you want you can try this http://chunktransporter.codeplex.com/ …

    Otherwise you can try to work with xml.linq…
    Look if this can help you


    WebService

    <OperationContract()>
    <WebGet()>
    Function DoWork(ByVal param As String) As XElement

    Execute XML Sql query (Retrieve XML results)

    “SELECT (‘AlarmType’ as ‘Alarm/@Type’,’Description’ as ‘Alarm/@Description’
    “from Table FOR XML PATH(”),type) FOR XML PATH(‘Alarms’)”

    Dim cns As New SqlConnection(My.Settings.CS)
    Dim sql As String = My.Settings.QMAlarmToTacitate
    Dim sqlCmd As New SqlCommand(sql, cns)
    cns.Open()
    Dim result = sqlCmd.ExecuteScalar
    Dim s = result
    Dim res = (XElement.Parse(result))
    cns.Close()
    cns.Dispose()
    Return res


    Silverlight App

    Dim wc As New WebClient
    AddHandler wc.DownloadStringCompleted, AddressOf DetailDw
    wc.DownloadStringAsync(New Uri("http://myservice.com/service.svc/MyFunction?param1=11111&param2=aaaaa&paramN=nnnn", UriKind.RelativeOrAbsolute))

    Private Sub DetailDw(ByVal sender As Object, ByVal e As DownloadStringCompletedEventArgs)
    If IsNothing(e.Error) Then
    Dim x As Xml.Linq.XElement = Xml.Linq.XElement.Parse(e.Result)
    End if

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

Sidebar

Related Questions

No related questions found

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.