I have encountered a weird problem that does not exist in Firefox or IE. I have a user control that has a text box and a required field validator. When the user control is hosted in an update panel, the UpdateProgress tag never closes the first time that the UpdateProgress is triggered on the page when the page is viewed in Chrome. Has anyone else encountered this, and if so, is there any solution other than removing the validator? I could manually validate, but who wants to do that to support a browser bug?
The workaround simply tells ASP.NET AJAX that Safari 3 and Google Chrome are a new type of browser instead of the old Safari for which workarounds had to be programmed.
http://blog.lavablast.com/post/2008/10/20/Gotcha-WebKit-(Safari-3-and-Google-Chrome)-Bug-with-ASPNET-AJAX.aspx
Related
I have a curious issue. I have an ASP.NET web page that has a RadioButtonList with three RadioButtons. RadioButton1 hides both Panels. RadioButton2 displays Panel1 and hides Panel2 then RadioButton3 hides Panel1 and displays Panel2. Pretty straight forward. All of the logic that hide and display the Panels is in C# in the Code Behind. All of this works great in Chrome and IE. In Firefox; however, if you refresh the page in any way (another controls posts back or by hitting the browser's refresh button) while say RadioButton2 is selected and Panel1 is displayed the page comes back with the RadioButton2 still selected but both Panels are now hidden. In Chrome and IE a refresh of the page brings it back to it's original state. Meaning that all of the controls are set to their original values and RadioButton1 is selected and both Panels are hidden. Not necessarily ideal but a whole lot better than having the RadioButtons and Panels come back out of sync.
Not sure where to begin looking on this one. None of this is done in JavaScript. The panels and RadioButtons are not generated in code behind they are in the static HTML portion of the page.
Thoughts?
This sounds like you might be dealing with a page caching issue in Firefox. Have you tried disabling page caching for this page? For example, see this answer: Disable caching in Fire Fox in ASP.NET and C#
This is not really the answer I was hoping for because it seems incomprehensible to me that in 2014 we still have issues with browser inconsistencies but I put some code in the page to handle this and force it back into the proper state. This has solved the immediate problem.
I have written a web page that provides a drop down list of reports that can be viewed. The fiddle is here: http://jsfiddle.net/ZrdUY/1/. The image in the fiddle is exactly what you see when you open the page in Firefox (13.0.1) but when the page is opened in IE6 it seems that the "View Report" event is triggered with the visible selection in the drop down list thus immediately rendering that report.
Any advice is appreciated.
Regards.
Weird. The problem simply went away.
I'm using the ASP.NET Membership provider and using the Password Recovery control to reset the user password if they forget it. On the whole it all works fine, but with one catch when it comes to validation.
I have expanded the PasswordRecovery control out to use the template feature to customise the appearance, which is all fine. I have set the user lookup error handler using:
OnUserLookupError="PasswordRecovery1_UserLookupError"
in the opening tag and if I load up the page, type in some junk name and click submit this fires as expected, in all browsers. The snippet of VB code makes an error div visible and sets some text.
However, if upon loading the page for the first time I type a duff name into the username box and hit the enter key to submit the form, in Internet Explorer (version 8), the UserLookupError event fails to trigger. It triggers just fine in Chrome or Firefox, just not in IE. I know it's not a focus issue on the form, as I can see the form is being submitted.
If I click the submit button first, then following that hit the enter key it does fire, it's just that first time it doesn't, and only in IE.
Also to add that if I set breakpoints in the VB code to check to see if the page is being submitted, I can see the Page_Load event fire when I hit the enter key, but not the sub PasswordRecovery1_UserLookupError.
Has anyone else seen this? It looks like a bug in IE (no really???), but I need to nail it down.
Any help would be welcome.
OK, after some more digging and testing this is actually only a default button issue. I'm not sure what's happening when the enter key is being pressed (only in IE) after text has been entered in the box, as it is reloading the page but not submitting it. There is no other control or function on the page which would navigate back to or refresh this page.
Despite the submit button appearing to be the default button it actually isn't. The key here therefore is setting the defaultbutton property of the webform. That however, when the button is inside a PasswordRecovery control is another issue.
EDIT:
Here's the fix. Set the default button at the page load stage.
Me.Form.DefaultButton = PasswordRecovery1.UserNameTemplateContainer.FindControl("SubmitButton").UniqueID
For some strange reason, an alert dialog with the text title "Message From Web page" and message "-" displays when posting back a form with validation. There are no custom validation scripts that display an alert window. I am debugging JavaScript using IE development toolbar? Is it possible to break into the code that displays the alert box? So far I have been unable to do so.
CTRL-SHIFT-J (also under the Page > Developer > Debug JavaScript menu item) in chrome to debug javascript. Debuggin in chrome is easier than IE
the validation error was displayed by validation summary control with no display.
Thanks for taking the time.
I show/hide few images basing on the button clicks in update panel. I use an update progress also for this. Everything works fine in IE7. But in Firefox Version 3.0.14 when I click on the button in the update panel the event itself is not getting fired.
What may be the problem?
I dont think there is any reason for it to work in IE and not in FF.
What plugins you have installed on Firefox?
Disable all plugins and then check.
I found the issue. This is because, I didn't set the CausesValidation property to false. I need this because there are usercontrols which performs their own validations.
But now, I am wondering why IE allowed the button click?