Solved: Error Creating Control – Failed to create designer Telerik.Web.UI

After playing with references in your project, you may end up seeing your beloved Telerik controls in this annoying error box:

untitled-2

Error Creating Control – objectName
Failed to create designer ‘Telerik.Web.UI.RadDopDownList…’

Solution

This root cause of this issue is that a mismatch between the Telerik DLLs you referenced and the Telerik controls you have in your page.

In order to fix this issue, simply remove your Telerik references and add the ones whose version number match with the controls in your page.

How to disable a DropDownList or ComboBox using JavaScript

It may be tricky depending on the situation. Here is what it works in my case:

var objectListCountry = $find("<%= listCountry.ClientID %>");
objectListCountry.set_enabled(false);

Solved: Google reCAPTCHA always returns “false” as a response to AJAX call

I have explained how to use Google reCAPTCHA in another post. Google returns “true” or “false” in “success” parameter as a response to your AJAX call.

After your implementation, you might be constantly getting “false” value in this parameter. The response looks like this in your browser trace:

{
“success”: false,
“error-codes”: [
     “missing-input-response”,
     “missing-input-secret”
      ]
}

Issue

You might be sending “secret” and “response” parameters as hash map. Your code may look like this:

$.ajax({
     type: "POST",
     url: "https://www.google.com/recaptcha/api/siteverify",
     data: {
     secret: "YOUR-SECRET-KEY",
     response: captchaResult
},
contentType: "application/json; charset=utf-8",
dataType: "json",
failure: function (response) {
     alert(response.d);
},
success: function (response) {
     googleCallResult = response.success;
}
}).done(function () {
     // Do stuff with googleCallResult
});

Solution

Google reCAPTCHA expects parameters to be sent in the URL instead of hash map. So you need to add “secret” and “response” parameters into the URL. Here is the edited code:

$.ajax({
     type: "POST",
     url: "https://www.google.com/recaptcha/api/siteverify?secret=YOUR-SITE-KEY&response=" + captchaResult,
     contentType: "application/json; charset=utf-8",
     dataType: "json",
     failure: function (response) {
     alert(response.d);
},
success: function (response) {
     googleCallResult = response.success;
}
}).done(function () {
     // Do stuff with googleCallResult
});