Copied to clipboard

Flag this post as spam?

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


  • Umbraco-dev 7 posts 27 karma points
    Nov 21, 2013 @ 08:26
    Umbraco-dev
    0

    .net Validation Controls not working in Umbraco

    I am using two forms in umbraco, 1 form control(Validation+everything) is working fine..

    But the other one with same coding is not working..

    Please tell me the solution.

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Nov 21, 2013 @ 08:41
    Richard Soeteman
    0

    You can only have one form with runat=server tag that is handled by asp.net so this is by behavior of asp.net add all logic within one form and all should be good.

    Use the ValidationGroup property to specify different valdidation for different buttons.

    Cheers,

    Richard

  • Umbraco-dev 7 posts 27 karma points
    Nov 21, 2013 @ 08:55
    Umbraco-dev
    0

    I have 2 pages..

    1st is Home Page with this Macro

    <form id="form" runat="server">

    <h2><umbraco:Item field="contact-UsHeading" runat="server" /></h2>

    <umbraco:Macro Alias="ContactUs" runat="server"></umbraco:Macro>

    </form>

    2nd is Demo Page with this macro

    <form id="form2" runat="server">

    <umbraco:Macro Alias="Demo" runat="server"></umbraco:Macro>

     

    </form>

     

    And i have applied Validation group to 2nd "Demo Page controls".. But still its not working.. Working fine when i execute it in asp.net.. but when i add the same control in umbraco..it creates issue..

  • Umbraco-dev 7 posts 27 karma points
    Nov 21, 2013 @ 08:57
    Umbraco-dev
    0

    I have the same issue as posted in

    http://our.umbraco.org/forum/developers/api-questions/23917-Validation-groups-with-net-control-forms?p=0#comment166073

    but by changing button ID's, its not working for me

  • Umbraco-dev 7 posts 27 karma points
    Nov 21, 2013 @ 09:01
    Umbraco-dev
    0

    Please help me out..its URGENT..

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Nov 21, 2013 @ 09:13
    Richard Soeteman
    0

    There is something wrong in your forms either an id, a multiple form on your page or a form in the macro is causing this. It's default behaviour of asp.net webforms. Maybe if you post all markup of the second not working form and all macro's someone can see the issue. Other than that it's best to check yourself in Visual studio.

    Hope this helps,

    Richard

Please Sign in or register to post replies

Write your reply to:

Draft