本文介绍了Ajax中的UpdateProgress的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
亲爱的所有人,
我正在使用updateprogress控件和更新面板。
当我试图调用它时,它不起作用。
我的更新面板是 -
Dear All,
I am using an updateprogress control in combination with an update panel.
When i am trying to call it,it''s not working.
My Update Panel is-
<asp:UpdatePanel ID="UpdatePanel1" runat="server" >
<ContentTemplate>
<asp:GridView ID="InboxGrid" runat="server" EnableViewState="false" OnPageIndexChanged="InboxGrid_PageIndexChanged"
Width="100%" AutoGenerateColumns="False" PageSize="20" BorderColor="White" AllowSorting="True"
border="1" HorizontalAlign="Center" CellPadding="1" BorderWidth="1pt" CssClass="DataGridStyleNew"
BackColor="#d9e6f7">
<HeaderStyle CssClass="DataGridHeaderStyleNew"></HeaderStyle>
<Columns>
<asp:CommandField ShowDeleteButton="True" Visible="false" />
<asp:TemplateField>
<HeaderStyle Wrap="False" Height="10px" ForeColor="Green"></HeaderStyle>
<HeaderTemplate>
<asp:CheckBox ID="chkAll" Enabled="True" onclick="javascript:SelectAllCheckboxes(this);"
runat="server" AutoPostBack="false" ToolTip="Select/Deselect All" />
</HeaderTemplate>
<ItemTemplate>
<asp:CheckBox ID="chkSelect" name='<%# DataBinder.Eval(Container.DataItem,"PROC_REG_NO") & "@" & DataBinder.Eval(Container.DataItem,"UserType") & "@" & DataBinder.EVal(Container.DataItem,"VER_NO")& "@" & DataBinder.Eval(Container.DataItem,"STEP_ID") & "@" & DataBinder.Eval(Container.DataItem,"HOLD_STATUS") & "@" & DataBinder.Eval(Container.DataItem,"HOLD_BY") & "@" & DataBinder.Eval(Container.DataItem,"FORM CAP") & "@" & DataBinder.Eval(Container.DataItem,"USER_ID") & "@" & DataBinder.Eval(Container.DataItem,"ORIGINATOR")%>'
onclick="javascript:HighlightRow(this);" runat="server" OnCheckedChanged="InboxGrid_CheckedChanged"
AutoPostBack="false" />
</ItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtFormNames" Rows="0" Columns="0" Width="0" Height="0" Visible="false"
runat="server" />
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>
<asp:Image ID="History" runat="server" AlternateText="View Track Record" ImageUrl="..\imgs\History.ICO"
AutoPostBack="false" />
</HeaderTemplate>
<ItemTemplate>
<!--Sudhir-14/4-->
<a href="#" name='<%# DataBinder.Eval(Container.DataItem,"PROC_REG_NO") & "@" & DataBinder.Eval(Container.DataItem,"FORM CAP")%>'
onclick="ShowHistory(name);">
<img src="../Imgs/History.ICO" border="0" alt="View Track Record"></a>
<!--Sudhir-14/4-->
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>
<asp:Image ID="Form" runat="server" AlternateText="View Form" ImageUrl="..\imgs\ViewForm3.gif"
AutoPostBack="true" />
</HeaderTemplate>
<ItemTemplate>
<!--Sudhir-14/4-->
<a href="#" name='<%# DataBinder.Eval(Container.DataItem,"PROC_REG_NO")& "@" & DataBinder.Eval(Container.DataItem,"UserType") & "@" & DataBinder.Eval(Container.DataItem,"VER_NO")& "@" & DataBinder.Eval(Container.DataItem,"STEP_ID") & "@" & DataBinder.Eval(Container.DataItem,"HOLD_STATUS") & "@" & DataBinder.Eval(Container.DataItem,"HOLD_BY") & "@" & DataBinder.Eval(Container.DataItem,"FORM CAP") & "@" & DataBinder.Eval(Container.DataItem,"USER_ID") & "@" & DataBinder.Eval(Container.DataItem,"ORIGINATOR") %>'
onclick="ShowVoucher(name);">
<img src="../Imgs/ViewForm3.gif" border="0" alt="View Form"></a>
<!--Sudhir-14/4-->
</ItemTemplate>
</asp:TemplateField>
</Columns>
<%-- <PagerStyle Width="100%" PageButtonCount="20" Mode="NumericPages"></PagerStyle>--%>
</asp:GridView>
<input type="hidden" name="txtPIDs">
<%--added by kaila for AJAX--%>
<input type="hidden" name="txtRowIndexes">
<asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1" >
<ProgressTemplate>
<div id="Background">
</div>
<div id="Progress">
<img src="loading.gif" style="vertical-align: middle" />
Fetching Records Please Wait...
</div>
</ProgressTemplate>
</asp:UpdateProgress>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="clikSamePage" />
</Triggers>
</asp:UpdatePanel>
Now i am trying to call the UpdateProgress on an Input button click which is outside this Update Panel.
Now i am trying to call the UpdateProgress on an Input button click which is outside this Update Panel.
<input id="clikSamePage" type="button" value="Click" onclick="fDelFromSamePage(this);" />
I know i have missed something but what exactly??
I know i have missed something but what exactly??
推荐答案
这篇关于Ajax中的UpdateProgress的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!