title: Avoiding Duplicate form submission in Asp.net MVC by clicking submit twice
body: <p>I am rendering a form in Asp.net MVC with a submit button. The page redirects after successful record addition into the database. Following is the code :-</p>
  
  <pre><code>[HttpPost]
  public ActionResult Create(BrandPicView brandPic)
  {
      if (ModelState.IsValid)
      {
          if (!String.IsNullOrEmpty(brandPic.Picture.PictureUrl))
          {
              Picture picture = new Picture();
              picture.PictureUrl = brandPic.Picture.PictureUrl;
              db.Pictures.Add(picture);
              brandPic.Brand.PictureId = picture.Id;
          }
          db.Brands.Add(brandPic.Brand);
          db.SaveChanges();
          return RedirectToAction("Index");
      }
      return View();
  }
  </code></pre>
  
  <p>But, while testing, I saw that if the form is clicked again and again, the multiple entries are submitted and saved into the database. </p>
  
  <p>How can i make sure that if the form has been submitted once to the server, then no duplicates are submitted.   </p>