We're a community of 1076K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,075,527 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Registration Form Asp.net C#

I am trying to make a registration form that when a user enters in their information and clicks the submit button the information will go to someone's email. If someone could send me a website with tutorial on this or lead me in the right direction that would be great!

Thanks!

**I would show you the code I have but it is all edited in my html and it doesn't really relate, but if you need more information let me know.**

3
Contributors
2
Replies
12 Hours
Discussion Span
1 Year Ago
Last Updated
6
Views
compulove
Junior Poster in Training
68 posts since Oct 2011
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

Please see following link:

http://www.codeproject.com/KB/aspnet/ASPNETwebmail.aspx

This is code to send email. You can get form values and make the email body like:

http://idealprogrammer.com/net-languages/code-samples/aspnet-stringbuilder-source-code/

In above link string is append by stringbuilder class, you can append values of all your form's controls e.g. all text boxes etc.

Hope this help.

sufyan2011
Junior Poster
166 posts since Dec 2011
Reputation Points: 9
Solved Threads: 22
Skill Endorsements: 0

After Clicking Submit Button

using System.Net.Mail;

                    string datatosend= " Name : "+textBox1.Text+"\n Age :"+textBox2.Text;

                    SmtpClient c = new SmtpClient();

                    c.DeliveryMethod = SmtpDeliveryMethod.Network;
         
                    c.Host = "localhost";//Or Your SMTP Server's Host IP

                    c.Port = 25;

                    MailAddress from = new MailAddress("your_mail_box@user.com");

                    MailAddress to = new MailAddress("address_given_by_user@user.com");

                    MailMessage mymessage = new MailMessage(from, to);

                    mymessage.Subject = datatosend;
                   
                    c.Send(mymessage);
Pri Bhowmik
Newbie Poster
17 posts since Jan 2012
Reputation Points: 8
Solved Threads: 4
Skill Endorsements: 0

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page rendered in 0.0733 seconds using 2.68MB