Screen Flicker ASP.NET

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Garima12
    New Member
    • Mar 2007
    • 58

    Screen Flicker ASP.NET

    I am fetching some values from database and displaying them on screen. Query is generated on one page and then that page calls other page and displays the result. My problem is Screen flashes when I submit the first form. page appears without any data but with labels and table I put.then the screen flashes & the data is present.
    How can I remove this flash? I don't want those labels and table to be appeared before data is fetched.

    Thks
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    Originally posted by Garima12
    I am fetching some values from database and displaying them on screen. Query is generated on one page and then that page calls other page and displays the result. My problem is Screen flashes when I submit the first form. page appears without any data but with labels and table I put.then the screen flashes & the data is present.
    How can I remove this flash? I don't want those labels and table to be appeared before data is fetched.

    Thks
    When you submit data to the server the page is sent to the server, then the server makes a New page and sends it back to the browser. This is why you are seeing a flicker (they page is being redisplayed).

    You could use Ajax (UpdatePanels) to prevent full page updates...then only the section that needs to be update will be and you won't get a "flash".

    -Frinny

    Comment

    • Garima12
      New Member
      • Mar 2007
      • 58

      #3
      bounded it in update panel's content template:

      [CODE=asp]
      <asp:ScriptMana ger ID="ScriptManag er1" runat="server" AsyncPostBackTi meout="360000">
      </asp:ScriptManag er>

      <asp:UpdatePane l ID="gpanel" runat="server">
      <ContentTemplat e>
      <div class="tab-page" id="tabPage4" style="width:79 0px" >
      <h2 class="tab">
      Property Description

      </h2>


      <script type="text/javascript">tp2 .addTabPage( document.getEle mentById( "tabPage4" ) );</script>

      <table bordercolor="bl ue" id="info" border="1" class="dataTabl e" style="backgrou nd-color: #ffffde;width: 800px; border-collapse: separate;" cellspacing="0" >

      <tr>
      <td style="width: 338px;backgroun d-color:#e0eafc">
      Section Block Lot Suffix:</td>
      <td style="width: 145px">
      <asp:Label ID="PARCELLabel " runat="server"> </asp:Label></td>
      <td style="width: 217px;backgroun d-color:#e0eafc">
      Property address:&nbsp;</td>
      <td style="width: 400px">
      <asp:Label ID="praddrlabel " runat="server"> </asp:Label>&nbsp ;</td>

      </tr>
      <tr>
      <td style="width: 338px;backgroun d-color:#e0eafc">
      SWIS:&nbsp;</td>
      <td style="width: 145px">
      <asp:Label ID="SWISLabel" runat="server"> </asp:Label>&nbsp ;</td>
      <td style="width: 217px;backgroun d-color:#e0eafc">
      Acres:&nbsp;</td>
      <td style="width: 400px">
      <asp:Label ID="ACRESLabel " runat="server"> </asp:Label>&nbsp ;</td>
      </tr>
      <tr>
      <td style="width: 338px;backgroun d-color:#e0eafc">
      Municipal:&nbsp ;</td>
      <td style="width: 145px">
      <asp:Label ID="MUNILabel" runat="server"> </asp:Label>&nbsp ;</td>
      <td style="width: 217px;backgroun d-color:#e0eafc">
      Frontage:&nbsp; </td>
      <td style="width: 400px">
      <asp:Label ID="FRONTAGELab el" runat="server"> </asp:Label>&nbsp ;</td>
      </tr>
      <tr>
      <td style="width: 338px;backgroun d-color:white">
      &nbsp;</td>
      <td style="width: 145px;backgroun d-color:white">
      &nbsp;<asp:Labe l ID="keylabel" Visible="false" runat="server" Width="70px"></asp:Label></td>
      <td style="width: 217px;backgroun d-color:#e0eafc">
      Depth:&nbsp;</td>
      <td style="width: 400px">
      <asp:Label ID="DEPTHLabel " runat="server"> </asp:Label>&nbsp ;</td>
      </tr>
      </table>

      <iframe name="InfoLinks _1" src="propertyde scription.aspx" width="800px" height="400px"> </iframe>
      </div></ContentTemplate >
      </asp:UpdatePanel >
      [/CODE]

      as you see in the code there are labels. it is still displaying those labels and then flashes and displays labels as well as data.
      Is there any way to solve it. Please let me know if I m doing anything wrong.
      thks

      Comment

      • Garima12
        New Member
        • Mar 2007
        • 58

        #4
        I have a gridview on 1st page and I am dynamically creating a link button with name info inside the gridview. When I click on info link corresponding information is fetched from database and displayed on 2nd page. In above code, if I mention updatemode="con ditional" then I have to explicitely mention update() method.
        I don't know how to call update() method from another page and from that info link which is also contained inside gridview and being dynamically generated in front of each record(row).
        Can you please guide me regarding this?
        thks

        Comment

        • Frinavale
          Recognized Expert Expert
          • Oct 2006
          • 9749

          #5
          Originally posted by Garima12
          Query is generated on one page and then that page calls other page and displays the result
          At first when you mentioned this I thought you were just saying that the page was displaying different Web User Controls...

          Since you are displaying 2 different pages of course there's going to be a flash: a whole new ASPX page is being displayed. It doesn't matter if you use Ajax or not...because the whole page must be rendered.


          Originally posted by Garima12
          I have a gridview on 1st page and I am dynamically creating a link button with name info inside the gridview. When I click on info link corresponding information is fetched from database and displayed on 2nd page. In above code, if I mention updatemode="con ditional" then I have to explicitely mention update() method.
          Remove the UpdatePanel, it's not needed (I'm sorry I mentioned it earlier, I didn't read your question properly). UpdatePanels are used to postback a portion of your page. You are displaying a whole new page, so this doesn't apply to your situation.

          Originally posted by Garima12
          I don't know how to call update() method from another page and from that info link which is also contained inside gridview and being dynamically generated in front of each record(row).
          Can you please guide me regarding this?
          thks
          I think it'd be easier to move your update() method somewhere that both pages can access it (maybe a create a Utils class that has a public method that both can refer to).

          -Frinny

          Comment

          Working...