开发者

how to access datakey value in .cs file of a listview control

    protected void ListView1_SelectedIndexChanging(object sender, ListViewSelectEventArgs e)
{
string id = ListView1.DataKeys[e.NewSelectedIndex].Value.ToString();
lblMessage.Text = "ListView Selected ID : " + id;
} 

is there any other way to access datakeynames values in my .aspx page datakeynames="R开发者_JAVA技巧esourceID"


string id = ListView1.DataKeys[e.NewSelectedIndex].Value.ToString(); the only we can do is like this

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜