GetDataItem() публичный Метод

public GetDataItem ( ) : object
Результат object
Пример #1
0
		public void GetDataItem_Exception ()
		{
			Page p = new Page ();
			p.GetDataItem ();
		}
Пример #2
0
 /// <summary>
 ///  获取数据绑定上下文数据项。
 /// </summary>
 /// <typeparam name="T">对象类型</typeparam>
 /// <param name="page">页面</param>
 public static T GetDataItem <T>(this System.Web.UI.Page page)
 {
     return((T)page.GetDataItem());
 }
Пример #3
0
 protected internal IEnumerable XPathSelect(string xpathexpression)
 {
     return(XPathBinder.Select(Page.GetDataItem(), xpathexpression));
 }
Пример #4
0
 protected internal IEnumerable XPathSelect(string xpathexpression, IXmlNamespaceResolver resolver)
 {
     return(XPathBinder.Select(Page.GetDataItem(), xpathexpression, resolver));
 }
Пример #5
0
 protected internal string XPath(string xpathexpression, string format)
 {
     return(XPathBinder.Eval(Page.GetDataItem(), xpathexpression, format));
 }
Пример #6
0
 protected internal string XPath(string xpathexpression, string format, IXmlNamespaceResolver resolver)
 {
     return(XPathBinder.Eval(Page.GetDataItem(), xpathexpression, format, resolver));
 }
Пример #7
0
 protected internal object XPath(string xpathexpression)
 {
     return(XPathBinder.Eval(Page.GetDataItem(), xpathexpression));
 }
Пример #8
0
 protected internal object XPath(string xpathexpression, IXmlNamespaceResolver resolver)
 {
     return(XPathBinder.Eval(Page.GetDataItem(), xpathexpression, null, resolver));
 }
Пример #9
0
 protected internal object Eval(string expression)
 {
     return(DataBinder.Eval(Page.GetDataItem(), expression));
 }
Пример #10
0
 protected internal string Eval(string expression, string format)
 {
     return(DataBinder.Eval(Page.GetDataItem(), expression, format));
 }
Пример #11
0
 /// <devdoc>
 /// Simplified databinding XPathSelect() method. This method uses the current data item and a namespace resolver
 /// to evaluate an XPath expression that returns a node list using XPathBinder.Select().
 /// The data item is retrieved using either the IDataItemContainer interface or by looking for a property called 'DataItem'.
 /// If the data item is not found, an exception is thrown.
 /// </devdoc>
 protected internal IEnumerable XPathSelect(string xPathExpression, IXmlNamespaceResolver resolver)
 {
     CheckPageExists();
     return(XPathBinder.Select(Page.GetDataItem(), xPathExpression, resolver));
 }
Пример #12
0
 /// <devdoc>
 /// Simplified databinding XPathSelect() method. This method uses the current data item to evaluate an XPath expression that returns a node list using XPathBinder.Select().
 /// The data item is retrieved using either the IDataItemContainer interface or by looking for a property called 'DataItem'.
 /// If the data item is not found, an exception is thrown.
 /// </devdoc>
 protected internal IEnumerable XPathSelect(string xPathExpression)
 {
     CheckPageExists();
     return(XPathBinder.Select(Page.GetDataItem(), xPathExpression));
 }
Пример #13
0
 /// <devdoc>
 /// Simplified databinding XPath() method with a format expression. This method uses the current data item and a namespace resolver
 /// to evaluate an XPath expression using XPathBinder.Eval().
 /// The data item is retrieved using either the IDataItemContainer interface or by looking for a property called 'DataItem'.
 /// If the data item is not found, an exception is thrown.
 /// </devdoc>
 protected internal string XPath(string xPathExpression, string format, IXmlNamespaceResolver resolver)
 {
     CheckPageExists();
     return(XPathBinder.Eval(Page.GetDataItem(), xPathExpression, format, resolver));
 }
Пример #14
0
 /// <devdoc>
 /// Simplified databinding XPath() method with a format expression. This method uses the current data item to evaluate an XPath expression using XPathBinder.Eval().
 /// The data item is retrieved using either the IDataItemContainer interface or by looking for a property called 'DataItem'.
 /// If the data item is not found, an exception is thrown.
 /// </devdoc>
 protected internal string XPath(string xPathExpression, string format)
 {
     CheckPageExists();
     return(XPathBinder.Eval(Page.GetDataItem(), xPathExpression, format));
 }
Пример #15
0
 /// <devdoc>
 /// Simplified databinding XPath() method. This method uses the current data item to evaluate an XPath expression using XPathBinder.Eval().
 /// The data item is retrieved using either the IDataItemContainer interface or by looking for a property called 'DataItem'.
 /// If the data item is not found, an exception is thrown.
 /// </devdoc>
 protected internal object XPath(string xPathExpression)
 {
     CheckPageExists();
     return(XPathBinder.Eval(Page.GetDataItem(), xPathExpression));
 }