Basic ASP Form Please

Discussion in 'C#' started by TwisterMc, Apr 12, 2005.

  1. #1
    I know PHP but not ASP and now I need to make a contact form and I'm not sure exactly how. I've googled it and all the sites seem to make it look so complex. Is it that complicated? Or does someone know where I can find an easy script or tutorial?
     
    TwisterMc, Apr 12, 2005 IP
  2. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Do you have a COM object that can send over SMTP? If not, check this one out:

    http://www.aspemail.com/manual_02.html

    There are other object available, similar to this one.

    J.D.
     
    J.D., Apr 12, 2005 IP
  3. TwisterMc

    TwisterMc Mac Guru

    Messages:
    972
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Umm COM? I have no idea, but thanks for the link.
     
    TwisterMc, Apr 12, 2005 IP
  4. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #4
    It's something you create with a statement like this:

    <% mailer = Server.CreateObject("Company.Object") %>

    When you install whatever object you choose to use (check with your hosting company, may be they offer something), you will create this object this way and the rest will be similar to what you'd do in any other environment.

    J.D.
     
    J.D., Apr 12, 2005 IP
  5. TwisterMc

    TwisterMc Mac Guru

    Messages:
    972
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Ok, i think you've lost me.
     
    TwisterMc, Apr 13, 2005 IP
  6. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #6
    I was trying to explain what is a COM object. Never mind. Scroll down the page I quoted and you will see an example (yellow-colored). Aside from being full of security holes, this example shows how to use an ASP mailer. Obviously, you need only the part that is within <%%> (just make sure you check the input before using it). The actual HTML will be no different from what you used with your PHP contact form.

    J.D.
     
    J.D., Apr 13, 2005 IP
  7. TwisterMc

    TwisterMc Mac Guru

    Messages:
    972
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Great, thanks. :)
     
    TwisterMc, Apr 13, 2005 IP
  8. paulhiles

    paulhiles Guest

    Messages:
    18
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #8
    There's a well documented ASP FormMail script on brainjar.com, if you're new to ASP it may help to have a step by step tutorial! ;)

    Paul
     
    paulhiles, Apr 15, 2005 IP
    minstrel likes this.
  9. mopacfan

    mopacfan Peon

    Messages:
    3,273
    Likes Received:
    164
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Send me a pm and let me know what you need to do. I can write one for you pretty easily.
     
    mopacfan, Apr 15, 2005 IP
  10. TwisterMc

    TwisterMc Mac Guru

    Messages:
    972
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Thanks for the link and thanks for the offer mopacfan. I'll keep you in mind if i have issues.
     
    TwisterMc, Apr 15, 2005 IP
  11. lovethecoast

    lovethecoast Peon

    Messages:
    33
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #11
    If all you want is a simple form, I think things have gotten overly complicated here.

    Create the form in html as you normally would. Put it in a .htm page if that's easiest for you and for the form action, reference your asp page.

    On the asp page, if you're using POST method, use Request.Form("firstName") where firstName is the element of your form. What happens next depends on what you want to do with the data in the form. Do you want to put it in a database or email it to yourself (or both).
     
    lovethecoast, Apr 30, 2005 IP
  12. TwisterMc

    TwisterMc Mac Guru

    Messages:
    972
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #12
    Here is an example. Thanks for the help by the way. :)

    1) fill in form: firstName lastName radioButton1 radioButton2
    2) hit submit and email it to me
    3) if radioButton1 is checked show linka
    4) if radioButton2 is checked show linkb

    How's that sound? Simple I hope.
     
    TwisterMc, May 2, 2005 IP