嗨,我正在使用updatepanel更新当前状态,同时更新它每次也会将图像加载到div标签中。那么如何在不加载图像的情况下加载更新面板呢?
<asp:UpdatePanel ID="UpdatePanel1" runat="server" >
<ContentTemplate>
<div class="icon text-center" id="lbl_status_icon" >
<div class="loader" runat="server" id="Div1" style="height:50px;width:50px;"></div>
<div class="loadernull" runat="server" id="Div2" style="height:50px;width:50px;"></div>
<asp:Image ID="Image1" runat="server" Visible="false"/>
</div>
</ContentTemplate>
<Triggers >
<asp:AsyncPostBackTrigger ControlID="timer" EventName="tick" />
</Triggers>
</asp:UpdatePanel>
答案 0 :(得分:0)
设置以下属性:
ChildrenAsTriggers="false" UpdateMode="Conditional"
然后:
protected void yourbutton_Click(object sender, EventArgs e)
{
// your logics
// ....
upl1.Update();
}