Hi Venkat,
Check the below code. I've tested it in IE8.
JS code for thiss solution is as follows
<script type="text/javascript">
function showReadonly(valobj) {
var txtobj = document.getElementById("<%= txtid.ClientID %>");
if (valobj == "Other Course") {
txtobj.disabled = false;
// If you want to display the control
txtobj.style.display = 'inline';
txtobj.value = '';
txtobj.focus();
}
else {
txtobj.disabled = true;
// If you want to hide the control
txtobj.style.display = 'none';
txtobj.value = '';
}
}
</script>
HTML for that should be as follows
<asp:TextBox ID="txtid" runat="server"></asp:TextBox>
<asp:DropDownList ID="ddlid" runat="server" onChange="javascript:showReadonly(this.value);">
<asp:ListItem Text="Select" />
<asp:ListItem Text="English" />
<asp:ListItem Text="Other Course" />
</asp:DropDownList>
Try this way.
Thank you,
Vamsi