By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,501 Members | 1,678 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,501 IT Pros & Developers. It's quick & easy.

using .aspx page to output image problem

P: n/a
Hi,
I have a page (A) that allows users to enter addresses
and displays direction information and map images.
The page A calls Microsoft's mappoint web service, gets
the route info and map image. Page A contains an image
button with the image url set as MapOutput.aspx
<asp:imagebutton id="ibtnMap" runat="server"
ImageUrl="MapOutput.aspx"></asp:imagebutton>

After page A got the image, it stores the image into
session. In MapOutput page, it gets the image out from
session and output the image through Response object.

The map works fine on a single web server setup. The
image wouldn't show up on a load balanced web server
setup (consists of two web servers). Sticky session is
working since it is also used in other places.

Does anyone have ideas?

Thanks.

Holly Li

Nov 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Holly,
I admitedly don't know the full picture (no pun intended), but it seems to
me you could rearchitect things to make a lot more sense and probably avoid
this problem. The thing that sticks out the most is: Why is page A calling
the webservice as opposed to MapOutput.aspx ???

It also seems to me that you are using a session simply to communicate
between page (A) and MapOutput.aspx - which is a poor way to communicate
between a page and a user control.

I would create an address class (hopefully you already have one)

public class Address
pirvate street as string
private zip as string
...
public property ....
end class

I would create a custom server control which inherits from ImageButton and
exposes a property of type Address

public class MapPointImage
inherits ImageButton

private _address as Address
public property Address() as Address
get
return _address
end get
set (value as Address)
_address = value
end set
end property
and would implement the Webservice code in the render method of this class.

You can then create the address object in page A and set it to the Address
property of yourMapPointImage reference.

Karl

"Holly" <ho******@dtag.com> wrote in message
news:19****************************@phx.gbl...
Hi,
I have a page (A) that allows users to enter addresses
and displays direction information and map images.
The page A calls Microsoft's mappoint web service, gets
the route info and map image. Page A contains an image
button with the image url set as MapOutput.aspx
<asp:imagebutton id="ibtnMap" runat="server"
ImageUrl="MapOutput.aspx"></asp:imagebutton>

After page A got the image, it stores the image into
session. In MapOutput page, it gets the image out from
session and output the image through Response object.

The map works fine on a single web server setup. The
image wouldn't show up on a load balanced web server
setup (consists of two web servers). Sticky session is
working since it is also used in other places.

Does anyone have ideas?

Thanks.

Holly Li

Nov 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.