How the UpdateProgress controls should not fire when the list index is -1?
-
In my form, I have Update Panels and also Update Progress Controls. I want the UpdateProgress controls should not fire and shows the text "Loading..." when the SelectedIndex is -1. Is it possible to do so? If so, how? :zzz: Anybody can provide any help on this? Thanks in advance. Following is the code I have written:
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:DropDownList ID="UserTypeList" runat="server" AppendDataBoundItems="true"
Width="155px">
<asp:ListItem Selected="True" Text="--Please Select--" Value="-1"></asp:ListItem>
</asp:DropDownList>
<asp:UpdateProgress ID="UpdateProgress1" AssociatedUpdatePanelID="UpdatePanel1" runat="server" >
<ProgressTemplate><span class="ProgressBar" >
Loading...</span>
</ProgressTemplate>
</asp:UpdateProgress>
</ContentTemplate>
</asp:UpdatePanel>Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
-
In my form, I have Update Panels and also Update Progress Controls. I want the UpdateProgress controls should not fire and shows the text "Loading..." when the SelectedIndex is -1. Is it possible to do so? If so, how? :zzz: Anybody can provide any help on this? Thanks in advance. Following is the code I have written:
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:DropDownList ID="UserTypeList" runat="server" AppendDataBoundItems="true"
Width="155px">
<asp:ListItem Selected="True" Text="--Please Select--" Value="-1"></asp:ListItem>
</asp:DropDownList>
<asp:UpdateProgress ID="UpdateProgress1" AssociatedUpdatePanelID="UpdatePanel1" runat="server" >
<ProgressTemplate><span class="ProgressBar" >
Loading...</span>
</ProgressTemplate>
</asp:UpdateProgress>
</ContentTemplate>
</asp:UpdatePanel>Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
-
In my form, I have Update Panels and also Update Progress Controls. I want the UpdateProgress controls should not fire and shows the text "Loading..." when the SelectedIndex is -1. Is it possible to do so? If so, how? :zzz: Anybody can provide any help on this? Thanks in advance. Following is the code I have written:
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:DropDownList ID="UserTypeList" runat="server" AppendDataBoundItems="true"
Width="155px">
<asp:ListItem Selected="True" Text="--Please Select--" Value="-1"></asp:ListItem>
</asp:DropDownList>
<asp:UpdateProgress ID="UpdateProgress1" AssociatedUpdatePanelID="UpdatePanel1" runat="server" >
<ProgressTemplate><span class="ProgressBar" >
Loading...</span>
</ProgressTemplate>
</asp:UpdateProgress>
</ContentTemplate>
</asp:UpdatePanel>Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
Give an id for the span say "spanProgress" Add handlers for beginrequest and endrequest Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(onBeginRequest); Sys.WebForms.PageRequestManager.getInstance().add_endRequest(onEndRequest); function onBeginRequest() { //add your logic for checking SelectedIndex == -1 and then hide the span //by setting document.getElementById("spanProgress").style.display="none"; } function onEndRequest() { //enable the span here }