Author Topic: how to use getUrl function  (Read 4045 times)

Pwavel

  • Newbie
  • *
  • Posts: 5
    • View Profile
how to use getUrl function
« on: January 14, 2014, 02:42:16 pm »
 I want to use the below function in an asp.net page. But i m not able to understand what  url: "/demos/pagingGetOrders" stands for.is "pagingGetOrders" name of a function which returns data or is this the path for a text file or an xml file or something like that.
Can i get the data from a c# function using this method by just giving the name of page and function  for ex...abc.aspx/functionname.
 getUrl: function () {
            var sortDir = (this.sortDir == "up") ? "asc" : "desc";
            var sort = ['ShipCountry', 'contactName', 'orderID', 'OrderDate', 'RequiredDate', 'ShippedDate',
                 'ShipVia', 'Freight', 'ShipName', 'ShipAddress', 'ShipCity', 'ShipRegion', 'ShipPostalCode'];
            return { url: "/demos/pagingGetOrders", data: "cur_page=" + this.curPage + "&records_per_page=" +
                this.rPP + "&sortBy=" + sort[this.sortIndx] + "&dir=" + sortDir };
        }
« Last Edit: January 14, 2014, 04:11:04 pm by paramquery »

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: how to use getUrl function
« Reply #1 on: January 14, 2014, 04:15:12 pm »
url is URL of the resource which returns data for grid.

In PHP it can be somefile.php

In ASP it can be somefile.asp

For ASP.NET service it can be servicename.asmx

For ASP.NET MVC it could be name of action in a controller.

and so on.
« Last Edit: January 15, 2014, 03:31:13 pm by paramquery »