Appframe Knowledge Base


1 hits
0

Checking if QueryString contains a parameter of a specific type

@QueryString.ContainsInteger("x")
<!-- Returns whether or not the specified query parameter is an integer -->

@QueryString.ContainsDecimal("y")
<!-- Returns whether or not the specified query parameter is a decimal number -->

@QueryString.ContainsAlphanumeric("z")
<!-- Returns whether or not the specified query parameter is alphanumeric -->

@QueryString.ContainsList("z")
<!-- Returns whether or not the specified query parameter is a list -->

@QueryString.Contains("x", "^\w+\\w+\.\w+$")
<!-- Returns whether or not the specified query parameter matches the specified regex -->

razor web · Perma link post comment Posted by: Peter Øren (23-aug-2013)