WebPart Initialization

S

shane.niebergall

I have several web parts on a page, some of which provide client-side
functionality (such as a google maps control). I've noticed that upon
first page load, everything works great. However, as soon as I invoke
a web part action such as minimizing or moving a part, those rich web
parts stop working. When I refresh the page, it works again.

It's as if something (OnInit, Render, etc) is called during page load,
but not during the web part post back. I should mention that my web
part zones are in an update panel (using .NET 3.5). Has anyone
experienced this before? Any suggestions?

Thanks!
Shane
 
S

shane.niebergall

I have several web parts on a page, some of which provide client-side
functionality (such as a google maps control). I've noticed that upon
first page load, everything works great. However, as soon as I invoke
a web part action such as minimizing or moving a part, those rich web
parts stop working. When I refresh the page, it works again.

It's as if something (OnInit, Render, etc) is called during page load,
but not during the web part post back. I should mention that my web
part zones are in an update panel (using .NET 3.5). Has anyone
experienced this before? Any suggestions?

Thanks!
Shane

I saw the following recommendation: To inject JavaScript during a
partial postback, you need to use
ScriptManager.RegisterStartupScript().

This has gotten me further, but my solution seems to be messy. I just
don't understand why the javascript of a control doesn't get executed
automatically when it's added to the page dynamically...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,227
Latest member
Daniella65

Latest Threads

Top