I have an asp control for a textbox and a script that's trying to get the value from the textbox but it wont fire the alert:
<asp:TextBox ID="txtEmailList" runat="server" TextMode="MultiLine"></asp:TextBox>
<script>
$(document).ready(function () {
$("#btnCopyAll").click(function () {
alert(document.getElementById('#txtEmailList').value);
});
});
</script>
I tried:
alert(document.getElementById('<%txtEmailList.ClientID%>'));
As per this answer, but it did not work.
How do I accomplish this?