tanveery / recaptcha-net

reCAPTCHA for .NET library lets you easily use Google's reCAPTCHA in an ASP.NET Web Forms / MVC / ASP.NET Core application.
Apache License 2.0
163 stars 69 forks source link

[Feature request] Support for Razor Pages and Blazor #63

Open AnnaSava opened 3 years ago

AnnaSava commented 3 years ago

I'm moving my project from MVC5 to Asp.Net Core using Razor Pages and found that only MVC is supported. It woud be great to have some kind of RecaptchaRazorPageExtensions.cs and also the one for Blazor.

Thanks.

cmjdiff commented 3 years ago

Specifically for Razor Pages, I've got a PR open (#58). Be aware that if you include the source but only want the Core version, you'll need to do some fiddling with the source files, as the ones that are identical in Framework and Core live in the Framework source and the Core project references them.

adamgryu commented 2 years ago

I'd also like this feature, do I just need to import the code into my project and make the constructor public?

bander87 commented 1 year ago

Is this committed in the latest version? I'm also using razor and not seeing the extension method.

image
maeni70 commented 1 year ago

Is this committed in the latest version? I'm also using razor and not seeing the extension method.

image

Exactly the same problem here. In ASP.NET Core it only works in controllers but not Razor pages (PageModel). Is there any chance that support will be added?