How to pass textbox value to Javascript variable?
<p>I need to pass a textbox value in asp.net to the javascript variable videoID and save it to the database.</p>

<p><strong>Here is my code</strong></p>

<pre><code>&lt;script&gt;
var tag = document.createElement('script');
tag.src = "http://www.youtube.com/player_api";
var firstScriptTag = document.getElementsByTagName('script')[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);

var player;
function onYouTubePlayerAPI() {
player = new YT.Player('player', {
height: '350',
width: '600',
videoId: 'ASO_zypdnsQ',
events: {
'onReady': onPlayerReady
}
});
}
&lt;/script&gt;
</code></pre>
