asp.net mvc can easily return JSON data in the background, so data interaction with MINIUI is straightforward.
1) Background processing:
In the MVC controller, data can be received through method parameters, or more complex data objects can be received by request.
It then serializes any server-side object Json and returns it via ' return JSON ' (result).
For example, a typical form page loading background processing code:
Public ActionResult Getgriddata (pagerquery q)
{
Query criteria
string key = Q.key;
Paging
int pageIndex = Q.pageindex;
int pageSize = q.pagesize;
Sorting fields
String SortField = Q.sortfield;
String sortOrder = Q.sortorder;
Hashtable result = new Test.testdb (). Searchemployees (Key, PageIndex, PageSize, SortField, SortOrder);
return Json (Result);
Copy Code
2) Front-End processing
All MINIUI examples do not require any changes, just modify the URL address to conform to the MVC specification.
Here is a sample download with full interactive code.
Address: http://miniui.com/bbs/forum.php?mod=viewthread&tid=27527&extra=page%3D1