MainUtil.GetRequestInt Method
Gets an integer from the query string.
[Visual Basic]
Public Shared Function GetRequestInt( _
ByVal
sName As
String, _
ByVal
nDefault As
Integer _
) As
Integer
[C#]
public static
int GetRequestInt(
string sName,
int nDefault);
Parameters
-
sName
- The name of the query string parameter.
-
nDefault
- A default value.
Return Value
The flag as an integer.
Remarks
The default value is returned if the flag is not present on the query string.
Example
int val = MainUtil.GetRequestInt("myparameter", 0);
See Also
MainUtil Class | Sitecore Namespace