PDA

View Full Version : Send Form Values using Advanced Intellect aspNetEm


bruce
03-10-2004, 02:13 AM
This code uses ASP Mail class. If you want to use aspnet email, you'll have to change the email part of the code

<%@ Page Language="VB" %>
<script runat="server">



Sub Button1_Click(sender As Object, e As EventArgs)


Dim strBody as string

strBody = "Field 1 :" & textbox1.text

Dim mailMessage As System.Web.Mail.MailMessage = New System.Web.Mail.MailMessage
mailMessage.From = "someone@example.com"
mailMessage.To = "someone@example.com"
mailMessage.Subject = "Subject"
mailMessage.BodyFormat = System.Web.Mail.MailFormat.Text
mailMessage.body = strBody


System.Web.Mail.SmtpMail.SmtpServer = "localhost"
System.Web.Mail.SmtpMail.Send(mailMessage)

End Sub

</script>
<html>
<head>
</head>
[b]
<form runat="server">
<p>
Field 1 :
<asp:TextBox id="TextBox1" runat="server"></asp:TextBox>
</p>
<p>
<asp:Button id="Button1" onclick="Button1_Click" runat="server" Text="Button"></asp:Button>
</p>

</form>
</body>
</html>

[b]quote:Originally posted by 27lamps

Hello,

i have an ASP.net page with a form which includes 4 text fields and a button. Can anyone help me out in send this form values using the Advanced Intellect aspNetEmail available in discountAsp.net?

Give me some explanation and/or send me some code, please.

Thank You,
Miguel
</blockquote id="quote"></font id="quote">

27lamps
03-10-2004, 08:53 AM
Hello,

i have an ASP.net page with a form which includes 4 text fields and a button. Can anyone help me out in send this form values using the Advanced Intellect aspNetEmail available in discountAsp.net?

Give me some explanation and/or send me some code, please.

Thank You,
Miguel