string.Format(@"
if({0} == false){{
return false;
}}else{{
document.getElementById('{1}').style.display = 'block';
return true;
}}", this.OnBeginRequest, this.ClientID);
Step 1. Install cors from NeGet Step 2. Enable cors in config using System; using System.Collections.Generic; using System.Linq; using ...
string.Format(@"
if({0} == false){{
return false;
}}else{{
document.getElementById('{1}').style.display = 'block';
return true;
}}", this.OnBeginRequest, this.ClientID);