I am trying to find the control and display set to "block" or "none" on onclientselectedindexchanged event of RadCombobox. It returns always null. The script and controls are in User Control of Content page. There is also Master page for this Content page. I debugged the code with Debugger statement but the control has this tag. "ctl00_content2_ucControl1_imgTest". How can show and hide image? Please let me know. Thanks for your help. Also I tried to use document.getElementById("<%=imgTest.ClientID"); and $find(("<%=imgTest.ClientID") ; but none of these working.
<asp:Image ID="imgTest" ImageUrl="../../../images/test.gif" AlternateText="test"
runat="server" style="display:none"></asp:Image>
<telerik:RadComboBox ID="Combobox1" runat="server" DataTextField="test1"
DataValueField="test_id" NoWrap="true" Width="250" onclientselectedindexchanged="OnClientSelectedIndexChanged"> </telerik:RadComboBox>
<script type="text/javascript">
function OnClientSelectedIndexChanged(sender, eventArgs) {
{
var item = eventArgs.get_item();
if(item.get_value() == "8")
{
var imageControl = document.getElementById('imgTest');
imageControl.style.display = "block";
}
}
</script>