PDA

View Full Version : ASP + Ext: request values empty?



ferr
5 Oct 2007, 10:04 AM
Context: using a paging grid, trying to get the appropriate records into pages:

Request values appear to be magical at the moment, I run through through the debugger with my aspx file which uses a Request.Form["limit"] value in a sql query.. the query works fine and the value seems to be expressed in the query, but when looking at the sql line itself at debug time the value is null.

This wouldn't be a big problem since it actually works somehow, magically, but with paging I believe I need to do a bit of math in order to return the appropriate records based on the page selected and the page limit. But, of course, since it's null, I can't convert it to an int in order to perform this math. What am I supposed to do instead?

Also, how can I go about finding out what values can be obtained through Request? I need to know what page the grid is on, so what term would I use in my request? Is there a document somewhere detailing this?

EDIT: Apparently it wasn't having a problem with limit, I am able to parse it properly, the error was when trying to get the page, I just don't know what the term is. So my question is, how do I get the grid's current page number?

evant
5 Oct 2007, 3:46 PM
I believe the parameters are 'start' and 'limit'.

Just as an ASP.NET tip, you can just iterate to see the values in the request collection:



foreach (String s in Request.Form)
{
Response.Write(s)
}