Control the position of a CustomValidator

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mr. X.

    #1

    Control the position of a CustomValidator

    Hello.

    How can I control the position of customValidator .

    I have code like this (ASP.NET)
    <asp:CustomVali dator dir = "rtl" CHARSET=WINDOWS-1255"
    id = "email_err"
    ControlToValida te="a_email"
    OnServerValidat e="checkEmail "
    Text="..."
    ErrorMessage=". .."
    runat="server" />

    in CSS I have declared :

    #email_err
    {
    position: absolute;
    top:290px;
    left:230px;
    width:220px;
    visibility:visi ble;
    font-size:16pt;
    font-weight:bold;
    color:red;
    }

    But, I see that the customValidator 's position is not at the position of
    CSS.

    I want a sample for that, please.

    Thanks :)


  • Norm

    #2
    Re: Control the position of a CustomValidator

    On Sep 22, 2:58 pm, "Mr. X." <no_spam_please @nospam_please. comwrote:
    Hello.
    >
    How can I control the position of customValidator .
    >
    I have code like this (ASP.NET)
    <asp:CustomVali dator dir = "rtl" CHARSET=WINDOWS-1255"
      id = "email_err"
      ControlToValida te="a_email"
      OnServerValidat e="checkEmail "
      Text="..."
      ErrorMessage=". .."
    runat="server" />
    >
    in CSS I have declared :
    >
    #email_err
    {
      position: absolute;
      top:290px;
      left:230px;
      width:220px;
      visibility:visi ble;
      font-size:16pt;
      font-weight:bold;
      color:red;
    >
    }
    >
    But, I see that the customValidator 's position is not at the position of
    CSS.
    >
    I want a sample for that, please.
    >
    Thanks :)
    The client id of the custom validator is most likely not "email_err" .
    The ids of server controls are determined not only by their id, but by
    all of their parent's ids. "View Source" on your page to see the
    actual id. However, a better solution is to just use a css class
    instead of id. Try this:

    I have code like this (ASP.NET)
    <asp:CustomVali dator dir = "rtl" CHARSET=WINDOWS-1255"
    id = "email_err"
    ControlToValida te="a_email"
    OnServerValidat e="checkEmail "
    Text="..."
    ErrorMessage=". .."
    CssClass="email _err"
    runat="server" />

    in CSS I have declared :

    ..email_err
    {
    position: absolute;
    top:290px;
    left:230px;
    width:220px;
    visibility:visi ble;
    font-size:16pt;
    font-weight:bold;
    color:red;

    }

    Comment

    • Mr. X.

      #3
      Re: Control the position of a CustomValidator

      Thank you very much.

      :o)


      Comment

      Working...