DynamicQueryStringParameter Class
Updated: July 2008
Automatically generates a collection of parameters that is used to create the Where clause for the data source control by retrieving query string values.
Assembly: System.Web.DynamicData (in System.Web.DynamicData.dll)
The DynamicQueryStringParameter class is used by pages that are using ASP.NET Dynamic Data features. The DynamicQueryStringParameter class will generate a collection of Parameter objects for the primary keys, foreign keys, and Boolean columns of a table by retrieving query string values.
For primary keys, you can simply add a DynamicQueryStringParameter object without supplying any other parameters. Dynamic Data will generate the parameters for the primary key or keys. For foreign keys or Boolean columns, you must set the Name property to the name of the column you want to filter.
In order to use the DynamicQueryStringParameter class, you must add a DynamicDataManager control to the page and you must register the data-bound control with the DynamicDataManager control by using the DynamicDataManager.RegisterControl method.
See a run-time code example of this feature: Run.
The following example shows how to use the DynamicQueryStringParameter object as filter when displaying data in a GridView control. The GridView control contains a TemplateField object that creates a link that sets the query string value by using the foreign key value.
- AspNetHostingPermission
for operating in a hosted environment. Security action: LinkDemand. Associated enumeration: AspNetHostingPermissionLevel.Minimal
- AspNetHostingPermission
for operating in a hosted environment. Security action: InheritanceDemand. Associated enumeration: AspNetHostingPermissionLevel.Minimal
System.Web.UI.WebControls.Parameter
System.Web.DynamicData.DynamicQueryStringParameter
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.