更新时间:2022-10-22 21:47:14
Make link button to the item which value u want to put in variable and use on data list item command event this methodprotected void DataListCommandEventHandler(object source, DataListCommandEventArgs e) { lblref.Text = ((LinkButton)e.Item.FindControl("RefrenceIdLabel")).Text; Session["refid"] = lblref.Text;