I checked that the Imageoutput.aspx is called. Here is
the code. Could you check if the code is correct. Thanks
private void Page_Load(object sender, System.EventArgs e)
{
//I can't create image in this class
becasue of other issues. So I create the image in other
page and put it in session
MapImage myMapImage = (MapImage)
Session["MAPIMAGE"];
if (myMapImage == null)
{
Bitmap strimg= new Bitmap
(400,200);
Graphics graph =
Graphics.FromImage(strimg);
Font myFont=new Font
("Verdana", 15);
StringFormat format=new
StringFormat();
format.FormatFlags =
StringFormatFlags.DirectionVertical;
graph.DrawString("Error
getting image",myFont, new SolidBrush(Color.Red), 5, 100);
strimg.Save
(Response.OutputStream,
System.Drawing.Imaging.ImageFormat.Jpeg);
graph.Dispose();
strimg.Dispose();
}
else
{
//This line prevents the
map from being cached locally.
Response.Cache.SetCacheability
(HttpCacheability.NoCache);
//Now clear the buffer
and write the bits to the page.
Response.Clear();
Response.ContentType =
myMapImage.MimeData.MimeType;
Response.BinaryWrite
(myMapImage.MimeData.Bits);
}
Response.End();
}
Holly Li
-----Original Message-----
It works fine on some machines (machines that we
configed. The machines that are not working are those
outof our control.)
I have put some codes in ImageOutPut.aspx to display
things like error message. It acts like this page is
never been called. Thanks
-----Original Message-----
I would guess either ImageOuput.aspx is missing, orcannot successfullyreturn an image.
"Holly Li" <ho******@dtag.com> wrote in message
news:0a****************************@phx.gbl... Hi,
I have an aspx page that has an image button on it.
The image url of this button is another aspx page that
output an image.
<asp:imagebutton id="ibtnMap" runat="server"
ImageUrl="ImageOutput.aspx"></asp:imagebutton></TD>
The page works fine on all our dev boxes but doesn'twork on the staging and production boxes that are out of
our developer's control. The button has a broken image
icon on it.
To rule out problem one by one, does someone know
thatif there is a config issue that could prevent the second
aspx page ("ImageOutput.aspx")to be called?
Thanks
Holly Li
.
.