<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=g Read More
posted @ 2010-07-08 13:54
汉卿
Views(193)
Comments(0)
Diggs(0)
今天要给repeater做上一个checkbox,然后能做到圈选反选,本来很简单的事,但是我发现了findcontrol方法的一个好的优点。前台绑定方法如下:<asp:Repeater ID="Repeater1" runat="server"> <ItemTemplate><asp:CheckBox ID="ch" runat="server" /></ItemTemplate> </asp:Repeater>后台代码如下:foreach (Contro Read More
posted @ 2010-07-08 12:17
汉卿
Views(197)
Comments(0)
Diggs(0)
如何直接取出Repeater中的<%# Eval("Quantity") %>*<%# Eval("MemberPrice")%>的值,而不是50*60。 你希望得到 3000 吗? <%# Eval("Quantity") %> 为object类型, 你需要把它转换为 int类型! 如果你有很多这样的处理, 你可以在后台写一个方法! public int SetValue(object a, object b){ return Convert.Int32(a)*Convert.Int32(... Read More
posted @ 2010-07-08 10:06
汉卿
Views(393)
Comments(0)
Diggs(0)

浙公网安备 33010602011771号