I have couple of imagebuttons on the webpage
User clicks on any two of them , i pass the coordinates of those selected imagebuttons to DrawLine()
It draws a line but the entire webpage becomes blank,only the line at the top left corner appears
Please help, its urgent, I wilbe be very happy if anybody can let me know with example what is going wrong
Email :
[email protected]i have uploaded the code that i am using for reference
Thanks in advance
private void drawLine(int x1, int y1, int x2, int y2)
{
Point point1 = new Point(x1, y1);
Point point2 = new Point(x2, y2);
Bitmap objBitmap;
Graphics objGraphics;
objBitmap = new Bitmap(200, 200);
objGraphics = Graphics.FromImage(objBitmap);
objGraphics.Clear(Color.White);
Pen p = new Pen(Color.Black,1);
Rectangle rect = new Rectangle(10, 10, 280, 280);
objGraphics.DrawLine(p, point1, point2);
objBitmap.Save(Response.OutputStream, ImageFormat.Gif);
objBitmap.Save(Server.MapPath("/images/x.Gif"), ImageFormat.Gif);
objBitmap.Dispose();
objGraphics.Dispose();
}
}