Try Now
More in this section

Forums / Deployment / asp validation

asp validation

3 posts, 0 answered
  1. Kresimir
    Kresimir avatar
    7 posts
    13 Oct 2008
    16 Oct 2008
    Link to this post

    i made contact form control which is integrated under sitefinity modules and dragable to content holders from admin page.

    only, when i am using it trougth sitefinity, validation dont work at all while when i am testing that control on some blank test page outside sitefinity proiject, it works like it should work..

    any sugestions?

    master header
    <%@ Master Language="C#" %> 
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="hr"
    <head runat="server"
        <title>Generated Title</title> 
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />     

    contact form ascx validation
    <asp:TextBox runat="server" ID="TextBoxEmail" ValidationGroup="email" /> <b>*</b> 
                <asp:RequiredFieldValidator ID="emailEmptyValidator1" runat="server" 
                    ValidationGroup="email" ControlToValidate="TextBoxEmail" Display="Dynamic" 
                    EnableViewState="False" SetFocusOnError="True"
                    <strong><asp:Literal ID="Literal2" runat="server" Text="Polje Email mora biti popunjeno!"/></strong> 
                <asp:RegularExpressionValidator ID="emailREValidator1" runat="server" 
                    ControlToValidate="TextBoxEmail" Display="Dynamic" EnableViewState="false" SetFocusOnError="true" 
                    ValidationExpression="\s*\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*\s*" ValidationGroup="email"
                    <strong><asp:Literal ID="literal3" runat="server" Text="Neispravna Email adresa!"/></strong> 

    thanks in advance
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    19 Oct 2016
    17 Oct 2008
    Link to this post
    Hello Kresimir,

    I tested your code under Sitefinity project. It seems that the validation works. Please find the attached screenshot prepared for your convenience.

    Let us know what the problem is at your end.

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. Kresimir
    Kresimir avatar
    7 posts
    13 Oct 2008
    17 Oct 2008
    Link to this post
    Thanks Ivan..

    I didnt had time to resolve that problem so i resolve it with workaround solution (handled validation in cs file)..

    Probably is problem in master page because if i tried that custom control in blank aspx, it was working ok..

    Thanks on your time

Register for webinar
3 posts, 0 answered