XPathBinder.Select Method (Object, String, IXmlNamespaceResolver)
Uses an XPath data-binding expression at run time to return a list of nodes, using the IXmlNamespaceResolver object specified to resolve namespace prefixes in the XPath expression.
Assembly: System.Web (in System.Web.dll)
static member Select : container:Object * xPath:string * resolver:IXmlNamespaceResolver -> IEnumerable
Parameters
- container
-
Type:
System.Object
The IXPathNavigable object reference that the expression is evaluated against. This must be a valid object identifier in the page's specified language.
- xPath
-
Type:
System.String
The XPath query that retrieves a list of nodes.
- resolver
-
Type:
System.Xml.IXmlNamespaceResolver
The IXmlNamespaceResolver object used to resolve namespace prefixes in the XPath expression.
You can use the Select method declaratively if you want to simplify the retrieval of a set of nodes using an XPath query. To do so, you must place the <%# and %> tags, which are also used in standard ASP.NET data binding, around the XPath query and an IXmlNamespaceResolver object to resolve the namespace reference.
For any of the list ASP.NET server controls, such as DataList, DataGrid, or Repeater, the container parameter should be Container.DataItem.
Available since 2.0