In my form I have a submit button. After clicking on it an email must be sent to person using store procedure. I also want to add the content of the form to this email. I have Name, Email and Phone in my content. Below is my code. Please help me.
protected void btnSubmit_Click(object sender, EventArgs e)
{
MailMessage EmailMsg = new MailMessage();
EmailMsg.From = new MailAddress("Valley@xyz.com", "Valley");
EmailMsg.To.Add(new MailAddress("I WANT TO CALL STORE PROCEDURE HERE"));--------------------->Database Name: Valley ------->Store Procedure Name: Request
EmailMsg.Subject = "New access request";
EmailMsg.Body = "<html><body>This is a test email<hr>Test</body></html>";
EmailMsg.IsBodyHtml = true;
EmailMsg.Priority = MailPriority.Normal;
SmtpClient MailClient = ...
Go to the complete details ...