Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 5 of 5

Thread: CAPTCHA on Contact Form

  1. #1
    ssgumby is offline Senior Member
    Join Date
    Feb 2009
    Posts
    683

    Default CAPTCHA on Contact Form

    We just went live over the weekend. Since we went live we are being slammed with emails from the t-contact.aspx ... Is there a way to turn CAPTCHA on for that form? I looked in the manual and it seems you can turn it on for other places (login, account creation) but not for contact form. Seems the contact form would be the critical spot to have it.

    Thanks

  2. #2
    kdalal is offline Member
    Join Date
    Aug 2009
    Location
    USA
    Posts
    50

    Default

    Put one image and give it a name like SecurityImage1 on your contactus form.

    Then put this code --


    SecurityImage1.Visible = true;
    SecurityCode.Visible = true;
    // RequiredFieldValidator4.Enabled = true;

    SecurityImage1.ImageUrl = "Captcha.ashx?id=1";

    And then on button click check for it.

    if (Session["SecurityCode"] != null)
    {
    String sCode = Session["SecurityCode"].ToString();
    string fcode = SecurityCode.Text;
    if (sCode == fcode)
    {

    // do what ever you want to do


    }
    else
    {
    Response.Redirect("contact.aspx");
    }
    }

  3. #3
    ssgumby is offline Senior Member
    Join Date
    Feb 2009
    Posts
    683

    Default

    Thanks kdalal

    So I assume this means I would need to create an entire new .aspx file, change all my contact us links to point to that as opposed to just having it work in the current contact topic?

    Just odd this isnt built in by default.

  4. #4
    kdalal is offline Member
    Join Date
    Aug 2009
    Location
    USA
    Posts
    50

    Default

    No just take all your code from t-contactus and paste in new contactus.aspx.

    Inherit from skinbase class.

  5. #5
    Jao is offline Senior Member
    Join Date
    Oct 2008
    Posts
    1,132

    Default

    This link could extend a helping hand: Contact Us Page