Note that there are some explanatory texts on larger screens.

plurals
  1. POThe name 'txtBxSearch' does not exist in the current context
    text
    copied!<p>I have a code here that consist of input box and a text area, but when I'm about to call the input box which name is txtBxSearch. An error occurred, It says "The name 'txtBxSearch' does not exist in the current context"</p> <pre><code>&lt;asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"&gt; &lt;div style="padding-top:10px; padding-left:40px;"&gt; &lt;span class="fields"&gt;To:&lt;/span&gt;&lt;br /&gt; &lt;input type="text" id="txtBxSearch" name="txtBxSearch" class="border fields" style="width:891px;" onclick="return txtBxSearch_onclick()" /&gt; </code></pre> <p></p> <pre><code>&lt;div style="padding-top:10px; padding-left:40px;"&gt;&lt;span class="fields"&gt;Text Message:&lt;/span&gt;&lt;br /&gt; &lt;textarea id="TextArea1" onkeyup="textCounter(this,'counter',160);" cols="20" rows="2" class="fields border" style="height:150px; width:95%;"&gt;&lt;/textarea&gt; </code></pre> <p></p> <pre><code>&lt;/asp:Content&gt; </code></pre> <p>My code behind in C# </p> <pre><code>using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Data.SqlClient; using System.Web.Services; using System.Web.UI.WebControls; public partial class SMS : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } private string groupKeyword; private string message; private int priorityLevel; private bool isDiagnosticCommand; private bool concatenate; private object confirmationDate; protected void btnSend_Click(object sender, ImageClickEventArgs e) { groupKeyword = txtBxSearch.value; message = TextArea1.Value; priorityLevel = 253; //confirmationDate = DateTime.Now.ToShortDateString(); isDiagnosticCommand = false; concatenate = false; } } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload