开发者

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

开发者 https://www.devze.com 2022-12-11 23:26 出处:网络
protected void ListView1_SelectedIndexChanging(object sender, ListViewSelectEventArgs e) { string id = ListView1.DataKeys[e.NewSelectedIndex].Value.ToString();
    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

精彩评论

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