So lets say that on your ASP.NET form you have something like the following:
<asp:TextBox ID="txtName" runat="server" />
<asp:TextBox ID="txtEmail" runat="server" />
..
<asp:Button runat="server" ID="btnSendFeedback" OnClick="btnClick" Text="Send Feedback"/>
Then in the code-behind, handle the feedback button click:
protected void btnClick(object sender, EventArgs e)
{
MailMessage message = new MailMessage();
message.From = new MailAddress(txtEmail.Text);
// this should be replaced with your address
message.To.Add(new MailAddress("youremailaddress@foo.bar.com"));
message.Subject = "feedback";
// this is the email content, eg comments, profession, country, etc
message.Body = "Name: " + txtName.Text; // add more fields...
// finaly send the email:
SmtpClient client = new SmtpClient();
client.Send(message);
}
Also make sure you set up the web.config, like so (or something similar)
<system.net>
<mailSettings>
<smtp from="test@foo.com">
<network host="yousmtpserver" port="25" userName="username" password="password" defaultCredentials="true" />
</smtp>
</mailSettings>
</system.net>
For more info, have a look at this: