Hello all,
I've got a page that displays a java applet written by an external company (basically displays a mapping application).
I need to be able to take snapshots of these maps and save them in an image format up to the server.
The applets allows me to copy the current view of the map to the clipboard. No problem there - I have coded a button on the form to do this. The button then sends the browser to another page in which I want to save the contents of the clipboard to an image file and upload it to the server.
The Clipboard.GetDataObject returns null however. I guess it's because the image object on the clipboard was not placed there by my ASP.NET app, but by the Java applet.
Does anybody have any idea how I can achieve this?
TIA.I have done a similar type project. Below is the code I used. The clipboard is the clipboard be it from ASP or Java.
Dim data As IDataObject
data = Clipboard.GetDataObject()
Dim bmap As Bitmap
If data.GetDataPresent(GetType(System.Drawing.Bitmap)) Then
Try
bmap = CType(data.GetData(GetType(System.Drawing.Bitmap)), Bitmap)
Catch
Beep()
edSysMessage.Text = "Error capturing photo."
End Try
Else
Beep()
edSysMessage.Text = "No image to capture."
End If
Showing posts with label written. Show all posts
Showing posts with label written. Show all posts
Wednesday, March 21, 2012
Perplexing Problem
Friday, March 16, 2012
persistent variables?
I have an ASP page written in VB.NET which needs to work with a persistent collection over a couple of requests.
I have tried using each "control" in a collection, which didnt work, anyways ...
I created a New Collection object, populated it and gave it so a Session() cookie to keep untill the next request/postback, but it only keps the first object in the collection?? :confused:
Does anyone know what I mean or should I write up a basic example showing what I mean?
Any help is appreciated, Thanks :)I think you should try explaining again. You mention persistence of variables, but you talk of controls...
Sure, I'll see if I can hack up a quick example tonight maybe (probably not enoguh time, I dont get home till late).
Maybe this will clarify in the mean time...
I am using a form full of controls, yes, but I am using a session cookie to keep information about these controls between postbacks, and because a single session cookie is keeping information for a fair couple controls it is holding a "collection"
So, a Session Variable is assigned a Collection containing information about the controls on the page.
The controls on your page, do they not persist their values between postbacks? That's the main idea behind ASP.NET.
The Frogs right.
Have you got viewstate enabled for each .net control ?
I have tried using each "control" in a collection, which didnt work, anyways ...
I created a New Collection object, populated it and gave it so a Session() cookie to keep untill the next request/postback, but it only keps the first object in the collection?? :confused:
Does anyone know what I mean or should I write up a basic example showing what I mean?
Any help is appreciated, Thanks :)I think you should try explaining again. You mention persistence of variables, but you talk of controls...
Sure, I'll see if I can hack up a quick example tonight maybe (probably not enoguh time, I dont get home till late).
Maybe this will clarify in the mean time...
I am using a form full of controls, yes, but I am using a session cookie to keep information about these controls between postbacks, and because a single session cookie is keeping information for a fair couple controls it is holding a "collection"
So, a Session Variable is assigned a Collection containing information about the controls on the page.
The controls on your page, do they not persist their values between postbacks? That's the main idea behind ASP.NET.
The Frogs right.
Have you got viewstate enabled for each .net control ?
Labels:
asp,
collection,
control,
couple,
net,
page,
persistent,
requests,
variables,
written
Subscribe to:
Posts (Atom)