Why does screen repaint?

K

Karl

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

Here's our first one:

http://www.pine-grove.com/web calculators/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.
 
K

Karl Seguin

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/d...fSystemWebUIPageClassSmartNavigationTopic.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!)
 
K

Kevin Spencer

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

--
HTH,

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

Karl Seguin

*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:130px;FONT-FAMILY:"Courier New, Courier,
mono;TEXT-ALIGN:right;BORDER-LEFT:#2c5926 1px
ridge;COLOR:#000000;BORDER-BOTTOM:#2c5926 1px
ridge;PADDING-RIGHT:10px;BORDER-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!)
 
K

Karl

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.)
 
K

Karl

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.)
 
K

Karl Seguin

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!)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top