Note that there are some explanatory texts on larger screens.

plurals
  1. POForm in C#/Sharepoint
    text
    copied!<p>I am trying to create a form in Sharepoint using C#. I don't know C# that well and that is where my error is occurring. I want the information to be emailed to the address on submission. Here is the code I have for my tizagEmailForm.html...</p> <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt; &lt;title&gt;Untitled 2&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;form method="POST" action="tizagEmail.aspx"&gt; To &lt;input type="text" name="To"/&gt; &lt;br /&gt; From &lt;input type="text" name="From"/&gt; &lt;br /&gt; Subject &lt;input type="text" name="Subject"/&gt; &lt;br /&gt; Body &lt;textarea name="Body" rows="5" cols="20" wrap="physical" &gt; &lt;/textarea&gt; &lt;input type="submit" /&gt; &lt;/form&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>And here is the code I have for my tizagEmail.aspx...</p> <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt; &lt;%@ Page Language="C#" 'Sends an email Dim mail Set mail = Server.CreateObject("CDO.Message") mail.To = Request.Form("To") mail.From = Request.Form("From") mail.Subject = Request.Form("Subject") mail.TextBody = Request.Form("Body") mail.Send() Response.Write("Mail Sent!") 'Destroy the mail object! Set mail = nothing %&gt; &lt;html dir="ltr" xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head runat="server"&gt; &lt;meta name="WebPartPageExpansion" content="full" /&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt; &lt;title&gt;Untitled 2&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;form id="form1" runat="server"&gt; &lt;/form&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>If someone could help me I would very much appreciate it. </p> <p>Live long and prosper.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload