validation control error message

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

    #1

    validation control error message

    Hello All

    I am Stuck in a silly Problem, as I don't have much experience in Web
    Technology, so Please Excuse me for raising such a questions.

    I am creating a logging Page, I used Regular Expression Validation. As
    below



    <asp:textbox id="EnterName"
    Runat="server"> </asp:textbox><as p:regularexpres sionvalidator
    id="Reg_Val" Runat="server" Display="Dynami c" CssClass="stdFo nt"
    ControlToValida te="EnterName"
    ErrorMessage="I nvalid ID"
    ValidationExpre ssion="^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$"></asp:regularexpr essionvalidator >


    But when the Error Message "Invalid Id" is display on Form it
    disturbed the layout and alignment of the text box, label etc.

    What code should I write for displaying the Error Message "Invalid
    Id" without disturbing the alignment of text box, lebel etc..

    I am using ASP.Net with VB.NET

    Thanking You
    Tarun Sinha

  • Ben

    #2
    RE: validation control error message

    Don't know exactly for sure, but try Display="static " rather than dynamic in
    the validator.

    Ben

    "TARUN" wrote:
    [color=blue]
    > Hello All
    >
    > I am Stuck in a silly Problem, as I don't have much experience in Web
    > Technology, so Please Excuse me for raising such a questions.
    >
    > I am creating a logging Page, I used Regular Expression Validation. As
    > below
    >
    >
    >
    > <asp:textbox id="EnterName"
    > Runat="server"> </asp:textbox><as p:regularexpres sionvalidator
    > id="Reg_Val" Runat="server" Display="Dynami c" CssClass="stdFo nt"
    > ControlToValida te="EnterName"
    > ErrorMessage="I nvalid ID"
    > ValidationExpre ssion="^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$"></asp:regularexpr essionvalidator >
    >
    >
    > But when the Error Message "Invalid Id" is display on Form it
    > disturbed the layout and alignment of the text box, label etc.
    >
    > What code should I write for displaying the Error Message "Invalid
    > Id" without disturbing the alignment of text box, lebel etc..
    >
    > I am using ASP.Net with VB.NET
    >
    > Thanking You
    > Tarun Sinha
    >
    >[/color]

    Comment

    Working...