Sorry for the basic silly question. But I really dont have any idea on solving this. I have ASP controls (One Text Box and One Drop Down List). Now I need to access value property of TextBox as well as SelectedIndex property of dropdown list. This should be as simple as:
for TextBox:
document.getElementById('<%= myControl.ClientID %>').value
for DropDown List:
document.getElementById('<%= myControl.ClientID %>;').selectedindex
But in Visual Studio 2008, while I am writing these codes, it does not work. I can not find any value or selectedindex attribute for the respective control. I am not getting this, because in most forums and tutorials, they suggested in a simple way I mentioned.
Is there any other way or I am just missing something here? Please help me out. Thanks in advance