I am trying to access javascript document from ASP.net page code behind. How do I do same thing as below in c# code behind?
document.getElementById(id).src = "myurl.com"
Thank you for your help.
Add runat="server" and an ID to the element. You should then be able to access the src via the attributes collection.
<img src="http://www.google.com/img.png" id="imgGoogle" runat="server" />
Dim src as String = imgGoogle.Attributes("src")
src URL from the element.
srcurl of a random div/panel/etc, not get "access" to it (I'm not even sure what that would mean)