0

i have a asp.net application. It is assumed that every Bus has a android device which continuously sends its current location to wcf rest service. Now the administrator on the other side needs to monitor the current location of theses buses. I have a dropdow list from where he chooses the bus number. now i need to send this bus number to the wcf service and show the current location on the map I have no clue as to how do i do this. please help. The plotting algorithm is in javascript and i need to use the asp.net variable in java script to plot the current loacation.

1 Answer 1

1

to get the dropdownlist value use this code:

    var ddl= document.getElementById("<%= yourDDLId.ClientID %>")
    var select= ddl.options[ddl.selectedIndex].text;

and sometimes it works also if you write only:

    var ddl= document.getElementById("yourDDLId")
    var select= ddl.options[ddl.selectedIndex].text;
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.