ASP.NET 前端数据绑定---<%#%>及Eval()的使用
ASP.NET 前端html代码中会经常出现的<%%>的代码,里面的文本其实就是不能直接输出到客户端浏览器的文本,是需要服务器解释的。
在ASP中,<%%>里面的文本是vbscript或者javascript代码,在ASP.NET中,<%%>里面的文本就是.net平台下支持的语言。
具体有三种:<%%>,<%#%>,<%=%>,后两种主要是用于asp.net前端数据绑定的。
一 、<%=%>
在.aspx页面,<%= %>标签可以调用后台.CS的变量/属性或者方法,不过被调用的变量或方法必须是public的。
例:Default.cs文件里面有:
public string str = "test"; public string ReturnStr()
{
return "test";
}
那么前端Default.aspx文件里面就可以这样写:
<asp:Label ID="Label2" runat="server" Text='<%=str%>'></asp:Label>
<asp:Label ID="Label1" runat="server" Text='<%= ReturnStr() %>'></asp:Label>
二、<%#%>
前端aspx页面中,一帮服务器控件数据绑定的语法,结合Eval()方法绑定数据源(ASP.NET 提供了一个名为 DataBinder.Eval 的静态方法,该方法计算后期绑定的数据绑定表达式,并将结果格式化为字符串(可选)。利用此方法,可以避免许多在将值强制为所需数据类型时必须执行的显式强制转换操作,DataBinder.Eval需要使用参数来指定容器)
例:Repeater控件,在Page_Load()方法中,加载数据:
后台:
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
intopage(DropDownListMgrDate.SelectedValue.ToString());
//不会每次刷新页面都重新绑定数据
} }
private void intopage(string Batchid)
{
this.Repeater1.DataSource = dmgr.GetCBProduct_MgrList(this.AspPage.CurrentPageIndex, AspPage.PageSize,Batchid);//CurrentPageIndex:当前页索引值;PageSize:分页每页所能容纳值
this.Repeater1.DataBind();
}
这里,Repeater1.DataSource的数据源既可以是DataSet,也可以是List,这里是List,对应前端DataBinder.Eval方法的参数是:ColumnName/属性名称
前端:
<td>
<%#DataBinder.Eval(Container.DataItem, "include_in_quantity")%>
</td>
<td title="<%#DataBinder.Eval(Container.DataItem, "part_description")%>">
<%#DataBinder.Eval(Container.DataItem, "part_description").ToString().Length>20?DataBinder.Eval(Container.DataItem, "part_description").ToString().Substring(0,20)+"...":DataBinder.Eval(Container.DataItem, "part_description").ToString()%>
</td>
这里Eval()绑定数据时结合使用了三元运算符,如果字符长度大于20,就截取+“...”,当鼠标滑到目标处,就会显示。
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAjgAAAEoCAIAAADaKRynAAAgAElEQVR4nO2dPW/cyNKF9ZPMUID/gCY04MSZIWwkODIcCZs5WhgOFo4ujBss4BssoNDOfJMFFEqZEgNKGThQsIGCN5g3qDu1NVXdTc4Xp0bzHBwYFodsdjebddhfVSdzAAAAIDFO9p0BAAAAoAWECgAAQGogVAAAAFIDoQIAAJAaCBUAAIDUQKjAzvHw82HfWQAAHDAQqmFc/Xl18ebi9Plp96zrnnWzs9nlr5f3P+7jmXJC5Pkv559+/xTtde380+en57+cX/15NUn5/peN67+ud5H4539/Pn1+usaF139dz85mUnU3tze1025ubz79/un8l/P17gIAyA+EqoWb25vZ2awmJ5///dmdXztT+OLlC6dV7fO7Z93Fm4sJirlToZLE17jw+q9rq/S10y5/vdTTNsgmACAvEKoq1FC+ePni6s8r1Zjrv64v3lwUtapoLh9+Pnz99lU6ZJe/Xg6eL5d8/vfnmhxuHcmFSr4VauOHp89P9WNis5wCAJICoSrj4edDUVoU8iF/+vzUjgE2zOXXb1/lfHuwbV4//f5JZHKtEqyA5EL14bcP3bOuOBAqtSonIFQAPFUgVGWISDRGnObzuXzI2x5P21zGX9vnq6W2f376/dPVn1cioi9evtDJm/sf95e/Xmrf4uLNxddvX2OaDz8fLn+9lMtnZ7NPv3+aB6GSsstPFue/nMfjtn/54uULe1M533IlLdTi39ze1EZBpSyuohQ3tzcub/FMyeTDzwf5z+nz0w+/fRifSQDABECoyhCL317OcP/j3i2paAiPmMjZ2Wzk+fOKUKnltf0zHVp0dN3Bm9ubeJrO8awhVFd/XsWbaqVtS6jmi8fhRv+k13v562VRqKSzVSusK5St1QnGWgEAKwGhKuDh54PYrFXXVQ/OUY2Z01K4Xp2dMxOBlO7U/Y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KmJUEEIIUxNhApCCGFqIlQQQghTE6GCEEKYmggVhBDC1ESoIIQQpiZCBSGEMDURKgghhKmJUEEIIUxNhApCCGFqIlQQQghTE6GCEEKYmggVhBDC1ESoIIQQpiZCBSGEMDURKgghhKmJUEEIIUxNhApCCGFqntz86xxCCCFMy5M5AAAAkBgIFQAAgNRAqAAAAKQGQgUAACA1ECoAAACpgVABAABIDYQKAABAaiBUAAAAUgOhAgAAkBoIFQAAgNRAqAAAAKQGQgUAACA1ECoAAACpgVABAABIDYQKAABAaiBUAAAAUuP/ATLNyJbcdyRxAAAAAElFTkSuQmCC" alt="" />
其他优秀博客链接推荐:
http://blog.csdn.net/lai123wei/article/details/7261701
http://www.cnblogs.com/luckeryin/archive/2012/12/13/2815823.html
ASP.NET 前端数据绑定---<%#%>及Eval()的使用的更多相关文章
- 【转】ASP.NET常用数据绑定控件优劣总结
转自:http://www.cnblogs.com/Olive116/archive/2012/10/24/2736570.html ASP.NET常用数据绑定控件优劣总结 本文的初衷在于对Asp ...
- ASP.NET常用数据绑定控件优劣总结
本文的初衷在于对Asp.net常用数据绑定控件进行一个概览性的总结,主要分析各种数据绑定控件各自的优缺点,以便在实际的开发中选用合适的控件进行数据绑定,以提高开发效率. 因为这些数据绑定控件大部分都已 ...
- 实习第一天之数据绑定:<%#Eval("PartyName")%>'
1.asp:HyperLink ID="Link" runat="server" Target="_blank" Text='<%#E ...
- ASP.NET中数据绑定表达式
今天谈下.NET中的数据绑定表达式.数据绑定表达式必须包含在<%#和%>字符之间.格式如下: <tagprefix:tagname property='<%# data-bin ...
- ASP.NET实现数据绑定
一.数据绑定语法 数据绑定表达式包含在“<%#”和“%>”分隔符之内,并使用Eval方法和Bind方法.Eval方法用于定义单向(只读)绑定,Bind方法用于定义双向(可更新)绑定. 语法 ...
- 《ASP.NET》数据绑定—DataList实践篇
上篇文章大概讲了DataList的一些基础知识,掌握这些知识在将来的应用中起到非常大的作用,如今我们就開始讲上篇文章中说的基础知识做一个小样例. 首先,我机子的数据库中有一张person表.例如以下图 ...
- ASP.Net之数据绑定
---恢复内容开始--- [概述]数据绑定是指从数据源获取数据或向数据源写入数据.简单的数据绑定可以是对变量或属性的绑定,比较复杂的是对ASP.NET数据绑定控件的操作 1.简单的属性绑定 基于属性的 ...
- ASP.NET前端解决方案之一:Ext.Net入门随笔1
最近因为公司需要,进一步研发了Ext.Net技术,这里先做一个简明的介绍,给自己和大家记录一个初步的概念. 什么是Ext Ext就是ExtJS,引用下百度的解释:“ExtJS是一种主要用于创建前端用户 ...
- 027. asp.net中数据绑定控件之 GridView控件
GridView控件支持下面的功能: 绑定至数据源控件, 如SqlDataSource 内置排序功能 内置更新和删除功能 内置分页功能 内置行选择功能 可以编程方式访问GridView对象模型以动态设 ...
随机推荐
- GIS基础软件及操作(六)
原文 GIS基础软件及操作(六) 练习六.空间分析的应用 1.加深对缓冲区分析基本原理.方法的认识:2.熟练掌握距离制图创建缓冲区技术方法.3.掌握利用缓冲区分析方法解决地学空间分析问题的能力. 1. ...
- 关于 Apache 2.4 配置PHP时的错误记录
1. 访问虚拟配置的站点抛出 Forbidden 403 错误 解决办法: <Directory E:/Xingzhi/Php/xingzhi.xingzhi.com/> Opti ...
- UWP 双向绑定,在ListView中有个TextBox,怎么获取Text的值
要求:评论宝贝的时候一个订单里面包含多个产品,获取对产品的评论内容哦 1. xaml界面 <ListView x:Name="lvDetail"> <ListVi ...
- MinGW gcc 生成动态链接库 dll 的一些问题汇总(由浅入深,很详细)
网络上关于用 MinGW gcc 生成动态链接库的文章很多.介绍的方法也都略有不同.这次我在一个项目上刚好需要用到,所以就花了点时间将网上介绍的各种方法都实验了一遍.另外,还根据自己的理解试验了些网上 ...
- Zookeeper 部署Zookeeper仲裁模式集群
部署Zookeeper仲裁模式集群 本例在一台服务器上部署3个zk服务:z1.z2.z3. 1.下载Zookeeper https://zookeeper.apache.org/ 2.解压缩 .tar ...
- 【Qt】无边框窗体中带有ActiveX组件时的一个BUG
无意中发现的一个BUG,Qt5.1.1正式版首先创建一个GUI工程,拖入一个QAxWidget控件(为了使ActiveX生效,需要在.pro文件中加入CONFIG += qaxcontainer)接着 ...
- ACM竞赛中的魔方问题专题(不定时更新)
魔方有6个面,有24中不同的旋转方式: 一般有两种方法: (一):以1面为顶面,向右旋转0,90,180,270度 以2面为顶面,向右旋转0,90,180,270度 ... 以6面为顶面,向右旋转0, ...
- Google三驾马车:GFS、MapReduce和Bigtable
谈到分布式系统,就不得不提Google的三驾马车:Google fs[1],Mapreduce[2],Bigtable[3]. 虽然Google没有公布这三个产品的源码,但是他发布了这三个产品的详细设 ...
- 从 docker 到 runC
笔者在前文<RunC 简介>和<Containerd 简介>中分别介绍了 runC 和 containerd.本文我们将结合 docker 中的其它组件探索 docker 是如 ...
- Spring Type Conversion(Spring类型转换)
Spring Type Conversion(Spring类型转换) 1:概述: Spring3引入了core.convert包,提供了通用类型转换系统,定义了实现类型转换和运行时执行类型的SPI. ...