以下panel只在Modal.Show();时才显示出来,但是在页面刷新时它也会闪一下 就不见了,
如何让它不闪出来呢?<asp:Panel ID="pan" runat="server">
<table border="0" width="150px" height="60px" cellpadding="0" cellspacing="0" align=center>
<tr>
<td ID="Td2" height=50% align=center valign=middle runat="server" style="cursor: move; font-weight:bold;">
<asp:Label ID="lblMenu" ForeColor=seashell runat="server" Font-Size="Large"/>
</td>
</tr>
<tr>
<td colspan="4" height=50% style="height: 35px;" align="center">
<asp:Button ID="btnExit2" runat="server" Text="退出" Font-Size="Large" />
</td>
</tr>
</table>
</asp:Panel>
<ajaxtoolkit:ModalPopupExtender ID="Modal" runat="server" TargetControlID="tmpButton2"
PopupControlID="pan2" BackgroundCssClass="modalBackground" DropShadow="true"
CancelControlID="btnExit2"/>
<asp:Button ID="tmpButton2" runat="server" Style="display: none" />
如何让它不闪出来呢?<asp:Panel ID="pan" runat="server">
<table border="0" width="150px" height="60px" cellpadding="0" cellspacing="0" align=center>
<tr>
<td ID="Td2" height=50% align=center valign=middle runat="server" style="cursor: move; font-weight:bold;">
<asp:Label ID="lblMenu" ForeColor=seashell runat="server" Font-Size="Large"/>
</td>
</tr>
<tr>
<td colspan="4" height=50% style="height: 35px;" align="center">
<asp:Button ID="btnExit2" runat="server" Text="退出" Font-Size="Large" />
</td>
</tr>
</table>
</asp:Panel>
<ajaxtoolkit:ModalPopupExtender ID="Modal" runat="server" TargetControlID="tmpButton2"
PopupControlID="pan2" BackgroundCssClass="modalBackground" DropShadow="true"
CancelControlID="btnExit2"/>
<asp:Button ID="tmpButton2" runat="server" Style="display: none" />
<asp:Panel ID="pan" runat="server">
加个属性
<asp:Panel ID="pan" runat="server" Style="display:none">
试试
<Triggers >
<asp:AsyncPostBackTrigger ControlID ="btn1" />
</Triggers>
<ContentTemplate>
<table style="width:100%;" align=center>
<tr bgcolor=#3399FF align=center valign=bottom>
<td width="35%">
<asp:Button ID="btn1" OnClick="btn1_Click" Font-Bold=true Font-Size="Large" runat="server" Text="添加便笺" />
<asp:Button ID="btn2" OnClick="btn2_Click" Font-Bold=true Font-Size="Large" runat="server" Text="添加文件夹" />
</td>
</tr>
<tr>
<td valign=top>
<table style="width:100%;">
<tr>
<td width="40%">
<table style="width: 100%;">
<tr>
<td colspan=2>
<table>
<tr><td>
<asp:Repeater ID="Repeater1" runat="server" OnItemCommand="Repeater1_ItemCommand">
<HeaderTemplate>
<table cellspacing="0" cellpadding="0" width="100%">
</HeaderTemplate>
<ItemTemplate>
<tr>
<td>
<asp:LinkButton ID="btn3" CommandName="folderselect" CommandArgument=<%# Eval("id1") %> Font-Size="Large" Width="100%" runat="server"><%# app.GetLenString(Convert.ToString(DataBinder.Eval(Container.DataItem, "FolderN")), 32) %></asp:LinkButton>
</td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
<br />
<webdiyer:AspNetPager ID="AspNetPager1" runat="server" OnPageChanged="AspNetPager1_PageChanged"
Width="90%" SubmitButtonText="到" ShowCustomInfoSection="Left" ShowBoxThreshold="3"
PageSize="1000" AlwaysShow="True" HorizontalAlign="Right" Font-Size="XX-Large" />
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel><asp:UpdatePanel ID="updatePanel2" runat="server" UpdateMode="Conditional">
<Triggers >
<asp:AsyncPostBackTrigger ControlID ="btnExit" />
</Triggers>
<ContentTemplate>
<asp:Panel ID="pan" runat="server">
<table border="0" width="150px" height="60px" cellpadding="0" cellspacing="0" align=center>
<tr>
<td ID="Td2" height=50% align=center valign=middle runat="server" style="cursor: move; font-weight:bold;">
<asp:Label ID="lblMenu" ForeColor=seashell runat="server" Font-Size="Large"/>
</td>
</tr>
<tr>
<td colspan="4" height=50% style="height: 35px;" align="center">
<asp:Button ID="btnExit" runat="server" Text="退出" Font-Size="Large" />
</td>
</tr>
</table>
</asp:Panel>
<ajaxtoolkit:ModalPopupExtender ID="Modal" runat="server" TargetControlID="tmpButton2" PopupControlID="pan2" BackgroundCssClass="modalBackground" DropShadow="true" CancelControlID="btnExit2"/> <asp:Button ID="tmpButton2" runat="server" Style="display: none" />
</ContentTemplate>
</asp:UpdatePanel>
你要显示的时候只要用Css控制一下就好了,直接可以在后台用的.
不管你如何加载。首先这个panel都是要显示出来。然后ajax再调用隐藏的方法。所以你怎么处理都没用的啊。
为什么你不用 display 的CSS来控制显示和隐藏..........
现在改成
<asp:Panel ID="pan1" runat="server" Style="display: none">了,还是会闪一下。
流程有问题?能不能说具体一点?
各位老大说得我乱乱的,搞半天就是搞不定。
UpdatePanel到底怎么实现零刷新? 那几句代码到底什么含义?
哪位老大来个清清楚楚一针见血的?!
最好给一个示例代码,谢了!
用了,没用啊!总是会闪一下!
和UpdatePanel结合使用也没用!
Style="display:none"。
谢谢各位了!