Write in aspx page.
<asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click2" />
Write in code behind page
// get the URL of image
string path = Server.MapPath(Image1.ImageUrl) ;
// creating image from the image url
System.Drawing.Image i = System.Drawing.Image.FromFile(path);
// rotate Image 90
i.RotateFlip( System.Drawing.RotateFlipType.Rotate90FlipXY);
// save it to its actual path
i.Save(path);
// release Image File
i.Dispose();
// Set Image Control Attribute property to new image(but its old path)
Image1.Attributes.Add("ImageUrl", path);