WebPart Initialization

Discussion in 'ASP .Net Web Controls' started by shane.niebergall@lmco.com, Jan 15, 2008.

  1. Guest

    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
     
    , Jan 15, 2008
    #1
    1. Advertising

  2. Guest

    On Jan 15, 2:36 pm, wrote:
    > 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...
     
    , Jan 21, 2008
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. JKop
    Replies:
    10
    Views:
    948
  2. anars
    Replies:
    0
    Views:
    367
    anars
    Jan 7, 2007
  3. Matthias Kaeppler
    Replies:
    2
    Views:
    446
    Victor Bazarov
    Jul 18, 2005
  4. Replies:
    6
    Views:
    462
    Ron Natalie
    Dec 11, 2005
  5. toton
    Replies:
    5
    Views:
    935
    Victor Bazarov
    Sep 28, 2006
Loading...

Share This Page