Let me start off by saying that I'm using WebMatrix. I'm trying to add a reCAPTCHA plugin to my ASP.NET website. I had a look at the quickstart documentation for their ASP.NET plugin. Here is part of their example:
<%@ Page Language="VB" %>
<%@ Register TagPrefix="recaptcha" Namespace="Recaptcha" Assembly="Recaptcha" %>
<script runat="server">
Sub btnSubmit_Click(ByVal sender As Object, ByVal e As EventArgs)
If Page.IsValid Then
lblResult.Text = "You Got It!"
lblResult.ForeColor = Drawing.Color.Green
Else
lblResult.Text = "Incorrect"
lblResult.ForeColor = Drawing.Color.Red
End If
End Sub
</script>
<html>
<body>
<form runat="server">
<asp:Label Visible=false ID="lblResult" runat="server" />
<recaptcha:RecaptchaControl
ID="recaptcha"
runat="server"
Theme="red"
PublicKey="your_public_key"
PrivateKey="your_private_key"
/>
<!-- ... -->
</form>
</body>
</html>
I know that I wouldn't need the "<%@ Page Language="VB" %>", but I'm still fairly new to Razor, so how would I add a reference to the reCAPTCHA assembly and and display the plugin in my page? I'm doubtful that I could use this line for the assembly reference:
<%@ Register TagPrefix="recaptcha" Namespace="Recaptcha" Assembly="Recaptcha" %>
Also, can I put <asp:???>
tags and tags from the reCAPTCHA assembly in my CSHTML document? Would this be valid in a WebMatrix website:
<recaptcha:RecaptchaControl
ID="recaptcha"
runat="server"
Theme="red"
PublicKey="your_public_key"
PrivateKey="your_private_key"
/>
Basically I'm asking how one would go about adding a reCAPTCHA plugin to a Razor C# file.