title: How to cast object of type 'System.Net.FileWebRequest' to type 'System.Net.HttpWebRequest'
body: <p>I'm getting the above error above i mention as i have just convert the vb code to csharp. May i know if there is someone who knows how to solve this issue? Thanks in advance</p>
  
  <pre><code> HttpWebRequest myWebRequest = null;
      HttpWebResponse myWebResponse = null;
         string strNo = null;
      strNo = TextBox1.Text;
      try {
          string sURL = "http://gateway.onewaysms.sg:10002/api.aspx";
          sURL = sURL + "?apiusername=" + HttpUtility.UrlEncode("API3YS3NVIWNP");
          sURL = sURL + "&amp;apipassword=" + HttpUtility.UrlEncode("API3YS3NVIWNPGNZIV");
          sURL = sURL + "&amp;mobileno=" + HttpUtility.UrlEncode(strNo);
          sURL = sURL + "&amp;senderid=" + HttpUtility.UrlEncode("onewaysms");
          sURL = sURL + "&amp;languagetype=" + "1";
          sURL = sURL + "&amp;message=" + HttpUtility.UrlEncode("testing");
  
  
        //Error at WebRequest   
  
          myWebRequest = System.Net.WebRequest.Create(sURL);
          myWebResponse = myWebRequest.GetResponse();
  </code></pre>