help with postback and disappearing div that contains a map.

I have a page that used the google maps API.  The map "canvas" is a div tag.  The map is created on the client side using the javascript API.   I have a button that causes a postback, after which my map "disappears".   So, I imagine this is related to the postback, and the fact that my map creation code is not called on postback.   Is that the case?   If yes, how do I fix this?  If not, what else might be going on?  See imamy map pageafter postbackges.
LVL 1
HLRosenbergerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

CodeCruiserCommented:
You can put the section below the map into an update panel so that the whole page does not postback.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
HLRosenbergerAuthor Commented:
ah ok.  there already is an update panel on the page. If I move the div that is the map canvas outside the update panel, that appears to solve the issue.  Does that make sense?
0
HLRosenbergerAuthor Commented:
ah, a second solution -  I added a second update panel around the button in question.  Does that make sense, too?  Now, with two update panels on the page, one within another, what dictates what part of the page get the postback, and when?
0
CodeCruiserCommented:
Each update panel has a triggers element where you can define what controls can trigger postback of that update panel

http://www.asp.net/web-forms/overview/older-versions-getting-started/aspnet-ajax/understanding-asp-net-ajax-updatepanel-triggers
0
HLRosenbergerAuthor Commented:
Thanks!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.