473,389 Members | 1,222 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,389 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 2537
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.