Article: Write JavaScript function in Code Behind in ASP.Net using C# and VB.Net
how do i extract the image name from the javascript and save it in the database using code behind
this is the script
<script type="text/javascript">
function Send(element) {
var imageName = document.getElementById('myimg').getElementsByTagName('img')[0].src = element.src;
//var imageName = document.getElementById("imgFlag").src.split('/')[document.getElementById("imgFlag").src.split('/').length - 1];
var a = imageName.split("/");
var a_length = a.length - 1;
var aa = a[a_length];
var url = "Gown_Details.aspx?img=" + encodeURIComponent(aa);
window.location.href = url;
}
</script>