473,666 Members | 2,115 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 edititemtemplat e, 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 2549
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()).getMill iseconds();
}

The url will look like

"getPhoto.aspx? "+random()

Eliyahu

"byrd48" <by*****@rocket mail.com> wrote in message
news:11******** **************@ g49g2000cwa.goo glegroups.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 edititemtemplat e, 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_Rotate Photo(ByVal sender As Object, ByVal e As
DataListCommand EventArgs) Handles DataList1.ItemC ommand
If e.CommandArgume nt = "rotateleft " Then
'rotate the photo left
Me.m_class_phot o.PhotoRotate(" l",
Me.m_Class_Gall ery.Gallery_Ret rieve(Session(" UserGallery")). Tables(0).Rows( e.Item.ItemInde x).Item("PhotoN ame"),
Session("UserID "))

' rotate the thumb left
Me.m_class_phot o.ThumbRotate(" l",
Me.m_Class_Gall ery.Gallery_Ret rieve(Session(" UserGallery")). Tables(0).Rows( e.Item.ItemInde x).Item("PhotoN ame"),
Session("UserID "))
End If

If e.CommandArgume nt = "rotaterigh t" Then
'rotate the photo right
Me.m_class_phot o.PhotoRotate(" r",
Me.m_Class_Gall ery.Gallery_Ret rieve(Session(" UserGallery")). Tables(0).Rows( e.Item.ItemInde x).Item("PhotoN ame"),
Session("UserID "))

' rotate the thumb right
Me.m_class_phot o.ThumbRotate(" r",
Me.m_Class_Gall ery.Gallery_Ret rieve(Session(" UserGallery")). Tables(0).Rows( e.Item.ItemInde x).Item("PhotoN ame"),
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
11615
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 strSerialNo = "20031124123456-1"; // Create a bitmap... //System.Drawing.Bitmap imgBitmap = new Bitmap(200, 30,
7
2453
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 that is next to the file field. Once i browse for the file, i check the box to rotate and then upload. However i am unable to get it to rotate when the box is checked. It only rotates when i set a boolean (RotateImage) to true. Any ideas on how to...
3
6710
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 looked at the System.Drawing.Drawing2D.Matrix, which can be applied on the Transform property of the Graphics object, but it will work on the complete graphics object and there is no mirror method in it.
3
5112
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
1413
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.- Fisrt i have a Image (Texture) http://www.gratisweb.com/pepe_hack/jaja/textura.jpg
6
3216
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
1356
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 it is cached in the user computer already now I would like to use the same image cached in the client side instead of going to server couple of times to get the image. Does any one know how to achive this in asp?
6
4944
by: kiranbabu | last post by:
how to rotate an image using html/javascript
1
2292
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
8449
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8360
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8876
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8784
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8642
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7387
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
2774
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2011
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1777
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.