I have a asp list box in the aspx page.Through the external java script I need to populate the list box manually. How to access the list box in the javascript? Does it requires jquery?I am attaching the java scripting to the aspx page dynamically. I am not using any include/import statements for java script. So I am unable to use "Document" object.
How to create the new ListItem() in the java script code to populate it?
Is there any alternate way? Please help me out in this situation. Thanks in advance. Early response is appreciated.
You can do it in a variety of ways. You can get the listbox with:
Or with Jquery:
You can also set clientidmode to static which will use the same id as on the aspx page, so you could use: