1

我已经使用 Modal PopUp Extender 很长时间了。我知道我需要将弹出控制面板放在更新面板中以避免重新加载页面。这是我第一次使用气球弹出。我使用了与 ModalPopUp 相同的方法,但单击目标按钮仍会导致页面重新加载。

这是弹出扩展器和目标 ID 的代码:

<asp:ImageButton ID="B_HELP_SFtolerance" runat="server" BorderColor="Black" 
 BorderStyle="Solid" Height="21px" ImageUrl="~/Resources/1401344600_info6.png" 
 ToolTip="Scale Factor Tolerance Info." Width="25px" />


<ajaxToolkit:BalloonPopupExtender ID="B_HELP_SFtolerance_BalloonPopupExtender"
 runat="server"  BalloonPopupControlID="P_HELP_SFTolerance"
    Position="TopRight" 
    BalloonStyle="Rectangle"
    BalloonSize="Large"
    CustomCssUrl="CustomStyle/BalloonPopupOvalStyle.css"
    CustomClassName="oval"
    UseShadow="true" 
    ScrollBars="Auto"
    DisplayOnMouseOver="false"
    DisplayOnFocus="false"
    DisplayOnClick="true" TargetControlID="B_HELP_SFtolerance" >
    </ajaxToolkit:BalloonPopupExtender>

这是我的 Panel PopUpControl ID 代码:

 <asp:Panel ID="P_HELP_SFTolerance" runat="server" BackColor="#0000CC" 
    Height="218px" Width="404px">
 <asp:UpdatePanel ID="UP2" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="False" RenderMode="Inline">
  <ContentTemplate>

                Scale Factor Tolerance has a bandwidth of:<br />
                <br />
                <asp:Image ID="Image2" runat="server" Height="70px" 
                    ImageUrl="~/Resources/tolerance.png" Width="316px" />
                <br />
                <br />

                Lower Bound and Upper Bound can be changed using the textboxes 
        </ContentTemplate>
        </asp:UpdatePanel>
        </asp:Panel>

不幸的是,即使里面有更新面板,点击按钮后页面仍在重新加载。请指教。提前致谢。

4

1 回答 1

0

BalloonPopupExtender从您的代码Button中,我可以看到UpdatePanel. 它们不应该放在UpdatePanel's内ContentTemplate吗?

尝试这个...

<asp:UpdatePanel ID="UP2" runat="server" RenderMode="Inline">
  <ContentTemplate>

            Scale Factor Tolerance has a bandwidth of:<br />
            <br />
            <asp:Image ID="Image2" runat="server" Height="70px" 
                ImageUrl="~/Resources/tolerance.png" Width="316px" />
            <br />
            <br />

            Lower Bound and Upper Bound can be changed using the textboxes 

<asp:ImageButton ID="B_HELP_SFtolerance" runat="server" BorderColor="Black" 
 BorderStyle="Solid" Height="21px" ImageUrl="~/Resources/1401344600_info6.png" 
 ToolTip="Scale Factor Tolerance Info." Width="25px" />


<ajaxToolkit:BalloonPopupExtender ID="B_HELP_SFtolerance_BalloonPopupExtender"
 runat="server"  BalloonPopupControlID="P_HELP_SFTolerance"
    Position="TopRight" 
    BalloonStyle="Rectangle"
    BalloonSize="Large"
    CustomCssUrl="CustomStyle/BalloonPopupOvalStyle.css"
    CustomClassName="oval"
    UseShadow="true" 
    ScrollBars="Auto"
    DisplayOnMouseOver="false"
    DisplayOnFocus="false"
    DisplayOnClick="true" TargetControlID="B_HELP_SFtolerance" >
    </ajaxToolkit:BalloonPopupExtender>
    </ContentTemplate>
    </asp:UpdatePanel>
于 2014-05-29T02:16:47.727 回答