title: Add cookie for newsletter-modal-popup
body: <p>I am a beginner in asp.net and I want to make a newsletter pop up for my website</p>
  
  <p>The pop-up has been made successfully, and it is shown at the bottom right of the website.
  Now I want to add a cookie, so when visitors click on the 'sign up'-button or on the close button, the pop up is (never) shown again.</p>
  
  <p>But here I am stuck, and don't know how to begin to add a cookie...</p>
  
  <p>This is my code:</p>
  
  <pre><code>&lt;!-- Popup newsletter start --&gt;
  
      &lt;div class="dialog" title="Save time, save money!"&gt;
          &lt;form&gt;
              &lt;p&gt;Sign up and we'll send you the best deals&lt;/p&gt;
                  &lt;input type="email" id="email" name="email" value ="Enter your e-mail address here"&gt;
                  &lt;input type="submit" value="Sign up"&gt;
          &lt;/form&gt;
      &lt;/div&gt;
  
      &lt;script type="text/javascript"&gt;
          jQuery(document).ready(function () {
          jQuery(".dialog").dialog({
              bgiframe: true, autoOpen: true, height: '150', width: '350', modal: false, 
              position: {
                  my: "right bottom",
                  at: "right bottom",
              },
              create: function (event) {
                  $(event.target).parent().css({ 'position': 'fixed'});
              }
          });
      });
      &lt;/script&gt;
  
  
  &lt;!-- Popup newsletter end --&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/bFBx1.gif" rel="nofollow noreferrer">Picture newsletter-popup</a></p>