473,549 Members | 2,935 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

defaultbutton, defaultfocus and rendering in Internet Explorer

Hi folks,

IE and Asp.net 2.0 are doing some pretty bizzare things. Some of our users
were getting pretty weary of IE redrawing and "flashing" what is essentially
a pretty static page every time there is a postback (IE Version
6.0.2900.2180.x psp_sp2,,,,; Doesn't happen under firefox - bless those
folks).

Anyway try this:

<form id="form1" runat="server" defaultbutton=" FlashMe">
<table bgcolor="lime" height="100">
<tr><td>Am I gonna flash?</td></tr>
<tr><td><asp:Bu tton runat="server" ID="FlashMe" Text="Flash Me" /></td></tr>
</table>
</form>

You will see the whole screen flash when you postback. Now, remove the
defaultbutton=" FlashMe" from the form and try again.
See: No FLASH!!!!!
The same happens when you define defaultfocus.Wh at gives?

Maybe someone needs to sit with IE guys and work out how to write script
file (WebResource.ax d) that doesn't cause IE to kick itself in the arse!

Anyone got a suggestion?

Thanks,
Oz
May 5 '06 #1
2 1711
You can alwasy default using Code Beside (formerly Code Behind in ASP.NET
1.x). I am fairly certain the issue lies in the mechanism to default a
specific button. JavaScript is also an option, but that is likely what
ASP.NET 2.0 is using (have not played with that mechanism yet).

My suspicion of JavaScript comes from the fact it paints and then repaints.
It is likely this happens on ALL browsers, but it is not noticeable on
others as it is happening so fast. Firefox may have used a different method
to solve it, however, so my statement is possibly incorrect.

I would look up default button on ASP.NET 1.x and try that method and see if
it causes the same issue.

--
Gregory A. Beamer

*************** *************** *************** ****
Think Outside the Box!
*************** *************** *************** ****
"Oz Kologlu" <oz*******@nowh ere.com> wrote in message
news:%2******** **********@TK2M SFTNGP03.phx.gb l...
Hi folks,

IE and Asp.net 2.0 are doing some pretty bizzare things. Some of our users
were getting pretty weary of IE redrawing and "flashing" what is
essentially a pretty static page every time there is a postback (IE
Version 6.0.2900.2180.x psp_sp2,,,,; Doesn't happen under firefox - bless
those folks).

Anyway try this:

<form id="form1" runat="server" defaultbutton=" FlashMe">
<table bgcolor="lime" height="100">
<tr><td>Am I gonna flash?</td></tr>
<tr><td><asp:Bu tton runat="server" ID="FlashMe" Text="Flash Me"
/></td></tr>
</table>
</form>

You will see the whole screen flash when you postback. Now, remove the
defaultbutton=" FlashMe" from the form and try again.
See: No FLASH!!!!!
The same happens when you define defaultfocus.Wh at gives?

Maybe someone needs to sit with IE guys and work out how to write script
file (WebResource.ax d) that doesn't cause IE to kick itself in the arse!

Anyone got a suggestion?

Thanks,
Oz

May 5 '06 #2
After much hunting I can put a name to the problem:

No folks, it not what's defined in:
http://www.urbandictionary.com/define.php?term=fouc
Though it certainly feels that way.
It is in fact: the Flash Of Unstyled Content
http://www.bluerobot.com/web/css/fouc.asp

The fix suggested still does not work. Anyone have any ideas?

Oz
Following is the test page including the suggested fix from bluerobot.

<%@ Page Language="C#" AutoEventWireup ="true" CodeFile="Flash .aspx.cs"
Inherits="Flash " %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitl ed Page</title>
<script type="text/javascript"> </script>
</head>
<body>
<form id="form1" runat="server" defaultbutton=" FlashMe">
<table bgcolor="lime" height="100">
<tr><td>Am I gonna flash?</td></tr>
<tr><td><asp:Bu tton runat="server" ID="FlashMe" Text="Flash Me" /></td></tr>
</table>
</form>
</body>
</html>

"Oz Kologlu" <oz*******@nowh ere.com> wrote in message
news:%2******** **********@TK2M SFTNGP03.phx.gb l...
Hi folks,

IE and Asp.net 2.0 are doing some pretty bizzare things. Some of our users
were getting pretty weary of IE redrawing and "flashing" what is
essentially a pretty static page every time there is a postback (IE
Version 6.0.2900.2180.x psp_sp2,,,,; Doesn't happen under firefox - bless
those folks).

Anyway try this:

<form id="form1" runat="server" defaultbutton=" FlashMe">
<table bgcolor="lime" height="100">
<tr><td>Am I gonna flash?</td></tr>
<tr><td><asp:Bu tton runat="server" ID="FlashMe" Text="Flash Me"
/></td></tr>
</table>
</form>

You will see the whole screen flash when you postback. Now, remove the
defaultbutton=" FlashMe" from the form and try again.
See: No FLASH!!!!!
The same happens when you define defaultfocus.Wh at gives?

Maybe someone needs to sit with IE guys and work out how to write script
file (WebResource.ax d) that doesn't cause IE to kick itself in the arse!

Anyone got a suggestion?

Thanks,
Oz

May 11 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

30
2973
by: Matt Probert | last post by:
Is it just me (probably) or is Mozilla and the newer Firefox full of CSS rendering bugs? I ask, because some strange effects occur with Mozilla and Firefox which don't happen in Opera and dare I say it, IE. Like, for example, non-selection of a font-face for one style element, even though it is selected okay for another element and the...
0
1866
by: Yarik | last post by:
Hello, When I open an HTML document by Internet Explorer 6 and then print the document on a color inkjet printer, some of the colors are rendered incorrectly (they appear much darker than they should be, almost black). The exact version of IE is 6.0.2800.1106 (with all patches applied). The printer is Canon S330. Examples of "suffering"...
3
4894
by: dpomt | last post by:
I am facing some issues with the webforms DefaultButton functionality: #1 One text box ==> hitting enter works in IE but not in Firefox (1.5) #2 One text box and req. field validator ==> problem in IE #3 two text boxes ==> not even a postbak in Firefox. The three problems I have could be simply reproduced creating a new webform and...
5
1826
by: Tyler Carver | last post by:
I have found a situation where the DefaultButton and DefaultFocus stop working under FireFox. I'm looking for any kind of fix or work around. The problem seems to happen when setting a control that is part of another control, like a templated control. The docs say to use the UniqueID in this case. In the example below I am trying to set...
0
1610
by: Tim_Mac | last post by:
i say "bug" in quotes because i can't really blame microsoft for a feature not working in a non-microsoft browser. However, i would have preferred if they did some better browser testing! if i press return or enter inside a multiline textbox in firefox, with Page.Form.DefaultButton set, the form is submitted. validation will usually...
7
2793
by: Tim_Mac | last post by:
this is a re-post of an earlier message. i'm posting it under my MSDN alias for a better chance of reply :) when you press return in a multiline textbox, you expect to insert a newline. However, if you set the Form.DefaultButton property, whatever javascript code is employed by Asp.Net to handle this functionality intercepts the key press...
2
12990
by: =?Utf-8?B?QmlnSm9obg==?= | last post by:
We can set the default button and focus field in ASP.Net 2.0 on the Form tag. My form tag is in the Master page, but the controls are in containers. I read through a few articles which did not work. I added a "runat=server" to make the values visible to the devel. env. I added properties to the masters codebehind: Private...
4
9729
by: Tim Mackey | last post by:
hi, asp.net 2. can anyone explain why this code does not work in firefox (2.0.0.1), but does work in IE 7. if you hit enter after typing something into the textbox, it should fire the Submit button click handler, instead it fires the event for the bogus button above it. btw it doesn't matter if i set it to ClientID, UniqueID or "btnSubmit"...
9
6754
by: Veerle | last post by:
Hi, When you use multiple asp:Buttons on one Form, then asp.net generates html submit buttons for all of them. When you put your cursor in one of the textfields of the form, the default submit button is the first submit button of the form. So if you press enter, then the form is submitted as if you pressed the first submit button of the...
0
7518
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7446
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7956
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6040
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5368
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5087
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3480
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1935
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1057
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.