Affecting controls outside an UpdatePanel during an Ajax server request

I have an UpdatePanel that periodically checks a database for changes. When a particular change is detected i'd like to change the visible property of a Panel outside of the UpdatePanel to false. I guess this requires a page postback/refresh of some kind... but since Ajax only refreshes bits of the page, it has no effect.

The way I was thinking to solve it was to do something like this...

if (condition is met)
{
    somePanel.Visible = false;
   
    force page postback ????????
}

That way i'm thinking it'll reload the page and take into account the property changes to the Panel. How do I force a page refresh from the code behind? or is there some other way of doing this that I'm missing?

Thanks!
robaherneAsked:
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.

ajollyCommented:
I will suggest you to use ScriptManager.RegisterStartupScript, and use a javascript code here to make the panel invisible.

ScriptManager.RegisterStartupScript(this, this.GetType(), Guid.NewGuid().ToString(), "JAVA SCRIPT CODE", false);
0
David RobitailleAnalyst ProgrammerCommented:
you could put the other panel in a other update panel. make sure it set to contitional and childrenastrigger = false.
when you change the visibylity of the panel, call the other update panel`s update() function.
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
robaherneAuthor Commented:
Thanks! I ended up just including the Panel I wanted to make invisible in the original UpdatePanel... your way would work better tho. I'll give it a go
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
ASP.NET

From novice to tech pro — start learning today.