Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. how to write feedback form in asp.net v1.1

how to write feedback form in asp.net v1.1

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netbeta-testinghelptutorial
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    aurorae128
    wrote on last edited by
    #1

    Hi I need some help. how do i write an asp.net v1.1 to retriving .aspx feedback form and send the result to my email which is yahoo mail what namespace should i used what background process should i wrote. And reference or sample code, i appreciate so much thank you

    C T 2 Replies Last reply
    0
    • A aurorae128

      Hi I need some help. how do i write an asp.net v1.1 to retriving .aspx feedback form and send the result to my email which is yahoo mail what namespace should i used what background process should i wrote. And reference or sample code, i appreciate so much thank you

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      If you google 'asp.net send email', you will find plenty of code examples.

      Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

      1 Reply Last reply
      0
      • A aurorae128

        Hi I need some help. how do i write an asp.net v1.1 to retriving .aspx feedback form and send the result to my email which is yahoo mail what namespace should i used what background process should i wrote. And reference or sample code, i appreciate so much thank you

        T Offline
        T Offline
        Talal Sultan
        wrote on last edited by
        #3

        Hello, To be able to send email with ASP.NET, you need to use the System.Web.Mail namespace. You would need to have an SMTP server (to send emails) that you can access. To set the SMTP server you want you application to use, you can use SmtpMail.SmtpServer = yourSMTPServerName To set up an email to send, use something like this:

        MailMessage mail = new MailMessage();
        mail.To = toAddress; // your yahoo address
        mail.From = fromAddress; // example: someone@someplace.com;anotherone@someplace.com
        mail.Body = theEmailTextMessageString;
        mail.Subject = theSubjectOfYourMail;

        To send the mail, use SmtpMail.Send(mail) Hope this helps. Talal

        "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." --Rich Cook

        A 1 Reply Last reply
        0
        • T Talal Sultan

          Hello, To be able to send email with ASP.NET, you need to use the System.Web.Mail namespace. You would need to have an SMTP server (to send emails) that you can access. To set the SMTP server you want you application to use, you can use SmtpMail.SmtpServer = yourSMTPServerName To set up an email to send, use something like this:

          MailMessage mail = new MailMessage();
          mail.To = toAddress; // your yahoo address
          mail.From = fromAddress; // example: someone@someplace.com;anotherone@someplace.com
          mail.Body = theEmailTextMessageString;
          mail.Subject = theSubjectOfYourMail;

          To send the mail, use SmtpMail.Send(mail) Hope this helps. Talal

          "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." --Rich Cook

          A Offline
          A Offline
          aurorae128
          wrote on last edited by
          #4

          Thank you for assist me I already try your code. But it seem cannot send the mail. I think i got problems with smtp server. So my next question is how can i used local machine to test my sending email program. And one more thing where should i put these code (for comfirmation) my friend said it have to be in C# and in the other file as "code behind" or form processor is it really true. And can this code works in asp.net v1.1

          computer = oracle

          T 1 Reply Last reply
          0
          • A aurorae128

            Thank you for assist me I already try your code. But it seem cannot send the mail. I think i got problems with smtp server. So my next question is how can i used local machine to test my sending email program. And one more thing where should i put these code (for comfirmation) my friend said it have to be in C# and in the other file as "code behind" or form processor is it really true. And can this code works in asp.net v1.1

            computer = oracle

            T Offline
            T Offline
            Talal Sultan
            wrote on last edited by
            #5

            Hi, yes, it is best to place all the processing code in a code-behind page, which holds a class representing your web form. If you are using Visual Studio 2003 (for framework 1.1), the code-behind page will be added automatically when you create a web form. If your page name is myPage.aspx, the code behind page will be called myPage.aspx.cs. When you add a button on your web form, if you double-click on it, Visual Studio will automatically attach an event delegate to the button event. Something like this this.btnSubmit.Click += new System.EventHandler(this.btnSubmit_Click); will be put in a method that was generated by Visual Studio called InitializeComponent(). btnSubmit_Click represents a method that will be executed when a user clicks on the submit button (called btnSubmit in this case.) The method skeleton code will also be generated for you and will look like this: protected void btnSubmit_Click(object sender, EventArgs e) The code to send the email should be placed in that method, where the information from the form can also be collected to be put in the mail message. You need to do some search online to see some examples of pages in order to better understand the concept. Talal

            "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." --Rich Cook

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups