0
我正在使用jquery對話框...所以我需要將這一切都保存在一個updatepanel中。updateprogress在單擊updatepanel內的按鈕時不顯示?
Ive得到了以下幾點:
<asp:UpdatePanel ID="upNewUpdatePanel" UpdateMode="Conditional" ChildrenAsTriggers="true" runat="server">
<ContentTemplate>
<div id="search">
<a href="#" onclick="return false;" class="info">Address type:<span>Select whether you want to search 'From'/'To' type addresses. Or select both to search all addresses.</span></a>
<asp:RadioButtonList ID="rbSearchTypes" runat="server"
RepeatDirection="Horizontal" RepeatLayout="Flow">
<asp:ListItem>From</asp:ListItem>
<asp:ListItem>To</asp:ListItem>
<asp:ListItem Selected="True">Both</asp:ListItem>
</asp:RadioButtonList>
| <a href="#" onclick="return false;" class="info">Address created by:<span>Search for your addresses (addresses you have created)/search for any address in the system.</span></a>
<asp:RadioButtonList ID="rbSearchMyAddresses" runat="server"
RepeatDirection="Horizontal" RepeatLayout="Flow">
<asp:ListItem Selected="True" Value="0">Anyone</asp:ListItem>
<asp:ListItem Value="1">Me</asp:ListItem>
</asp:RadioButtonList>
<br />
<asp:TextBox ID="txtFindSearch" runat="server" Font-Names="Arial"
ToolTip="Enter a search term (ship to name/address/region, etc)."></asp:TextBox>
<asp:Button ID="btnFindSearch" runat="server" Text="Search"
onclick="btnFindSearch_Click" BorderColor="#1367AD" BorderStyle="Solid" />
<hr />
<br />
<asp:Label ID="lblRowsCount" runat="server" Text=""></asp:Label>
</div>
<div id="searchresults" style="">
<asp:RadioButtonList ID="rbSearchResults" CssClass="rbsearch" runat="server" AutoPostBack="True"
CellSpacing="10" RepeatColumns="4" RepeatDirection="Horizontal"
ToolTip="Select an address."
onselectedindexchanged="rbSearchResults_SelectedIndexChanged" Width="100%">
</asp:RadioButtonList>
</div>
<div id="loading" style="width:100%;text-align:center;">
<asp:UpdateProgress ID="UpdateProgress1" runat="server" Visible="True" DynamicLayout="True">
<ProgressTemplate>
<img style="border-style:none;" src="images/ajax-loader.gif" alt="loading" />
</ProgressTemplate>
</asp:UpdateProgress>
</div>
</ContentTemplate>
</asp:UpdatePanel>
當我點擊btnFindSearch
雖然這是我的查詢數據庫,並拉着我的記錄欄的UpdateProgress將UpdateProgress1
顯示出我的AJAX加載GIF我希望。它不會:(...所以它給我的用戶一個印象,即我的應用程序被卡住了,實際上它實際上在拉取數據。幾秒鐘後,數據加載單選按鈕列表...但我希望我的更新進度這是因爲我點擊了一個updatepanel裏面的按鈕嗎?有什麼我可以做的,讓加載updateprogress控制出來嗎?
請參閱[this](http://asp-net-example.blogspot.in/2009/11/ajax-updateprogress-how-to-use.html)文章。它會幫助你 –