在MSDN 上,解决了,不用帮忙了,谢谢!
解决方案 »
- 恳请解决下这两个错误原因,小弟对web编程不是太熟悉
- 用户注册页面,要是填写注册信息时间稍微长一点,再提交的话,就会报错!
- asp.net(C#)生成静态文件(htm)如何进行搜索
- Regex 什么时间用?
- 请教:不用file field 如何批量上传?
- 怎样给自定义的dropdownlist控件加单击事件
- 请高手指点:关于windows form 的几个小问题:comboBox,dagagrid............
- DataGrid 分页时怎么设置每列显示的宽度
- ****很简单的问题,关于linkbutton的commandname的问题(50)******
- NPOI向Excel单元格写入数据时出现“未将对象引用设置到对象的实例”
- 不知道有没有人知道这个东东。
- 哪位兄台做过移动程序(C#)
{
// If multiple ButtonField column fields are used, use the
// CommandName property to determine which button was clicked.
if(e.CommandName=="Add")
{
// Convert the row index stored in the CommandArgument
// property to an Integer.
int index = Convert.ToInt32(e.CommandArgument);
// Retrieve the row that contains the button clicked
// by the user from the Rows collection.
GridViewRow row = AuthorsGridView.Rows[index];
// Create a new ListItem object for the author in the row.
ListItem item = new ListItem();
item.Text = row.Cells[2].Text + " " + row.Cells[1].Text;
// If the author is not already in the ListBox, add the ListItem
// object to the Items collection of the ListBox control.
if(!AuthorsListBox.Items.Contains(item))
{
AuthorsListBox.Items.Add(item);
}
}