Bin folder contain
MSCaptcha.dll
MSCaptcha.xml
html page contain
<%# Page Language="C#" AutoEventWireup="true" CodeFile="captcha.aspx.cs" Inherits="_Default" %>
<%# Register Assembly="MSCaptcha" Namespace="MSCaptcha" TagPrefix="CaptchaImage" %>
<!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>
<CaptchaImage:CaptchaControl ID="CaptchaControl2" runat="server" />
</div>
</form>
</body>
</html>
Web config
<httpHandlers>
<add verb="GET" path="CaptchaImage.axd" type="MSCaptcha.CaptchaImageHandler, MSCaptcha"/>
</httpHandlers>
I have done all the things as shown in
http://www.msdotnet.co.in/2012/08/how-to-add-captcha-image-in-aspnet.html
and its running fine on local host but on online its showing Captcha text instead of image.
what shall i do
I have used Google Captcha, which will run on any web server.
Related
I want to create a tag prefix for controls in System.Web assembly.
<%# Page Language="C#" CodeBehind="SimpleCustomControl.aspx.cs" Inherits="SimpleCustomControl" %>
<%# Register TagPrefix="CC" Namespace="System.Web.UI.WebControls" Assembly="System.Web" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<CC:TextBox runat="server"></CC:TextBox>
</div>
</form>
</body>
</html>
But getting "Unrecognized tag prefix or device filter CC. Can not resolve symbol CC" error in VS. And no autocomplete is available after entering <CC:.
Is it possible to register such kind of tag prefix for standard controls?
I have my aspx as below:
<%# Page Language="C#" AutoEventWireup="true" CodeFile="test2.aspx.cs" Inherits="test2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%# Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<ajaxToolkit:ToolkitScriptManager id="ToolkitScriptManager1" runat="server"></ajaxToolkit:ToolkitScriptManager>
<div>
<asp:TextBox runat="server" ID="txtDateFerie" autopostback="True"/>
<asp:Button runat="Server" ID="ibtnDateFerie"
CausesValidation="False" />
<ajaxToolkit:CalendarExtender Format="dd/MM/yyyy" ID="cbeDateFerie" runat="server" Enabled="True"
TargetControlID="txtDateFerie" PopupButtonID="ibtnDateFerie" />
</div>
</form>
</body>
</html>
I have AjaxControlToolkit.dll and System.Web.Extensions.dll in my project. However, when I click on the button, the calendar is not shown. I have looked for an answer on the internet, and it seems I am not missing anything here. Any idea where the problem may be?
I've downloaded DropDownCheckBoxList control from it's official page.
I've created new WebSite inside Visual Studio 2012 using File -> New -> WebSite and I added dll into references.
Then inside Default.aspx I've added this sample code:
<%# Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%# Register TagPrefix="asp" Namespace="Saplin.Controls" Assembly="DropDownCheckBoxes" %>
<!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>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"> </script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:DropDownCheckBoxes ID="checkBoxes2" runat="server">
<Style SelectBoxWidth="300" />
<Items>
<asp:ListItem Text="Option 1" Value="1" />
<asp:ListItem Text="Option 2" Value="2" />
</Items>
</asp:DropDownCheckBoxes>
</div>
</form>
</body>
</html>
After starting debugger my web site is displayed, but when using element inspector in Chrome I noticed that DropDownCheckBoxes isn't rendering value field for checkboxes:
Inside download package that comes with DropDownCheckBoxList is sample project, when I start it I can see that value field is rendered:
It's my fourth hour trying to figure out what is wrong with my code!
How should I create WebSite or WebApplication to have value field rendered?
After another 4 hour searching over SO I found awesome answer:
https://stackoverflow.com/a/15030781/965722
When below entry is added into web.config value isn't rendered
<pages controlRenderingCompatibilityVersion="3.5">
So removing it instantly solved my problems.
Facebook doesn't show thumbnail from my web page
<%# Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="httpdocs_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">
<meta property="og:image" runat="server" content="http://fuzzel.org/Images/mercedes.jpg"/>
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
Welcome to Fuzzel
</div>
</form>
</body>
</html>
and I also get Message 1 Validation (HTML5): Attribute 'property' is not a valid attribute of element 'meta' message.
I also used developers.facebook.com/tools/debug and it shows thumbnail there, but when i post www.fuzzel.org as a status, it doesn't show thumbnail
Hello how can i add to imagebutton mouse leave event to run pagemethod i can't use javascript any idea?
<%# Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Zadanie_1_rysunki._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><center>
<form id="form1" runat="server">
<asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/img/1.jpg" />
<div>
</div>
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true">
</asp:ScriptManager>
</form>
</center>
</body>
</html>
Since you have 'EnablePageMethods' set to "true", I believe you can set the OnMouseLeave event to
"PageMethods.MyPageMethod(param1, param2, paramN);"