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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:10:02+00:00 2026-05-26T22:10:02+00:00

i have to functions – one client function and another server side function. this

  • 0

i have to functions – one client function and another server side function.
this is the server side function:

[WebMethod]
public IList<OrderViewDTO> GetTaskProgress(DateTime xDATEx)
{
    try
    {
        var xDate2 = xDATEx.AddDays(1);
        var q = new OrderDataRepository()
            .GetAllOrderData()
            .Where(x=>x.POD_DATE>=xDATEx && x.POD_DATE < xDate2)
            .GroupBy(o => o.User)
            .Select(g => new OrderViewDTO
            {
                DriverId = g.Key.Id,
                PdriverName = g.Key.Name,
                OrderCount = g.Count(),
                OrderCountWhereNameIsNotNull = g.Count(o => o.RECEIVE_NAME != null)
            })
            .ToList();
        return q;

    }
    catch (Exception e)
    {
        throw WrapException(e);
    }
}

and this is the client side function
what changes do i have to make so the client side function will call the server side function
?

                 _Services.invoke({
                     method: 'GetTaskProgress',
                     data: { xDATEx: date1 },
                     success: function (q) {
                          paint(q);
                     }

 function paint(orders) {
            var table=
                        '<table>';
            $.each(orders, function() {
                        table +=
                                    '<tr>'+
                                                '<td>'+this.DriverId +'</td>'+
                                                '<td>'+this.PdriverName +'</td>'+
                                                '<td>'+this.OrderCount +'</td>'+
                                                '<td>'+this.OrderCountWhereNameIsNotNull +'</td>'+
                                    '</tr>';
            });
            table+=
                        '</table>';
            table=$(table);
            div.append(table);
}
  • 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-26T22:10:02+00:00Added an answer on May 26, 2026 at 10:10 pm

    It is not.
    You’re mixing server side C# with client side javascript.

    Your web method needs to return Json formatted data, which your client side javascript can then consume.

    See http://msdn.microsoft.com/en-us/library/bb515101.aspx for an example.

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

Sidebar

Related Questions

I have a windows application running at the backend. I have functions in this
in writing a scripting engine, I have functions like (psuedo-code) function is_whitespace?(char c){ return
I have two functions in an ActionScript class, they are: private function loaderCompleteHandler(event:Event):void {
i have functions that look like this that is littered through out the code
I'm not using JQuery but I know they have functions to do this. I
Sometimes in Scheme, I have functions that take arguments like this add 3 4
Many languages have functions which only process plaintext, not binary. Does this mean that
I have functions like this: def activate_field_1(): print 1 def activate_field_2(): print 2 def
Alot of my controllers have functions that look like this. What is the best
In msvc, I have functions like this and it builds but in gcc it

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.