Rectangle 27 0

asp.net How to pass clientId of a control in Repeater to JavaScript function?


<asp:Label ID="lblElementDetails" Text='<%# Eval("ElementDetails")%>' runat="server" style="display:block" />
function DisplayElementDetails(obj)
            {
                var name = obj.id.substring(0,(obj.name.length)-7) + "lblElementDetails"
                var obj = document.getElementById(name);
                obj.style.display = 'none';
                return false;
            }

I figured it out. I added following code to the javascript function:

Note