<asp:TextBox ID="TextBox1" runat="server" onkeypress="return false;"/>OR
TextBox1.Attributes["readonly"] = "true";
Step 1. Install cors from NeGet Step 2. Enable cors in config using System; using System.Collections.Generic; using System.Linq; using ...
<asp:TextBox ID="TextBox1" runat="server" onkeypress="return false;"/>OR
TextBox1.Attributes["readonly"] = "true";