if(MessageBox.Show("你的输出信息","你的标题信息",MessageBoxButtons.YesNo,MessageBoxIcon.Question)==DialogResult.Yes)
{
MessageBox.Show("你回应的是---Yes","返回信息",MessageBoxButtons.OK,MessageBoxIcon.Information);
}
else
{
MessageBox.Show("你回应的是---No","返回信息",MessageBoxButtons.OK,MessageBoxIcon.Information);
}
{
MessageBox.Show("你回应的是---Yes","返回信息",MessageBoxButtons.OK,MessageBoxIcon.Information);
}
else
{
MessageBox.Show("你回应的是---No","返回信息",MessageBoxButtons.OK,MessageBoxIcon.Information);
}
解决方案 »
- C#串口通信中如何接收串口的数据
- 得到唯一码的问题?
- select count(*) from table where....
- 怎样让User可以给网页的物品打分数的。。?好像Rating System的.. 。。一星,二星。。三星。。然后可以可以记录并显示分数在那页下次User
- 怎样将 添加到全局程序集缓存中的程序集 去除?
- 请问在c#中如何画出圆角矩形?谢谢
- c#能不能动态增加类成员
- C# TCP 异步
- 请教各位如何获得dataset和datareader的记录条数
- 我的170分题要结帖了,大家来领分吧!
- 为什么我用StreamReader从.txt读中文出来的是乱码?
- C#中如何对字符串进行不区分大小写的比较?
我试过用using System.Windows.Forms;调试时显示:
类型或命名空间名称“Windows”在类或命名空间“System”中不存在(是否缺少程序集引用?)
是不是不能用messagebox?我该怎么样解决问题?
ListItemType listtype=e.Item.ItemType;
if ((listtype==ListItemType.Item)||(listtype==ListItemType.AlternatingItem)||(listtype==ListItemType.EditItem))
{
TableCell myTableCell = new TableCell();
myTableCell = e.Item.Cells[13]; //删除按钮所在列
LinkButton myDeleteButton = new LinkButton();
myDeleteButton = (LinkButton)myTableCell.Controls[0];
myDeleteButton.Attributes.Add("onclick","return confirm('确实要删除当前行记录吗?');"); }
Document.Alert()
你的方法能不能讲详细一点,我刚学习.net的。谢谢~~~
2.其实在你点击此删除按钮时,执行两个事件,先是grid的ItemCreated,再是DeleteCommand
3.把上面的程序放到你的grid的ItemCreated中,主要要修改的地方就是你的删除列的列号,再在你grid的DeleteCommand中执行你确认要删除的语句(这个要自己写哦)
不知道上面说的你清楚了没?其实我也是刚接触.net没多久,一块学习吧!
dataGrid.DataSource = dataSet.Tables["MyTable"].DefaultView;
dataGrid.DataBind();
foreach(DataGridItem item in dataGrid.Items)
{
((LinkButton)item.Cells[columnIndex].Controls[0]).Attributes.Add("onClick",
"return confirm('Are you sure to delete?');");
}
// columnIndex is the index of the column
按你的方法成功了,我还想继续做一下改进
现在的弹出对话框标题是“micsoft internet exploer”,我想改变标题的文字,可以做到吗?