Evaluates XPath data-binding expressions at run time and formats the result as text to be displayed in the requesting browser, using the System.Xml.IXmlNamespaceResolver object specified to resolve namespace prefixes in the XPath expression..
- xpath
- Documentation for this section has not yet been entered.
- container
- The System.Xml.XPath.IXPathNavigable object reference that the expression is evaluated against. This must be a valid object identifier in the page's specified language.
- format
- A .NET Framework format string, similar to those used by string.Format(string, object), that converts the System.Xml.XPath.IXPathNavigable object (which results from the evaluation of the data-binding expression) to a string that can be displayed by the requesting browser.
- resolver
- The System.Xml.IXmlNamespaceResolver object used to resolve namespace prefixes in the XPath expression.
A string that results from the evaluation of the data-binding expression and conversion to a string type.
You can use the XPathBinder.Eval(object, string, string, System.Xml.IXmlNamespaceResolver) method declaratively if you want to simplify the casting of an XML node to a text string to be displayed in a browser. To do so, you must place the <%# and %> tags, which are also used in standard ASP.NET data binding, around the data-binding expression. The data-binding expression includes the XPath expression and an System.Xml.IXmlNamespaceResolver object to resolve the namespace reference.
For any of the list ASP.NET server controls, such as System.Web.UI.WebControls.DataList, System.Web.UI.WebControls.DataGrid, or System.Web.UI.WebControls.Repeater, the container parameter should be Container.DataItem. If you are binding against the page, the container parameter should be Page.