读书人

163 信箱的效果是如何做的 ? 帮忙~ .

发布时间: 2012-03-06 20:47:55 作者: rapoo

163 信箱的效果是怎么做的 ?? 帮忙~!! 在线等...........
我想做一个类似 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 怎么才能获得到呢?


在线等,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

[解决办法]

id = GridView1.DataKeys[Convert.ToInt32(e.CommandArgument)].Value.ToString()
[解决办法]
Request.Form.Get( "checkboxname ")

读书人网 >C#

热点推荐