title: How to attach a PDF generated using jsPDF to the mail using asp.net c#
body: <p>I need to know if there is any way to attach a PDF file generated using jsPDF and mail it in asp.net C#?</p>
  
  <p>I have the following code in c# </p>
  
  <pre><code>MailMessage message = new MailMessage(fromAddress, toAddress);
          message.Subject = subject;
          message.IsBodyHtml = true;
          message.Body = StrContent.ToString();
          //message.Attachments.Add(new Attachment("getDPF()"));
          smtp.Send(message);
  </code></pre>
  
  <p>and I'm using a JsPDF library as follows: </p>
  
  <pre><code>&lt;script type="text/javascript" src="jsPdf/jspdf.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
      function getPDF()
      {
          var doc = new jsPDF();
          doc.text(20, 20, 'TEST Message');
          doc.addPage();
          //doc.save('volt.pdf');
      }
  &lt;/script&gt;
  </code></pre>
  
  <p>Is there any way to attach it in the mail before send it? 
  Thanks in advance. </p>