Image rotation in ASP.Net

This code for image rotation is simple so we will start step by step.

Step 1) Take an image and button control; code like:

<form id="form1" runat="server">
         <asp:Image ID="Image1" runat="server" Height="178px" Width="247px
ImageUrl="~/images/2168NN97_4[1].jpg" />
     <asp:Button ID="Button1" runat="server" Text="&gt;&gt;" 

Step 2) Double-click on the button and write code as follows:

protected void Button1_Click(object sender, EventArgs e)
        string p = Server.MapPath(Image1.ImageUrl);
        System.Drawing.Image i = System.Drawing.Image.FromFile(p);

Step 3)

Now execute the application and verify that it runs as expected.

Similar Articles