View Full Version : Paging Grid with ASP

16 Oct 2007, 6:03 AM
How to make paging grid with ASP like the paging grid example show but in code use php
file how can i use ASP file, eg

proxy: new Ext.data.ScriptTagProxy({
url: 'http://extjs.com/forum/topics-remote.php'

and php file is

$sql_count = "SELECT id, name, title, hire_date, active FROM random_employee_data";
$sql = $sql_count . " LIMIT ". (int) $_POST['start'].", ". (int) $_POST['limit'];
$rs_count = mysql_query($sql_count);
$rows = mysql_num_rows($rs_count);
$rs = mysql_query($sql);
while($obj = mysql_fetch_object($rs))
$arr[] = $obj;
echo $_GET['callback'].'({"total":"'.$rows.'","results":'.json_encode($arr).'})';

16 Oct 2007, 6:11 AM
This isn't an ASP help forum, however the process is the same:

1) Do your query
2) Limit the results
3) Return some JSON

16 Oct 2007, 6:35 AM
Yes but how can I get back results from ASP

echo $_GET['callback'].'

16 Oct 2007, 9:32 AM
You need to know enough about ASP to output the response back to the browser - maybe Response.Write (I haven't done ASP in a long time). However, like Evant said, this isn't the place for learning how to write ASP code - you may get some suggestions from some folks who may still be using ASP, but there are probably better resources for getting the answers.