Why does screen repaint?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Karl

    Why does screen repaint?


    We are developing a series of financial calculators based on ASP.NET
    technologies.

    Here's our first one:




    When the user clicks "Calc", the browser window repaints itself. Why?
    (More so in IE 6.x than in Firefox v1.x.)


    Also, we would sure like to know why the dropdown comboboxes aren't as
    wide as the editboxes, though the style sets them to the same width and
    they display using the same widths when run locally.

    TIA.
  • Kevin Spencer

    #2
    Re: Why does screen repaint?

    I would recommend asking your ASP.Net developer(s). They should know.

    --
    HTH,

    Kevin Spencer
    Microsoft MVP
    ..Net Developer
    Expect the unaccepted.

    "Karl" <kthompson@nosp am.pine-grove.com> wrote in message
    news:Oh5jnXboFH A.1044@tk2msftn gp13.phx.gbl...[color=blue]
    >
    > We are developing a series of financial calculators based on ASP.NET
    > technologies.
    >
    > Here's our first one:
    >
    > http://www.pine-grove.com/web%20calculators/Loan.aspx
    >
    >
    > When the user clicks "Calc", the browser window repaints itself. Why?
    > (More so in IE 6.x than in Firefox v1.x.)
    >
    >
    > Also, we would sure like to know why the dropdown comboboxes aren't as
    > wide as the editboxes, though the style sets them to the same width and
    > they display using the same widths when run locally.
    >
    > TIA.[/color]


    Comment

    • Karl Seguin

      #3
      Re: Why does screen repaint?

      You are gonna get the flicker regardless of what you do. You are sending a
      new request to the server and getting a new response. IE and FireFox need
      to redraw the page . Hopefully future versions of IE and Firefox and other
      browsers will improve on how they do this (using buffers and such I would
      imagine). Indeed, firefox does seem a little better.

      Some solutions are to use ASP.Net's smartnavigation
      (http://msdn.microsoft.com/library/de...ationTopic.asp)
      though it causes a lot of problems for a lot of people. I know a lot (I'd
      say most but I don't know this for sure) do not use it due to all the
      pitfalls.

      Alternatively, you could calculate in javascript (on the client) which
      wouldn't cause the page to be posted back, or use Ajax as a middle-ground.

      Karl

      --
      MY ASP.Net tutorials
      http://www.openmymind.net/ - New and Improved (yes, the popup is
      annoying)
      http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
      come!)
      "Karl" <kthompson@nosp am.pine-grove.com> wrote in message
      news:Oh5jnXboFH A.1044@tk2msftn gp13.phx.gbl...[color=blue]
      >
      > We are developing a series of financial calculators based on ASP.NET
      > technologies.
      >
      > Here's our first one:
      >
      > http://www.pine-grove.com/web%20calculators/Loan.aspx
      >
      >
      > When the user clicks "Calc", the browser window repaints itself. Why?
      > (More so in IE 6.x than in Firefox v1.x.)
      >
      >
      > Also, we would sure like to know why the dropdown comboboxes aren't as
      > wide as the editboxes, though the style sets them to the same width and
      > they display using the same widths when run locally.
      >
      > TIA.[/color]


      Comment

      • Karl Seguin

        #4
        Re: Why does screen repaint?

        *nods*

        I'll add to that, as for the 2nd part of your question that your
        css/styles/html is a mess, it's no wonder you can't figure out why it isn't
        behaving like it should.

        Your page includes 2 relatively large external css files (nothing wrong with
        this, but don't ask us to go through them looking for the error), with a lot
        of styles in one overwritting styles in the other (ie, they both have a body
        style).

        Additionally, you have a bunch of inline styles which makes it even hard to
        pinpoint... Finally, the style on your textbox looks like:

        style="width:13 0px;FONT-FAMILY:"Courier New, Courier,
        mono;TEXT-ALIGN:right;BOR DER-LEFT:#2c5926 1px
        ridge;COLOR:#00 0000;BORDER-BOTTOM:#2c5926 1px
        ridge;PADDING-RIGHT:10px;BORD ER-RIGHT:#2c5926 1px ridge;BORDER-TOP:#2c5926
        1px ridge;FONT-SIZE:10pt; />

        as you can see, there's a " after font-Family: and then none before the />
        it's a wonder anything even shows up...

        Karl

        --
        MY ASP.Net tutorials
        http://www.openmymind.net/ - New and Improved (yes, the popup is
        annoying)
        http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
        come!)
        "Kevin Spencer" <kevin@DIESPAMM ERSDIEtakempis. com> wrote in message
        news:eXhopvboFH A.1044@tk2msftn gp13.phx.gbl...[color=blue]
        >I would recommend asking your ASP.Net developer(s). They should know.
        >
        > --
        > HTH,
        >
        > Kevin Spencer
        > Microsoft MVP
        > .Net Developer
        > Expect the unaccepted.
        >
        > "Karl" <kthompson@nosp am.pine-grove.com> wrote in message
        > news:Oh5jnXboFH A.1044@tk2msftn gp13.phx.gbl...[color=green]
        >>
        >> We are developing a series of financial calculators based on ASP.NET
        >> technologies.
        >>
        >> Here's our first one:
        >>
        >> http://www.pine-grove.com/web%20calculators/Loan.aspx
        >>
        >>
        >> When the user clicks "Calc", the browser window repaints itself. Why?
        >> (More so in IE 6.x than in Firefox v1.x.)
        >>
        >>
        >> Also, we would sure like to know why the dropdown comboboxes aren't as
        >> wide as the editboxes, though the style sets them to the same width and
        >> they display using the same widths when run locally.
        >>
        >> TIA.[/color]
        >
        >[/color]


        Comment

        • Karl

          #5
          Re: Why does screen repaint?

          [color=blue][color=green]
          >>it's a wonder anything even shows up...<<<<[/color][/color]

          Guess I'm just lucky. :-)

          Thanks for your pointers. They are most helpful.

          (The Delphi IDE seems to insert some of the styles and the same time I'm
          trying to maintain the styles manually.)


          Karl Seguin wrote:[color=blue]
          > *nods*
          >
          > I'll add to that, as for the 2nd part of your question that your
          > css/styles/html is a mess, it's no wonder you can't figure out why it isn't
          > behaving like it should.
          >
          > Your page includes 2 relatively large external css files (nothing wrong with
          > this, but don't ask us to go through them looking for the error), with a lot
          > of styles in one overwritting styles in the other (ie, they both have a body
          > style).
          >
          > Additionally, you have a bunch of inline styles which makes it even hard to
          > pinpoint... Finally, the style on your textbox looks like:
          >
          > style="width:13 0px;FONT-FAMILY:"Courier New, Courier,
          > mono;TEXT-ALIGN:right;BOR DER-LEFT:#2c5926 1px
          > ridge;COLOR:#00 0000;BORDER-BOTTOM:#2c5926 1px
          > ridge;PADDING-RIGHT:10px;BORD ER-RIGHT:#2c5926 1px ridge;BORDER-TOP:#2c5926
          > 1px ridge;FONT-SIZE:10pt; />
          >
          > as you can see, there's a " after font-Family: and then none before the />
          > it's a wonder anything even shows up...
          >
          > Karl
          >[/color]

          Comment

          • Karl

            #6
            Re: Why does screen repaint?

            [color=blue][color=green][color=darkred]
            >>>Alternativel y, you could calculate in javascript[/color][/color][/color]

            I gather that I could also put the calculation in the code-behind page
            to avoid the flicker? (This would also have the benefit of hiding my code.)



            Karl Seguin wrote:[color=blue]
            > You are gonna get the flicker regardless of what you do. You are sending a
            > new request to the server and getting a new response. IE and FireFox need
            > to redraw the page . Hopefully future versions of IE and Firefox and other
            > browsers will improve on how they do this (using buffers and such I would
            > imagine). Indeed, firefox does seem a little better.
            >
            > Some solutions are to use ASP.Net's smartnavigation
            > (http://msdn.microsoft.com/library/de...ationTopic.asp)
            > though it causes a lot of problems for a lot of people. I know a lot (I'd
            > say most but I don't know this for sure) do not use it due to all the
            > pitfalls.
            >
            > Alternatively, you could calculate in javascript (on the client) which
            > wouldn't cause the page to be posted back, or use Ajax as a middle-ground.
            >
            > Karl
            >[/color]

            Comment

            • Karl Seguin

              #7
              Re: Why does screen repaint?

              No. Unfortunetly, if you think this (and I'm not trying to be rude) you
              need to go back and read about basic web programming and the difference
              between server-side and client-side. If your calculation is happening on
              the server, regardless of whether it's using codebehind or inline asp.net
              (via <script runat="server"> ) the browser still needs to make a new request
              to the server and handle a new response.

              Karl

              --
              MY ASP.Net tutorials
              http://www.openmymind.net/ - New and Improved (yes, the popup is
              annoying)
              http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
              come!)
              "Karl" <kthompson@nosp am.pine-grove.com> wrote in message
              news:OEzjk%23fo FHA.3316@TK2MSF TNGP14.phx.gbl. ..[color=blue]
              >[color=green][color=darkred]
              > >>>Alternativel y, you could calculate in javascript[/color][/color]
              >
              > I gather that I could also put the calculation in the code-behind page to
              > avoid the flicker? (This would also have the benefit of hiding my code.)
              >
              >
              >
              > Karl Seguin wrote:[color=green]
              >> You are gonna get the flicker regardless of what you do. You are sending
              >> a new request to the server and getting a new response. IE and FireFox
              >> need to redraw the page . Hopefully future versions of IE and Firefox
              >> and other browsers will improve on how they do this (using buffers and
              >> such I would imagine). Indeed, firefox does seem a little better.
              >>
              >> Some solutions are to use ASP.Net's smartnavigation
              >> (http://msdn.microsoft.com/library/de...ationTopic.asp)
              >> though it causes a lot of problems for a lot of people. I know a lot
              >> (I'd say most but I don't know this for sure) do not use it due to all
              >> the pitfalls.
              >>
              >> Alternatively, you could calculate in javascript (on the client) which
              >> wouldn't cause the page to be posted back, or use Ajax as a
              >> middle-ground.
              >>
              >> Karl
              >>[/color][/color]


              Comment

              Working...