protected void SqlDataSource1_Selected(object sender, SqlDataSourceStatusEventArgs e)
{
Label4.Text = "共有记录:"+ e.AffectedRows.ToString()+"条";
}
错误提示:
System.Web.UI.WebControls.SQLDataSourceSelectingEventArgs 并不包含“AffectedRows的定义
{
Label4.Text = "共有记录:"+ e.AffectedRows.ToString()+"条";
}
错误提示:
System.Web.UI.WebControls.SQLDataSourceSelectingEventArgs 并不包含“AffectedRows的定义
解决方案 »
- 用C#代码 怎样获取数据库的所有的表名
- 高分求救串口打不开啦
- 图片自适应大小,跪求答案!!(网上找了好多办法都没用!)
- 急急急!datagridview问题?在线等待...谢谢大家
- “SELECT * FROM 产品 WHERE 产品ID BETWEEN fanye AND fanye1 ”语句有什么错误吗
- 如何判断xml的节点中是否存在子节点??
- 这是为什么?
- asp.net环境的问题.大家来看看!谢谢!
- 我对提示框的方法自动测试解决方法,欢迎大家拍砖
- 关于C#组件的部署问题.
- 新手问一简单的文本显示问题,谢谢各位给与指点!
- C# 用串口控件发送命令时...怎么不稳定呢!!!???????????????????????
{
// Use the Exception property to determine whether an exception
// occurred during the update operation.
if (e.Exception == null)
{
// Sometimes an error might occur that does not raise an
// exception, but prevents the update operation from
// completing. Use the AffectedRows property to determine
// whether the record was actually updated.
if (e.AffectedRows == 1)
{
// Use the Keys property to get the value of the key field.
String keyFieldValue = e.Keys["CustomerID"].ToString(); // Display a confirmation message.
Message.Text = "Record " + keyFieldValue +
" updated successfully. "; // Display the new and original values.
DisplayValues((OrderedDictionary)e.NewValues, (OrderedDictionary)e.OldValues);
}
else
{
// Display an error message.
Message.Text = "An error occurred during the update operation."; // When an error occurs, keep the GridView
// control in edit mode.
e.KeepInEditMode = true;
}
}
else
{
// Insert the code to handle the exception.
Message.Text = e.Exception.Message; // Use the ExceptionHandled property to indicate that the
// exception is already handled.
e.ExceptionHandled = true; e.KeepInEditMode = true;
}
}