C#
foreach (DataRow Row in oDs.Tables[0].Rows)
{
LitPreferances.Text += "<Li ID=LI_" + Row["pk_Preference_Branch_ID"].ToString() +"_"+ Row["pk_Preference_BranchType_ID"].ToString() +">" + Row["Branch_Name"].ToString() + " <a href='#' title='delete' class='itemDelete' onclick='return RemoveBranch();' tooltip='Remove Branch'>Remove</a></Li>";
}
Javascript
function RemoveBranch() {
$('.itemDelete').live('click', function () {
$(this).closest('Li').remove();
});
return false;
}
When attempting to use the 'live' method for the above function, an error is displayed stating that the object does not support the property or method 'live'.