我想做一个类似 163 信箱的那样,用 GridView 做,点收信箱内的某行,就能显示出该行的详细信息. 怎么才能得到这一行的 ID 呢 ??protected void GridView1_RowCommand(object sender,GridViewCommandEventArgs e)
{
if (e.CommandName == "Select")
{
id = GridView1.DataKeys[index].Value.ToString();
Response.Write(id);
} }上面的 int index 怎么才能获得到呢?
在线等,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
{
if (e.CommandName == "Select")
{
id = GridView1.DataKeys[index].Value.ToString();
Response.Write(id);
} }上面的 int index 怎么才能获得到呢?
在线等,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
解决方案 »
- WinForms文字透明如何实现
- 这条语句该如何改写?
- sqlDA.Fill(dataSet, tableName)出错
- C#字符串全组合问题
- 如何限制文本框能输入5个汉字,但是能输入10个字母或数字
- 大家来帮我啊我现在不知学C#还是学ASP 啊~~~
- 技术平台准备迁徙到Dot Net, 请推荐基本Dot Net, C#的书籍。
- 使用usercontrol时遇到的问题!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- 请教个问题:关于“无法创建字段***的子表”
- 能不能把资源文件编译到DLL文件中?
- 怎么使用这个函数?
- WinForm编程,想把用户设置的字体信息存到数据库中,应该怎么做?
id = GridView1.DataKeys[Convert.ToInt32(e.CommandArgument)].Value.ToString()