I checked that the Imageoutput.asp x is called. Here is
the code. Could you check if the code is correct. Thanks
private void Page_Load(objec t sender, System.EventArg s 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.FromIm age(strimg);
Font myFont=new Font
("Verdana", 15);
StringFormat format=new
StringFormat();
format.FormatFl ags =
StringFormatFla gs.DirectionVer tical;
graph.DrawStrin g("Error
getting image",myFont, new SolidBrush(Colo r.Red), 5, 100);
strimg.Save
(Response.Outpu tStream,
System.Drawing. Imaging.ImageFo rmat.Jpeg);
graph.Dispose() ;
strimg.Dispose( );
}
else
{
//This line prevents the
map from being cached locally.
Response.Cache. SetCacheability
(HttpCacheabili ty.NoCache);
//Now clear the buffer
and write the bits to the page.
Response.Clear( );
Response.Conten tType =
myMapImage.Mime Data.MimeType;
Response.Binary Write
(myMapImage.Mim eData.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.asp x 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:imagebutto n id="ibtnMap" runat="server"
ImageUrl="Image Output.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.a spx")to be called?
Thanks
Holly Li
.
.