title: Cannot implicitly convert type 'string' to 'System.Web.UI.WebControls.TextBox' Error
body: <p>I'm getting this error, but I just can't tell where it might be coming from. The line that the error page is referencing is:</p>
  
  <blockquote>
    <p>@ Page Title="" Language="C#" MasterPageFile="~/CV.Master" AutoEventWireup="true" CodeBehind="AddPost.aspx.cs" Inherits="CV_Blog_WDW.AddPost" </p>
  </blockquote>
  
  <p>But I can't see how that line can cause that error? Unless there's something I'm missing?</p>
  
  <p>My .aspx code is:</p>
  
  <pre><code>&lt;%@ Page Title="" Language="C#" MasterPageFile="~/CV.Master" AutoEventWireup="true" CodeBehind="AddPost.aspx.cs" Inherits="CV_Blog_WDW.AddPost" %&gt;
      &lt;asp:Content ID="Content1"
                   ContentPlaceHolderID="ContentPlaceHolder1"
                   runat="server"&gt;
          &lt;!-- =========
          Special Nav for BLog page
          ===================================--&gt;
          &lt;nav class="nav-blog"&gt;
              &lt;a href="default.aspx"
                 class="btn btn-left"
                 data-toggle="tooltip"
                 data-placement="left"
                 title=""
                 data-original-title="Home"&gt;
                  &lt;i class="fa fa-home"&gt;&lt;/i&gt;
              &lt;/a&gt;
              &lt;a href="#"
                 class="btn btn-big-blog"&gt;Blog&lt;/a&gt;
              &lt;a href="#"
                 class="btn btn-right"
                 data-toggle="tooltip"
                 data-placement="right"
                 title=""
                 data-original-title="Reload Page"&gt;
                  &lt;i class="fa fa-refresh"&gt;&lt;/i&gt;
              &lt;/a&gt;
          &lt;/nav&gt;
          &lt;!-- =========
          Start Show Yor Name Section
          ===================================--&gt;
          &lt;/div&gt;
          &lt;/header&gt;
          &lt;!-- =========
      End portrait section
      ===================================--&gt;
          &lt;!-- =========
      Start Content section
      ===================================--&gt;
          &lt;section class="content open"
                   id="main-content"&gt;
              &lt;div class="body-content"
                   id="blog"&gt;
                  &lt;div class="row"&gt;
                      &lt;div class="col-md-10 col-md-offset-1"&gt;
                          &lt;div class="blog-posts"&gt;
                              &lt;div class="blog-post"&gt;
                                  &lt;h3 class="title with-icon"&gt;
                                      &lt;span class="fa  fa-comment-o icn-title"&gt;&lt;/span&gt; Add A Post
                                  &lt;/h3&gt;
                                  &lt;div class="box-block"&gt;
                                      &lt;div class="row"&gt;
                                          &lt;div class="col-md-6"&gt;
                                              &lt;div class="form-group"&gt;
                                                  &lt;label for="Title"&gt;Title&lt;/label&gt;
                                                  &lt;asp:TextBox ID="Title"
                                                               runat="server"
                                                               CssClass="form-control"&gt;&lt;/asp:TextBox&gt;
                                              &lt;/div&gt;
                                              &lt;div class="form-group"&gt;
                                                  &lt;label for="FeaturedImage"&gt;Featured Image&lt;/label&gt;
                                                  &lt;asp:FileUpload ID="FeaturedImage"
                                                                  runat="server"
                                                                  CssClass="form-control" /&gt;
                                              &lt;/div&gt;
                                          &lt;/div&gt;
                                      &lt;/div&gt;
                                      &lt;div class="form-group"&gt;
                                          &lt;label for="MesageForm"&gt;Body&lt;/label&gt;
                                          &lt;asp:TextBox ID="Body"
                                                       TextMode="MultiLine"
                                                       Rows="8"
                                                       runat="server"
                                                       CssClass="form-control"&gt;&lt;/asp:TextBox&gt;
                                      &lt;/div&gt;
                                      &lt;asp:Button id="btnAdd"
                                                  runat="server"
                                                  CssClass="btn btn-flat btn-lg"
                                                  Text="Add Post"
                                                  OnClick="btnAdd_Click" /&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
      &lt;/asp:Content&gt;
  </code></pre>
  
  <p>And my code behind is:</p>
  
  <pre><code>public partial class AddPost : System.Web.UI.Page
  {
      protected void Page_Load(object sender, EventArgs e)
      {
  
      }
  
      protected void btnAdd_Click(object sender, EventArgs e)
      {
          if(FeaturedImage.HasFile)
          {
              try
              {
                  string filename = Path.GetFileName(FeaturedImage.FileName);
                  FeaturedImage.SaveAs(Server.MapPath("~/assets/images/blog/") + filename);
              }
              catch(Exception ex)
              {
                  string error = ex.Message;
              }
          }
  
          try
          {
              string connection = WebConfigurationManager.ConnectionStrings["ConnectionString"].ToString();
  
              SqlConnection con = new SqlConnection(connection);
  
              SqlCommand cmd = new SqlCommand("AddPost", con);
              cmd.CommandType = CommandType.StoredProcedure;
              cmd.Parameters.AddWithValue("@Title", Title.Text);
              cmd.Parameters.AddWithValue("@Date", DateTime.Now);
              cmd.Parameters.AddWithValue("@FeatureImage", Path.GetFileName(FeaturedImage.FileName));
              cmd.Parameters.AddWithValue("@PostedBy", 1);
              cmd.Parameters.AddWithValue("@Body", Body.Text);
  
              con.Open();
              cmd.ExecuteNonQuery();
          }
          catch(Exception ex)
          {
  
          }
      }
  }
  </code></pre>
  
  <p>I've google'ed the error but there's nothing that seems relevant to my code? Really stumped on this one, not been able to try any fixes as to be honest not sure where to start. As far as I can see I'm not making a conversion, but maybe there's one going on that I'm, not aware of?</p>