locked
Hidden e-mail address RRS feed

  • Question

  • Earlier today I filled out a form to a sales organization on an aspx page. I decided I'd rather write them an email than fill out the form, so I looked in the code to find the e-mail address where the form was going.

    It wasn't on the page.  I searched for @ e-mail value .  Nothing to indicate an e-mail address. 

    On my pages that use a form the e-mail address is right out in the open. 
        <!-- Set your recipient info here -->
       <asp:HiddenField id="tbTo" runat="server" Value="steve@ayndomain.com">
       </asp:HiddenField>

    Any idea how they hide the address.  No (jimco) java script I could find.  I tried %40 for the @ sign, the form didn't work.  

    Thanks
     
    Tuesday, July 28, 2009 5:38 PM

Answers

All replies

  • The form handling code was probably in a code-behind file, so you wouldn't be able to see it, or in a script block on the page, again you wouldn't be able to see this.

    How are you sending the mail from your page? Can you give us a link?



    Ian
    MS MVP Expression

    http://www.ew-resource.co.uk
    http://www.fp-resource.co.uk
    http://www.ew-resource.co.uk/v3  First Impressions of EW V3


    Ian Haynes
    Tuesday, July 28, 2009 5:43 PM
  • Easy.  They keep the email in the processing page which only gets processed on the server.  There is never a need to expose an email address in a form-to-email script.
    --
    Chris Hanscom - Microsoft MVP
    On Facebook | On Twitter | Resource Center | Veign's Blog | Web Development Help

    Get a Complete Website Analysis by Veign
    • Proposed as answer by Veign Tuesday, July 28, 2009 5:44 PM
    • Marked as answer by Lori DirksModerator Tuesday, July 28, 2009 7:02 PM
    Tuesday, July 28, 2009 5:44 PM
  • The page with the address with the e-mail is on a test bed, it's not yet live.

    http://raginggator.mysite4now.net/level2/membership/membership.aspx

    The one that had no address is:

    https://www.bissell.com/Send_Us_An_Email.aspx

    I've heard of code behind but don't know much about it.  I've produced some decent sites but much of the work has been hit or miss so I have about zero code writting ability. 
    Thursday, July 30, 2009 7:06 PM
  • If you're doing ASP.NET you should have knowledge of the code.  Might want to look around Google for beginner ASp.NET tutorials that teach the basics of the foundation of an ASP.NET website and code.  Having that understanding will make it much easier for you.  Sorry I have no sources for ASP.NET tutorials but I mainly do PHP.

    --
    Chris Hanscom - Microsoft MVP
    On Facebook | On Twitter | Resource Center | Veign's Blog | Web Development Help

    Get a Complete Website Analysis by Veign
    Thursday, July 30, 2009 7:13 PM
  • You have no form processing with the page at all as far as I can see. The following 'Contact Form Generator' may help. Run through the set up steps and let it generate the code for you. You should then be able to adapt it for your page.

    http://www.ctrfx.com/form/default.aspx


    Ian
    MS MVP Expression

    http://www.ew-resource.co.uk
    http://www.fp-resource.co.uk
    http://www.ew-resource.co.uk/v3  First Impressions of EW V3


    Ian Haynes
    Thursday, July 30, 2009 7:20 PM
  • The page with the address with the e-mail is on a test bed, it's not yet live.

    http://raginggator.mysite4now.net/level2/membership/membership.aspx

    The one that had no address is:

    https://www.bissell.com/Send_Us_An_Email.aspx

    I've heard of code behind but don't know much about it.  I've produced some decent sites but much of the work has been hit or miss so I have about zero code writting ability. 
    What Chris is trying to get across is that what is defined and executed in code will not be rendered out to the browser. The server-side code executes, creates the HTML necessary to render the display correctly, and sends that HTML to the browser. The browser itself doesn't grok server-side code, and it never receives it, so any values defined in the script, such as the submission email address, will never appear in the browser source code unless the script deliberately writes it out as HTML and sends it down. There is no reason to do this, and a number of reasons not to.

    BTW, this is true whether you're speaking of PHP or ASP.NET. If you want an illustration of this, look at your own membership page referenced above. View it in a browser, then do a view source on the rendered markup. Compare that to the source you see in EW. Notice anything? Zero ASP.NET code. The only way you know that there was any in the page is the extension and the fact that validating ASP.NET controls automatically create both server-side and client-side validation, so you can see the control names in the client-side validation javascript.

    Get it now?

    cheers,
    scott
    Thursday, July 30, 2009 7:34 PM
  • If you want to use asp.net and code-behind to send form-submitted emails, so that the email address is not accessible to robots, you should:

    1. Use VWD Express to work with the code-behind.

    2. Look at Jim Cheshires tutorail where he explains how to do it, and also provides the necessary code:

     http://www.jimcobooks.com/Tutorials/default.aspx
    ClarkNK, A.K.A. HomePage Doctor
    HomePageDoctor.com -- Expression Web database tutorials
    Ownertrades.com -- Created with FP, Access, Bots and Wizards
    MyNumbersTracker.com -- Created with Expression, VWDExress, SQL Express, and ASP.NET.
    • Marked as answer by DaytonaSteve Saturday, August 1, 2009 2:57 PM
    Thursday, July 30, 2009 7:52 PM
  • wow, lots of good info. 

    I have scott mitchells excellent book aspnet 2.0 24 hours and have used the VWD and the mssql that came with it.

    Ian..I will look at Jim's information. As far as  form processing, I promise it works just fine and delivers a confirmation page when the form is filled out.  I also have several forms feeding databases, they work fine as well.  It's just that e-mail address that bothers me.

    I've seen that there's no asp.net in view source and assumed that it jsut wrote the code that eventually ended up as HTML but thanks for the explaination. 

    All of this has given me some resource to figure thsi out. Thanks again.


    Added August 1...Its fixed.  I looked at Jim's code and found the answer.  Thanks again
    • Edited by DaytonaSteve Saturday, August 1, 2009 2:58 PM New Information
    Friday, July 31, 2009 8:54 PM