473,405 Members | 2,354 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Photo Rotate Image Cached

Hi,
I am developing a web site which allows users to upload and share
photos. I have a datalist which lists the photos and has the usual
edit, update commands.
Within the edititemtemplate, I have links to allow the user to rotate
the photo 90 degrees left or right. After I rebind the datalist,the
photo is not rotated on the web page, although it correctly rotated on
the server. If I click refresh, it updates, but calling refresh causes
it to submit the rotate command again,and the photo shows as having
been rotated twice (180 degrees).
How can I force the page to upload the newly rotated photo after the
command event from the datalist?
Thanks in advance for your help.

Jon

Nov 19 '05 #1
3 2538
I also tried to set the outputcache of the page to 1 second and it
still is not working.
Thanks,
Jon

Nov 19 '05 #2
Jon,

Trick the browser by adding a random query parameter to the image url. I use
the millisecond part of current time:

function random(){
return (new Date()).getMilliseconds();
}

The url will look like

"getPhoto.aspx?"+random()

Eliyahu

"byrd48" <by*****@rocketmail.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
Hi,
I am developing a web site which allows users to upload and share
photos. I have a datalist which lists the photos and has the usual
edit, update commands.
Within the edititemtemplate, I have links to allow the user to rotate
the photo 90 degrees left or right. After I rebind the datalist,the
photo is not rotated on the web page, although it correctly rotated on
the server. If I click refresh, it updates, but calling refresh causes
it to submit the rotate command again,and the photo shows as having
been rotated twice (180 degrees).
How can I force the page to upload the newly rotated photo after the
command event from the datalist?
Thanks in advance for your help.

Jon

Nov 19 '05 #3
Hi,
I'm not calling the page through a URL, here is the code that is
executed on the codebehind when the user clicks the rotate left or
rotate right button.

Thanks,

Jon

Sub DataList_RotatePhoto(ByVal sender As Object, ByVal e As
DataListCommandEventArgs) Handles DataList1.ItemCommand
If e.CommandArgument = "rotateleft" Then
'rotate the photo left
Me.m_class_photo.PhotoRotate("l",
Me.m_Class_Gallery.Gallery_Retrieve(Session("UserG allery")).Tables(0).Rows(e.Item.ItemIndex).Item("P hotoName"),
Session("UserID"))

' rotate the thumb left
Me.m_class_photo.ThumbRotate("l",
Me.m_Class_Gallery.Gallery_Retrieve(Session("UserG allery")).Tables(0).Rows(e.Item.ItemIndex).Item("P hotoName"),
Session("UserID"))
End If

If e.CommandArgument = "rotateright" Then
'rotate the photo right
Me.m_class_photo.PhotoRotate("r",
Me.m_Class_Gallery.Gallery_Retrieve(Session("UserG allery")).Tables(0).Rows(e.Item.ItemIndex).Item("P hotoName"),
Session("UserID"))

' rotate the thumb right
Me.m_class_photo.ThumbRotate("r",
Me.m_Class_Gallery.Gallery_Retrieve(Session("UserG allery")).Tables(0).Rows(e.Item.ItemIndex).Item("P hotoName"),
Session("UserID"))
End If

bindlist()
End Sub

Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Mullin Yu | last post by:
I can create an image object with a string printed on it. But, how I can rotate the whole image 270 degree clockwise static public Bitmap createSerial() { Graphics objGraphics; string...
7
by: Showjumper | last post by:
Hi, I have developed an upload server controls to be reused over a number of projects. One of the tasks it needs to handle is to rotate an image. I want to accoplish this by checking the checkbox...
3
by: Eduard Witteveen | last post by:
Hello list, I have code the draw MyDrawingObject information on a System.Drawing.Graphics object. The code is more/less the following: I now want to rotate / mirror the object i draw. I've...
3
by: Diego F. | last post by:
Hi all. I have a listview with images and my application must be able to rotate one image. I need a method to rotate 90 degrees rigth (i.e.). Is that possible? -- Regards, Diego F.
0
by: deerhack | last post by:
My english is very Bad xD. Well, How do rotate Image in the Plain X Y Z ? This is easy Using Studio Max , Sketup , Quark , etc ... But in Php and GD ?? Is it really better understand. 1.-...
6
by: swethak | last post by:
Hi, I displayed the image taken from database.How to raotate that image using javascript.plz tell that how to start the logic.plz tell that some reference websites.
3
by: CSharper | last post by:
I have a situation where I have an img tag in asp page which loads the image from server. Now I need to use the same image in couple of more places on the same page. When the first image is loaded...
6
by: kiranbabu | last post by:
how to rotate an image using html/javascript
1
by: Nilla2010 | last post by:
Hi, I would like to rotate image on mouse event.If i move the image left side by mouse it should rotate on left side and vice versa. Thanks in advance
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.