这是新闻标题长度截断处理的问题,因为用控件绑定数据非常不好判断和处理字段的长度,所以最好能在客户端(JAVASCRIPT)自动判断截断过长的新闻标题,因为FF不支持TEXT-OVERFLOW,所以基本可以否定CSS方法,最好能用JAVASCRIPT脚本来处理。
望高手指点,举个小例子说明一下更好,谢谢!
最后祝解放军攻台顺利!
望高手指点,举个小例子说明一下更好,谢谢!
最后祝解放军攻台顺利!
解决方案 »
- 开源项目代码
- 我的网站要做个站内搜索
- 下了很大决心才提出来的问题!
- vs2005中createUserWizard控件如何连接本地的数据库
- 在模板列中添加一个Button控件,为什么无法响应DataGrid的ItemCommand事件了?
- 菜鸟求助:关于DropDownList控件的问题,请指点一下……
- 请问LINKBUTTON按下后关闭浏览器的代码怎么写(C#)?
- Internet服务管理器的配置问题,着急!!!!!!!!!!
- 请问该段代码是否完全关闭了数据库的连接?是否会造成连接池或其它数据库资源耗尽?
- 请问我建了一个OLEDBCommand来插入记录,如何点击一个按钮来执行这个OLEDBCommand?
- 如何做计时器?
- 我是新手,问一个关于session的问题
比如 gridview 有个RowDataBound事件
可以在这里面处理 用e.Row.Cells来得到当前行的数据
<asp:repeater runat="server" ID="arts_1" OnDataBinding="arts_1_DataBinding">
<headertemplate> </headertemplate>
itemtemplate>
<a href="" target="_blank">
<a href ="<%#DataBinder.Eval(Container.DataItem,"title") %>">
<%#DataBinder.Eval(Container.DataItem,"title").ToString().Length>11?DataBinder.Eval (Container.DataItem,"title").ToString().Substring(0,12):DataBinder.Eval (Container.DataItem,"title").ToString().Substring(0,7) %>
....</a></a> </itemtemplate>
<footertemplate> </footertemplate>
</asp:repeater>