Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • psiho 101 posts 96 karma points
    Jul 30, 2009 @ 15:11
    psiho
    0

    control not geting postback values

    Hi,

    I'm trying to help my developer write for me a control that I need (not a developer myself). It is a control to be used on contact forms. In any form created in template or with RTE you insert this macro between FORM tags and control does the rest and that is:

    - if not PostBack - injects few more hidden fields to use for some antispam techniques
    - if PostBack, checks if form is spam using several techniques,
         ...then posts results (all posted fields with their values) to chosen email adress

    ... so basicaly this is form2mail with antispam control.

    I told you all this maybe only to motivate you top help me... everything works on test server (not Umbraco), but when I create macro from this control and implement it - control isn't getting any posted values! My developer says he is using "IsPostBack" and that it works on test but he doesn't (want to?) know anything about Umbraco and why control isn't getting any postback in that environment.

    Can you help me with some example or anything?

  • Thomas Höhler 1237 posts 1709 karma points MVP
    Jul 30, 2009 @ 15:37
    Thomas Höhler
    0

    Check if you are having more than one form tag with runat server integrated. That was a problem for me.

    hth, Thomas

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Jul 30, 2009 @ 15:42
    Richard Soeteman
    0

    Hi,

    Umbraco doesn't change this behaviour, so it must be something else in the control. I think the best way is to convince the developer to attach a debugger and step through all the code lines.

    Cheers,

    Richard

  • psiho 101 posts 96 karma points
    Jul 30, 2009 @ 15:50
    psiho
    0

    Thank you!!! Problem was not exactly what you suggested... it was not 2 FORM tags with runat server but ZERO :) I forgot runat server attribute. Now it works ok. If anybody is interested, after some polishing and testing we might package it and publish it.

  • psiho 101 posts 96 karma points
    Jul 31, 2009 @ 15:04
    psiho
    0

    Ups, one problem stil remains. This works only if I create my form in template, and use <form runat="server">, but if I try to create my form inside some content using same syntax, it does not work. TinyMCE is not a problem, I've configured it to allow those tags, it saves them ok. When I view source of my outputted page with a form, on templated version don't see runat="server" and it works ok, but on content version I can see it in outputed HTML (runat=server) and it does not work.

    It seems like form from content is not parsed by server or something. Any ideas how to make content version work too? I would like to avoid having to make template if possible

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Jul 31, 2009 @ 15:39
    Richard Soeteman
    0

    Hi,

    You Can't include the Form tag in the content  of TinyMCE indeed. It must be in the template, otherwise asp.net will not parse that.

    Cheers,

    Richard

Please Sign in or register to post replies

Write your reply to:

Draft