Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. How the UpdateProgress controls should not fire when the list index is -1?

How the UpdateProgress controls should not fire when the list index is -1?

Scheduled Pinned Locked Moved ASP.NET
databasesysadminhelpquestionannouncement
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    meeram395
    wrote on last edited by
    #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.

    C S 2 Replies Last reply
    0
    • M meeram395

      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.

      C Offline
      C Offline
      CooperWu
      wrote on last edited by
      #2

      It seems NO, you can set 'Loading' text to 'UpdateProgress'. it will display 'Loading' when the page is loading... check out this

      1 Reply Last reply
      0
      • M meeram395

        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.

        S Offline
        S Offline
        Sundar_R
        wrote on last edited by
        #3

        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 }

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups