IE9 always runs in IE7 Compatibility mode - asp.net

I have a simple page in asp.net vs2008, when run in IE 9, the compatibility view button is visible, when clicked, the web page always run in IE7 compatibility mode.
Why the page does not does run in IE8, when compatibility view button is clicked? Do we even have IE8 compatibility view?
Here is the html code:
<%# Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication1.WebForm1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="TextBox1" runat="server" Text="Testing"></asp:TextBox>
</div>
</form>
</body>
</html>

Try this:
Step 1:Turn off compatibility view and check.
Open internet explorer.
Click on Alt key on the keyboard. Now click on Tools in menu bar.
Select Compatibility View Settings.
Remove the check mark for Display all websites in Compatibility View
and close the Compatibility View Settings window.
Step 2: Reset internet explorer settings and check.
Fore more information refer : Microsoft link

Related

Trouble With Static UICulture Setting and Implicit Localization

I’m playing with implicit localization on my Win7 box via VS2010 and something doesn’t quite seem right. I have a trivial page where I set the resourceKey of my GO Button to “bnGO”:
<%# Page Language="VB" culture="auto" meta:resourcekey="PageResource1" uiculture="es" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Test Implicit Localization</title>
</head>
<body>
<form id="form1" runat="server">
<asp:Button ID="bnGO" runat="server" meta:resourcekey="bnGO" />
</form>
</body>
</html>
Then I have both testForm.aspx.resx and testForm.es.aspx.resx files that set the value of bnGO.Text appropriately:
When I run the application, the GO Button displays the "Go Forth!" text defined in the default testForm.aspx.resx even though testForm.aspx has uiculture set to “es” (which I think is Spanish).
What am I doing wrong?
The name of the file should be:
testForm.aspx.es.resx
Not
testForm.es.aspx.resx

Ext.NET DateField - formatting reversing itself

We have a weird situation where an Ext.NET datefield is 'switching' formats if we input values in a certain style.
Specifically, if I input '01/12/09', when I blur the field, it will appear as '12/01/2009'. If I then focus the field and remove the '20' so the format reads '12/01/09' when I blur the field, it will 'switch' and show '01/12/09'.
What's odd is that we only see this behaviour on our production environment. I've done all the obvious things like checking the locale/region settings on the production box but haven't yet found anything which circumvents the behaviour.
Does anyone have any ideas on places to check next? This is based on Ext.js 3.3.1.
Many thanks,
Doug
Here's a simple test I used in an attempt to recreate the problem, although was unable.
<%# Page Language="C#" UICulture="en-GB" %>
<%# Register assembly="Ext.Net" namespace="Ext.Net" tagprefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Ext.NET Example</title>
</head>
<body>
<form runat="server">
<ext:ResourceManager runat="server" />
<ext:DateField ID="DateField1" runat="server" />
</form>
</body>
</html>
Which version of Ext.NET are you using 1.0, 1.1 or 1.2?
Can you modify the sample above to demonstrate the issue.

asp net 4 - autopostback doesnt fire in ie6

OK, Im really stumped and hoping this is something simple. I have a form that relies on an autopostback of a radiobuttonlist to show or hide something. This was really elaborate at first and working fine, until I tested in IE6. The code below is as basic as I can get, all my code behind does is update the label to the radiobutton's selected value on click. This works in IE7 and 8, but not in IE6, what gives?
<%# Page Title="" Language="vb" AutoEventWireup="false" CodeBehind="testpostback.aspx.vb" Inherits="Checkout.testpostback" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<asp:RadioButtonList ID="radio1" runat="server" AutoPostBack="true">
<asp:ListItem Text="Check1" Value="Check1" />
<asp:ListItem Text="Check2" Value="Check2" />
</asp:RadioButtonList>
<asp:Label ID="label1" runat="server" Text="none" />
</form>
</body>
</html>
Take a look at the generated javascript in your web page and probably it uses new features of javascript that couldn't be executed by IE6.
Chances are you can debug the javascript and see what happens.
Consider that IE6 in XP Sp3 is not the same as IE6 in earlier XPs and it has less problems.
This came up in this question as well. It seems to be an IE6 bug.

ASP.NET control for reCAPTCHA not working in Opera

I use ASP.NET reCAPTCHA control on my website (.net 3.5). I got it from this site (version 1.0.4.0).
It works great in IE6, Chrome, Firefox, and Safari, but I don't know why it doesn't work in Opera. When I open the page, it's blank. I use Opera 10.62.
I've prepared just a simple web form which contains only the reCAPTCHA control. The markup is:
<%# Page Language="C#" AutoEventWireup="true" CodeBehind="test.aspx.cs" Inherits="ClientWebPortal.test" %>
<%# Register TagPrefix="recaptcha" Namespace="Recaptcha" Assembly="Recaptcha" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<recaptcha:RecaptchaControl ID="recaptcha" runat="server" PublicKey="xxxxx"
PrivateKey="xxxxxxxx" />
</div>
</form>
</body>
</html>
Anybody have any suggestions?
I have experienced the same problem it appears to be a JavaScript exception that causes the image not to load in Opera. Below is the exception that I get:
Uncaught exception: [object DOMException]
Error thrown at line 12, column 0 in https://www.google.com/recaptcha/api/challenge?k=6LtestSAAAAAM1MsYg9ktesttestt9niYAftest:
document.write('<scr'+'ipt type="text/javascript" s'+'rc="' + RecaptchaState.server + 'js/recaptcha.js"></scr'+'ipt>');

View ASPX page in Web browser

I have the following .aspx page, and I want to view it in web browsers such as IE or Google Chrome by opening it directly in those browsers:
<%# Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication1._Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html>
But somehow the browsers can't render it. In IE, the error is
Cannot view XML input using XSL style
sheet. Please correct the error and
then click the Refresh button, or try
again later. A name was started with
an invalid character. Error processing
resource 'file:/
<%# Page Language="C#"AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication1._Default" %> -^*
What did I do wrong?
Remove or comment out the
<%# Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication1._Default" %>
line as a browser doesn't know what to do with it. This is normally interpreted by iis and not sent to the browser.
It won't actually work properly unless it is "served" by a web server of some sort.
If you are using Visual Studio, fire up the debugger, which by default will open IE, then grab the url from the location bar, and paste that into the browsers you want to check. Elsewise, mount the web site in IIS, and browse it that way.
Just opening the source file in a browser probably won't give you the result you are looking for.
Recent Visual Studios (at least 2010+) have a new feature called View in Browser which you can run on an .aspx file. Please note that, as per documentation, debugging breakpoints are not in effect even if debugging is enabled.
Right click the file in the Solution Explorer or the Editor and then select View In Browser (your default browser here).
Keyboard shortcut: Ctrl+Shift+W

Resources