Showing posts with label json. Show all posts
Showing posts with label json. Show all posts

Wednesday, March 28, 2012

asp.net ajax refresh the UpdatePanel every 30 sec?

I am currently using Timer control inside my update panel to update automatically every 30 sec. However i wanted to use json to do the same thing.

Any suggestions?

Thanks

Hi,

JSON (JavaScript Object Notation) is a lightweight data-interchange format, or it can be viewed as a protocal defining how object is serialized when transporting.

It can't be used to perform actions at a certain interval like Timer.

Please refer to this for more information:http://msdn2.microsoft.com/en-us/library/bb299886.aspx

Hope this helps.

Monday, March 26, 2012

ASP.NET AJAX + JSON: Custom Grid with paging + sorting

Hi,

I am looking for the following solution:

I replaced myUpdatePanel with a client-side PageMethod to a Webservice webmethodusing ASP.NET Ajax and JSON serialization. I now want to use some kindof data table to display my result, however I also need Paging +Sorting.

Using asp:GridView is not a solution here since it is a server-side control with server-side sorting functionality.

Any suggestions? I don't want some heavy JS file that can do this.

You can add two more parameters to your "webmethod" - something like pageNumber and sortString. If I understood you correctly.


Yep. I am just wondering how to construct this whole thing. So far I am thinking of passing the sortDirection, and perform the sorting on the server side directly since I am dealing with a List. The paging is a little trickier though.


hello.

for paging, you just need to pass the current page and the number of elements per page. you should perform paging on the server side and only return the neecessary elements.


Thank youGeeked


What did you end up using for your solution? You mentioned a GridView was not an option... are you constructing the table by hand?