title: Null Reference Exception was unhandled by user code Message
body: <p>I have this ASPX code:</p>
  
  <pre><code>&lt;form name="AddArticle" action="Register.aspx" method="post"&gt;
  &lt;b&gt;
  title :&lt;br /&gt;&lt;/b&gt;&lt;input id="Text1" type="text" name="ArticleTitle"/&gt;&lt;p&gt;&lt;/p&gt;
  &lt;b&gt;
  
  date: &lt;br /&gt;&lt;/b&gt;&lt;input id="Text2" type="text" name="ArticleDate"/&gt;&lt;p&gt;&lt;/p&gt;
  
  &lt;b&gt;
  author : &lt;br /&gt;&lt;/b&gt;&lt;input id="Text3" type="text" name="ArticleAuthor"/&gt;&lt;p&gt;&lt;/p&gt;
  &lt;b&gt;
  text: &lt;br /&gt;&lt;/b&gt; &lt;textarea rows="10" cols="60"  name="ArticleBody"&gt;&lt;/textarea&gt;
  &lt;br /&gt;
  &lt;input id="Reset1" type="reset" value="clean" /&gt;
  &lt;input id="Submit1" type="submit" value="send" /&gt;&lt;/form&gt;
  </code></pre>
  
  <p>And this C# code: </p>
  
  <pre><code>using System;
  using System.Collections;
  using System.Configuration;
  using System.Data;
  using System.Linq;
  using System.Web;
  using System.Web.Security;
  using System.Web.UI;
  using System.Web.UI.HtmlControls;
  using System.Web.UI.WebControls;
  using System.Web.UI.WebControls.WebParts;
  using System.Xml.Linq;
  using System.Data.OleDb;
  
  public partial class Register : System.Web.UI.Page
  {
  
      protected void Page_Load(object sender, EventArgs e)
      {
          string ArticleTitle, ArticleBody, ArticleAuthor, ArticleDate;
          if (IsPostBack ==false)
          {
              ArticleTitle = Request.Form["ArticleTitle"].ToString();
              ArticleDate = Request.Form["ArticleDate"].ToString();
              ArticleAuthor = Request.Form["ArticleAuthor"].ToString();
              ArticleBody = Request.Form["ArticleBody"].ToString();
  
  
              string dpath = Server.MapPath(@"App_Data") + "/MySite.mdb";
              string connectionstring = @"Data source='" + dpath + "';Provider='Microsoft.Jet.OLEDB.4.0';";
              OleDbConnection con = new OleDbConnection(connectionstring);
              string QuaryString = string.Format("insert into tblArticles(ArticleTitle, PostDate) values ('{0}','{1}')", ArticleTitle, ArticleDate);
              OleDbCommand cmd = new OleDbCommand(QuaryString, con);
              con.Open();
              cmd.ExecuteNonQuery();
          }
          else
          {
  
          }
      }
  
  
  }
  </code></pre>
  
  <p>The problem here is, I get this error message:</p>
  
  <blockquote>
    <p>System.NullReferenceException was unhandled by user code<br>
    Source="App_Web_cebzruil"   StackTrace:</p>
  </blockquote>
  
  <p>In those lines</p>
  
  <pre><code>ArticleTitle = Request.Form["ArticleTitle"].ToString();
  ArticleDate = Request.Form["ArticleDate"].ToString();
  ArticleAuthor = Request.Form["ArticleAuthor"].ToString();
  ArticleBody = Request.Form["ArticleBody"].ToString();
  </code></pre>
  
  <p>My question is how can I fix this problem?</p>