Author Topic: getting data from asp.net page's web method or web service  (Read 32593 times)

qmaan

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: getting data from asp.net page's web method or web service
« Reply #15 on: May 23, 2014, 08:10:33 pm »
Yes. It worked.. great thanks

stelco

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: getting data from asp.net page's web method or web service
« Reply #16 on: August 08, 2014, 06:14:42 pm »
Hi, I have been looking for a C# ASP.Net solution for pqgrid and Ive found the test download very useful so thanks for that.

What I need to do though is pull in the data from a locally hosted .json file.  For example, this data in the code behind would be populated via the locally hosted file.  Any help on this appreciated as im a front end developer and fairly new to C#.

        [WebMethod]
        [ScriptMethod(ResponseFormat = ResponseFormat.Json, UseHttpGet=true)]       
        public static List<book> getData()
        {
            var list = new List<book>
                {
                new book{Model = "A1 HATCHBACK 1.2 TFSI S Line", Repayments = "£209", CAPID = "1234"},
                new book{Model = "A1 HATCHBACK 1.2 TFSI Sport", Repayments = "£189", CAPID = "5678" },
                new book{Model = "A1 HATCHBACK 1.4 TFSI 140 S Line", Repayments = "£229", CAPID = "9101112" },
                new book{Model = "A3 HATCHBACK 1.2 TFSI 110 S Line", Repayments = "£219", CAPID = "131415" },
                new book{Model = "A3 HATCHBACK 1.2 TFSI 110 S Line S Tronic", Repayments = "£229", CAPID = "161718" }
                };
            return list;