Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8262227
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T03:41:45+00:00 2026-06-08T03:41:45+00:00

I have set up a website with a simple register/log in form. What i

  • 0

I have set up a website with a simple register/log in form. What i want is when a user registers in my site, an email with the details of that user to be sent to my email address.

Below is the code that generates some of the text boxes of the “Register” form:

    <asp:TextBox ID="Username" runat="server" CssClass="textEntry"></asp:TextBox>
    <asp:TextBox ID="Address" runat="server" CssClass="textEntry"></asp:TextBox>
    <asp:TextBox ID="Email" runat="server" CssClass="textEntry"></asp:TextBox>

I want the content of these text boxes to be sent to me.

I managed to send emails from my site, using System.Net.Mail.SmtpClient class but i am getting confused with the syntaxt of it because i want the address:

    MailAddress to = new MailAddress("user@domain.com")

to be always the same(mine) but the content of the email to change depending on what every user types in the text boxes.

I am a new to development and i am trying to work this specific issue out for quite some time so any guidance would be of great aid to me.If i am not specific enough, please let me know if you need more information about my issue.

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T03:41:46+00:00Added an answer on June 8, 2026 at 3:41 am

    Try with following code:

    var client = new System.Net.Mail.SmtpClient();
        // Create instance of message
        System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage();
    
        // Add receiver
        message.To.Add("emailaddress");//Here put email address to whom you want to sent the email
    
        // Set sender
        message.From = new System.Net.Mail.MailAddress("user@domain.com");
    
        // Set subject
        message.Subject = "Test";
    
        // Set body of message
        string body = string.Empty;
        body = "Username: " + Username.Text + "<br />Address: " + Address.Text + "<br />Email: " + Email.Text;
        message.Body = body;
    
    
        // Send the message
        client.Send(message);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a website that has a simple login form. the form posts to
So I have a really simple form on a website that's entirely AJAX based
I have a simple website with a master-page. To set properties to elements on
I have set up an AJAX contact form on a client's website. The problem
I have a potential client that set up their website and membership system in
I have an existing php website with a user system already set up (registration,
I have a set of data in a website table that has multiple pages
I have a simple contact page set up with a form and I am
I have an asp.net website that is nearing release. The site deals with business
In IIS 5.1, i have set the website security to Basic Authentications and i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.