7

We have license of BotDetect. and I would like to implement this BotDetect with Angular js. I Search in google And I found nothing proper helpful, however, I got angularjs-captcha which looks promising but didn't help me.

Here is what I need exactly.

  1. page load with Captcha Image
  2. User Fill the form
  3. User Hit on Submit
  4. Using $http request page submit
  5. If the response comes success or failure Captcha should be reloaded as per it's working engine.

Here is My Form

<form ng-submit="Submit($event)">
    <table width="100%" cellpadding="0" cellspacing="1" align="center">
        <tr>
            <td class="datafield">
                <label>Name:</label>
                <span class="red">*</span>
            </td>
            <td class="datafield">
                <input type="text" maxlength="50" class="searchboxmain" placeholder="enter name..."
                    ng-model="Form.Name" />
            </td>
        </tr>
        <tr>
            <td class="datafield">
                <label>Email:</label>
                <span class="red">*</span>
            </td>
            <td class="datafield">
                <input type="email" maxlength="240" class="searchboxmain" placeholder="enter email..."
                    ng-model="Form.Email" />
            </td>
        </tr>
        <tr>
            <td class="datafield">Enter Captcha
            </td>
            <td class="datafield">
                <botdetect-captcha>
            <br />
                <input type="text" id="CaptchaCodeTextBox" ng-model="Form.Captcha"/>
            </td>
        </tr>
        <tr>
            <td class="datafield"></td>
            <td class="datafield">
                <button class="submitbutton" ng-click="Submit($event)">Submit enquiry</button>
            </td>
        </tr>
    </table>
</form>

Controller

app.controller('ContactCtrl', function($scope, $http) {
    $scope.Form = {
        Name: '',
        Email: '',
        Captcha: ''
    };
    $scope.Submit = function(event) {
        // Here all code
        event.preventDefault();
    };
});

I am quite sure there could be other solution instead of using this Angular Captcha but I don't know anyone so, an alternative solution can be accepted.

Sagar Upadhyay
  • 819
  • 2
  • 11
  • 31
  • It might some jQuery function provided to reload captcha image which I didn't know, using the only jQuery solution I can handle rest of work. – Sagar Upadhyay May 23 '17 at 18:59
  • are you using it with JAVA? Docs says there is only Java supported currently (https://captcha.com/angular-captcha.html#angularjs) – enno.void May 23 '17 at 20:00
  • No, I am using ASP.NET C# (Not MVC). – Sagar Upadhyay May 24 '17 at 05:16
  • From [captcha website](https://captcha.com/angular-captcha.html#angularjs): "Please Note: Currently, AngularJS module is only supported by BotDetect Java, but support in PHP and ASP.NET versions is coming soon." I have personally never used ASP.NET, but it may be possible to create a workaround where you host the captcha on a separate page running MVC. If that isn't an option for you guys, then it looks like you're out of luck for now :( – otoomey May 25 '17 at 14:20
  • This might help: http://www.hanselman.com/blog/IntegratingASPNETMVC3IntoExistingUpgradedASPNET4WebFormsApplications.aspx – otoomey May 25 '17 at 14:22

1 Answers1

0

According to Bot Detect:

Please Note: Currently, AngularJS module is only supported by BotDetect Java, but support in PHP and ASP.NET versions is coming soon.

However, you should be able to accomplish what you have described in your question via the following guide: Integrating ASP.NET MVC 3 into existing upgraded ASP.NET 4 Web Forms applications

lax1089
  • 3,403
  • 3
  • 17
  • 37