Here is my issue: on my webpage I'm displaying an image that been taken from a given URL (the image been display in a div).On the backhand I'm setting up the URL with all the information. Beside the fact that I'm showing the picture I want to print the page - means print the div with all the content...Now when I'm trying to print Because of the image that been take from the given URL I'm getting empty place where the image should be.
In order to solve it I figure it out that I need to do something in the background to save the image from the given URL so I have this code below.... How can I send what I'm getting from function to JS Code in order to combined the missing part when I print????
If someone have other solution please help me....
The URL of the Image : https://freemobilewallpaper.files.wordpress.com/2009/10/kuala3.jpg
JS Function:
//============================== //
// Print Map//
// ============================== //
function printDiv() {
How Can I print what been set in the code behind?????@#!@
var test = document.getElementById("<%= divRightWrapper.ClientID %>");
document.body.innerHTML = test;
var newWin = window.open();
newWin.document.write(test.innerHTML);
newWin.print();
}
Back Code:
Dim img As Image = GetPicture(urll)
How to send it to JS?????!@#$!
Private Function GetPicture(ByVal url As String) As Image
Try
url = Trim(url)
If Not url.ToLower().StartsWith("http://") Then url _
= "http://" & url
Dim web_client As New WebClient()
Dim image_stream As New _
MemoryStream(web_client.DownloadData(url))
Return Image.FromStream(image_stream)
Catch ex As Exception
End Try
Return Nothing
End Function