I have a data list with 2 repeated columns. I am trying check a value and if the value is not the same then I need to disable the textbox next to the name. This works on the first column, but not the 2nd why?
protected void datalist_ItemDataBound(object sender, DataListItemEventArgs e)
{
foreach (DataListItem reptItem in datalist.Items) {
Label lblDatalist = rptItem.FindControl("lblName") as Label;
if (lbldatalist = "Name")
{
enable textbox
}else{
disable textbox
}
...
Go to the complete details ...