我们应该使用eval或数据绑定的事件? [英] Should we be using Eval or the Databind event?

查看:195
本文介绍了我们应该使用eval或数据绑定的事件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在创建使用Asp.Net一个网站,并使用控件,如ListView控件是很好的做法,使用评估和演示命令,或者应该有文字和填充在数据绑定事件的数据?

When creating a website using Asp.Net and using controls such as the ListView is it good practice to use the "Eval" command or should there be a literal and the data populated in the databind event?

推荐答案

依赖。如果你只是想读取数据,可以使用绑定()或者eval()函数,话说回来的eval()使用反射所以会有性能开销有

Depends if you want to write the data back on an update event in which case databind. If you only want to read that data you can use Bind() or Eval(), having said that Eval() uses reflection so there will be performance overhead there

这篇关于我们应该使用eval或数据绑定的事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆