title: Accessing codebehind field values through ASP.NET HTML code
body: <p>simple question</p>
  
  <p>in code behind(.cs) we have </p>
  
  <pre><code>string error="11000114S";
  </code></pre>
  
  <p>in ASP (.aspx) we have:</p>
  
  <pre><code>&lt;asp:TextBox ID="text" runat="server" EnableViewState="false" AutoPostBack="false"/&gt;
  &lt;asp:RequiredFieldValidator id="textValidator" runat="server" controlToValidate="text"
  errormessage=(our string error="11000114S")&gt; 
  </code></pre>
  
  <p>So how to do this, assign value from cs-> saved error list to html ?</p>