用DATEDIFF函数求差值,绑定到DBGRID一列,在它的itemdatabound事件里判断if e.item.cells(x).text>... then
e.Item.Cells(x).fontColor = Color.AliceBlue
end if
e.Item.Cells(x).fontColor = Color.AliceBlue
end if
解决方案 »
- 根据配置文件动态生成页面
- 找到多个具有相同 ID“_header”的控件。FindControl 要求控件具有唯一的 ID。
- 从gridview的RowDataBound事件想到的
- wap页面判断访问来源:手机或pc
- 如何在ASP.NET(C#)把TextBox的Text里输入的值转成ASCII码,急....
- 自定义控件放在datalist中遇到分页时获取不到属性值
- 哪位能帮我解释区分下面三个概念?
- 系统页面老是出现“运行时错误 ”的情况,高手请了!!!!!
- 急(在线等待):请问怎样在Asp.net里将一个IFrame里的Table导出为Excel!!!
- 关于页面上的ImageButton按钮弹出对话框怎么做
- 一个简单的SQL问题
- 我用ASP。NET中开发程序,连的数据库是 ORACLE 8I 运行程序出现错误,提示ORACLE网络组件没有装完整?
Private Sub DataGrid2_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles DataGrid2.ItemDataBound
If e.Item.ItemIndex >= 0 Then
If CInt(e.Item.Cells(0).Text) > 300 Then
e.Item.BackColor = System.Drawing.Color.Brown
Else
e.Item.BackColor = System.Drawing.Color.Gray
End If
End If
End Sub
为什么会多出来2个-1呢?这两个-1又代表什么呢?