ASP.NET control for reCAPTCHA not working in Opera - asp.net

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>');

Related

IE9 always runs in IE7 Compatibility mode

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

Redirecting back from where user came from in ASP.NET Page Not code behind

I have a ASP.NET page what I got at the moment is
<%# Page Language="C#" AutoEventWireup="true" CodeBehind="RedirectMeNow.aspx.cs" Inherits="abc.eyd._12.TEMPLATE.LAYOUTS.RedirectMeNow" %>
<!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>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html>
how can I redirect a user back from where he came from here, not in code behind like here
Redirecting back from where user came from in ASP.NET User Control
OR I just want a ASP.NET page that redirects user on call
To avoid using code-behind, you have to use a client-side Javascript function:
window.history.back();
You can either bind it to an event or execute it during page load.
EDIT:
If u want to make this page a redirect-only page, you can add this code to your tag:
<head>
....
<script type="text/javascript>
window.history.back();
</script>
</head>
It will be executed as soon as page is getting loaded.
That's it!

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

problems when adding server side control

I have a fully HTML project, with complete .CSS file.
The thing is I want to add some asp.net controls like TextBox's and Buttons and what not, but when I add server side controls to it and run the pages it gave me errors I cannot follow because it appears on the tab of the browser.
The error start with control 'txt' of type TextBox..., and then it gives me Navigation Cancelled, and the browser direct me to
http://youtubedownloader.mybrowserbar.com/cgi/errors.cgi?q=http://localhost:55942/Dar%2520Al-Thaqafah/Default2.aspx&type=dns&ISN=A9B31DEE919345BE838EAF628EAFA22F&ccv=149&cnid=937811&cco=US&ct=1&sc=500
Here is the code of default2.aspx page
[%# Page Language="VB" AutoEventWireup="false" CodeFile="Default2.aspx.vb" Inherits="Default2" %]
[div class="header"]
[div class="logo"></div]
[div id="menu"]
[ul]
[li class="selected"][a href="Default.aspx"]Home[/a][/li]
[li][a href="Default2.aspx"]Available Books[/a][/li]
[li][a href="Default3.aspx"]Register[/a][/li]
[li][a href="Default4.aspx"]Checkout[/a][/li]
[li][asp:TextBox ID="txt" runat="server"][/asp:TextBox][/li]
[li][asp:Button ID="btn" Text="hhhhh" runat="server" /][/li]
[/ul]
[/div]
[/div]
[/div]
I am using Browser IE version 9.
Visual Studio 2005.
Thank you
Try with the code given below:
<%# Page Language="VB" AutoEventWireup="false" CodeFile="Default2.aspx.vb" Inherits="Default2" %>
<!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>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div class="logo"></div>
<div id="menu">
<ul>
<li class="selected">Home</li>
<li>Available Books</li>
<li>Register</li>
<li>Checkout</li>
<li><asp:TextBox ID="txt" runat="server"></asp:TextBox></li>
<li><asp:Button ID="btn" Text="hhhhh" runat="server" /></li>
</ul>
</div>
</form>
</body>
</html>
Well with the limited information you provided, I guess the problem is that you are adding ASP.NET controls to an HTML page and not an ASP.NET page and that's why you see the errors. The ASP.NET controls are executed by the server and converted into Browser-readable HTML controls. So, you can only add ASP.NET controls to only ASP.NET page.

Error with masterpage

i'm creating a brand new masterpage with VS2010 Beta 2 and I get this warning (that causes me errors in the content pages):
Validation (XHTML 1.0 Transitional):
Content is not supported outside
'script' or 'asp:content' regions.
The masterpage's code :
<%# Master Language="C#" AutoEventWireup="true" CodeBehind="Bob.master.cs" Inherits="TShirtFactory.Web.All.Core.lib.masterpage.Bob" %>
<!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>
<asp:ContentPlaceHolder ID="head" runat="server">
</asp:ContentPlaceHolder>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</div>
</form>
</body>
</html>
As you can see, it's the default masterpage generated code. I get the warning when I hover the tag at top. Does anybody have an idea of what's going on ?
Thank you
In my case the error has gone after removing masterPageFile attribute from the Page-section in the web.config file:
<configuration>
<system.web>
<pages styleSheetTheme="mystyle" masterPageFile="~/myMaster.master" />
</system.web>
</configuration>
Or, if you need this attribute in the web.config file, just add empty MasterPageFile to you master page:
<%# Master Language="VB" AutoEventWireup="false" CodeFile="mySecondMaster.master.vb" Inherits="mySecondMaster" MasterPageFile="" %>
It's simple... Visual Studio is bonkers. Actually, the truth is that it can't possibly validate some markup simply because much of it is dynamic. For instance, in my project I have a constant warning about the lack of a <title> tag because it's added dynamically. Bottom line: the XHTML validator does not really know much about ASP.NET code.

Resources