i have a link button to remove the selected value in the user control. If we are adding value to the control means i have to make this link button visible. so i am passing the client id of the link button to the user control and saving that id in a hidden control in the User control. and one i select the value in the user control im making the link button visible.
Problem:
If the link button visibility false means unable to access the control.
var removeUser = document.getElementById(elementRemoveUser.value); returns null. if the control is visible means it is working fine.
var elementRemoveUser = document.getElementById("<%=hdnRemoveUser.ClientID %>");
if (elementRemoveUser.value != '') {
var removeUser = document.getElementById(elementRemoveUser.value);
if (removeUser != null) {
removeUser.style.visibility = "visible";
}
}