title: A potentially dangerous Request.Form value was detected from the client (textboxError="<Responses><Response...")
body: <p>I'm using ozeki ng SMS gateway. I'm unable to send any SMS to any mobile. Please help me to send SMS through net to mobile  </p>
  
  <p>A potentially dangerous Request.Form value was detected from the client (textboxError=". After setting this value, you can then disable request validation by setting validateRequest="false" in the Page directive or in the  configuration section. However, it is strongly recommended that your application explicitly check all inputs in this case. For more information, see <a href="http://go.microsoft.com/fwlink/?LinkId=153133" rel="noreferrer">http://go.microsoft.com/fwlink/?LinkId=153133</a>.</p>
  
  <p>Exception Details: System.Web.HttpRequestValidationException: A potentially dangerous Request.Form value was detected from the client (textboxError="
  
  <p>AND my cs file is</p>
  
  <pre><code>using System;
  using System.Data;
  using System.Configuration;
  using System.Web;
  using System.Web.Security;
  using System.Web.UI;
  using System.Web.UI.WebControls;
  using System.Web.UI.WebControls.WebParts;
  using System.Web.UI.HtmlControls;
  using System.Net;
  using System.Text.RegularExpressions;
  
  public partial class _Default : System.Web.UI.Page 
  {
  
  
      protected void Page_Load(object sender, EventArgs e)
      {
          textboxRecipient.Width = 400;
          textboxMessage.Width = 450;
          textboxMessage.Rows = 10;
          textboxError.Width = 400;
          textboxError.Rows = 5;
  
          textboxError.ForeColor = System.Drawing.Color.Red;
          textboxError.Visible = false;
          textboxError.Text = "";
  
          if (!Page.IsPostBack)
          {
              textboxRecipient.Text = "+441234567";
              textboxMessage.Text = "Hello World!";
          }
      }
  
      protected void buttonSendOnClick(object sender, EventArgs e)
      {
          //are required fields filled in:
          if (textboxRecipient.Text == "")
          {
              textboxError.Text += "Recipient(s) field must not be empty!\n";
              textboxError.Visible = true;
              return;
          }
  
          //we creating the necessary URL string:
          string ozSURL = "http://127.0.0.1"; //where Ozeki NG SMS Gateway is running
          string ozSPort = "9501"; //port number where Ozeki NG SMS Gateway is listening
          string ozUser = HttpUtility.UrlEncode("admin"); //username for successful login
          string ozPassw = HttpUtility.UrlEncode("admin"); //user's password
          string ozMessageType = "SMS:TEXT"; //type of message
          string ozRecipients = HttpUtility.UrlEncode(textboxRecipient.Text); //who will get the message
          string ozMessageData = HttpUtility.UrlEncode(textboxMessage.Text); //body of message
  
          string createdURL = ozSURL + ":" + ozSPort + "/httpapi" +
              "?action=sendMessage" +
              "&amp;username=" + ozUser +
              "&amp;password=" + ozPassw +
              "&amp;messageType=" + ozMessageType +
              "&amp;recipient=" + ozRecipients +
              "&amp;messageData=" + ozMessageData;
  
          try
          {
              //Create the request and send data to Ozeki NG SMS Gateway Server by HTTP connection
              HttpWebRequest myReq = (HttpWebRequest)WebRequest.Create(createdURL);
  
              //Get response from Ozeki NG SMS Gateway Server and read the answer
              HttpWebResponse myResp = (HttpWebResponse)myReq.GetResponse();
              System.IO.StreamReader respStreamReader = new System.IO.StreamReader(myResp.GetResponseStream());
              string responseString = respStreamReader.ReadToEnd();
              respStreamReader.Close();
              myResp.Close();
  
              //inform the user
              textboxError.Text = responseString;
              textboxError.Visible = true;
          }
          catch (Exception)
          {
              //if sending request or getting response is not successful Ozeki NG SMS Gateway Server may do not run
              textboxError.Text = "Ozeki NG SMS Gateway Server is not running!";
              textboxError.Visible = true;
          }
  
      }
  }
  </code></pre>
  
  <p>and my asp page is</p>
  
  
  
  <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  
  &lt;html xmlns="http://www.w3.org/1999/xhtml" &gt;
  &lt;head runat="server"&gt;
      &lt;title&gt;Ozeki NG SMS Gateway Message Sending Example&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;center&gt;
      &lt;form id="smsdata" runat="server"&gt;
          &lt;asp:Table id="smstable" runat="server" style="text-align:left; border-width:thin; border-color:Silver;" BorderStyle="Solid"&gt;
              &lt;asp:TableRow&gt;
                  &lt;asp:TableCell ColumnSpan="2"&gt;
                      &lt;b&gt;Compose a message:&lt;/b&gt;
                      &lt;br /&gt;
                      &lt;br /&gt;
                  &lt;/asp:TableCell&gt;
              &lt;/asp:TableRow&gt;
              &lt;asp:TableRow&gt;
                  &lt;asp:TableCell HorizontalAlign="Left" VerticalAlign="Top"&gt;
                      &lt;asp:Label ID="labelRecipient" runat="server" Text="Recipient: "&gt;&lt;/asp:Label&gt;
                  &lt;/asp:TableCell&gt;
                  &lt;asp:TableCell&gt;
                      &lt;asp:TextBox ID="textboxRecipient" runat="server"&gt;&lt;/asp:TextBox&gt;
                  &lt;/asp:TableCell&gt;
              &lt;/asp:TableRow&gt;
              &lt;asp:TableRow&gt;
                  &lt;asp:TableCell HorizontalAlign="Left" VerticalAlign="Top"&gt;
                      &lt;asp:Label ID="labelMessage" runat="server" Text="Message Text: "&gt;&lt;/asp:Label&gt;
                  &lt;/asp:TableCell&gt;
                  &lt;asp:TableCell&gt;
                      &lt;asp:TextBox ID="textboxMessage" runat="server" TextMode="MultiLine"&gt;&lt;/asp:TextBox&gt;
                  &lt;/asp:TableCell&gt;
              &lt;/asp:TableRow&gt;
              &lt;asp:TableRow&gt;
                  &lt;asp:TableCell ColumnSpan="2" HorizontalAlign="Center"&gt;
                      &lt;asp:Button ID="buttonSend" runat="server" Text="Send Message" OnClick="buttonSendOnClick" /&gt;
                  &lt;/asp:TableCell&gt;
              &lt;/asp:TableRow&gt;
              &lt;asp:TableRow&gt;
                  &lt;asp:TableCell ColumnSpan="2" HorizontalAlign="Center"&gt;
                      &lt;asp:TextBox ID="textboxError" runat="server" BorderStyle="None" TextMode="MultiLine"&gt;&lt;/asp:TextBox&gt;
                  &lt;/asp:TableCell&gt;
              &lt;/asp:TableRow&gt;
          &lt;/asp:Table&gt;
      &lt;/form&gt;
      &lt;/center&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>