title: The parameter dictionary contains a null entry for parameter 'IDnumber' of non-nullable type 'System.Int32'
body: <p>So i am building a book search page and everything else works (search by title, author etc) but I cant figure out how to search by the unique number which is an int in our db -- I've tried several things like converting to int32, turning IDnumber into a string etc but still cant find a solution</p>
  
  <p>parameters:</p>
  
  <pre><code>public ActionResult Index(int IDnumber, string LnameString, string FnameString, string bookGenre,string searchString)
  {
      //LINQ  query to select books
      var books = from m in db.Book
                  select m;
      //ID Number
      if (IDnumber != null)
      /* the if statement gives the following warning which i cannot resolve: the result of the expression is always 'true' since a value of type 'int' is never equal to null of type int?*/
      {
          books = books.Where(x =&gt; x.BookID == IDnumber);
      }
  ...
  }
  </code></pre>
  
  <p>View code:</p>
  
  <pre><code>&lt;p&gt;
  @Html.ActionLink("Create New", "Create")
  
  @using (Html.BeginForm("Index", "Books")){
  &lt;p&gt;
      Genre: @Html.DropDownList("bookGenre", "All")
      Title: @Html.TextBox("SearchString") &lt;br /&gt;
      Author First Name: @Html.TextBox("FnameString")
      Author Last Name: @Html.TextBox("LnameString") &lt;br /&gt;
      ID Number: @Html.TextBox("IDNumber")
      &lt;input type="submit" value="Filter" /&gt; 
  &lt;/p&gt;
  }
  </code></pre>
  
  <p>Exact error: </p>
  
  <blockquote>
    <p>The parameters dictionary contains a null entry for parameter
    'IDnumber' of non-nullable type 'System.Int32' for method
    'System.Web.Mvc.ActionResult Index(Int32, System.String,
    System.String, System.String, System.String)' in
    'SafariBooksGroup15.Controllers.BooksController'. An optional
    parameter must be a reference type, a nullable type, or be declared as
    an optional parameter. Parameter name: parameters</p>
  </blockquote>