validation control error message

Discussion in 'ASP .Net' started by TARUN, Apr 27, 2006.

  1. TARUN

    TARUN Guest

    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><asp:regularexpressionvalidator
    id="Reg_Val" Runat="server" Display="Dynamic" CssClass="stdFont"
    ControlToValidate="EnterName"
    ErrorMessage="Invalid ID"
    ValidationExpression="^[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:regularexpressionvalidator>


    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
     
    TARUN, Apr 27, 2006
    #1
    1. Advertising

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

    Ben

    "TARUN" wrote:

    > 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><asp:regularexpressionvalidator
    > id="Reg_Val" Runat="server" Display="Dynamic" CssClass="stdFont"
    > ControlToValidate="EnterName"
    > ErrorMessage="Invalid ID"
    > ValidationExpression="^[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:regularexpressionvalidator>
    >
    >
    > 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
    >
    >
     
    =?Utf-8?B?QmVu?=, May 24, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Colin Mackay
    Replies:
    0
    Views:
    2,697
    Colin Mackay
    Jun 25, 2003
  2. Lucas Tam
    Replies:
    2
    Views:
    1,120
    Lucas Tam
    Feb 26, 2004
  3. Helen
    Replies:
    5
    Views:
    1,014
    Helen
    Sep 9, 2004
  4. =?Utf-8?B?QmFyYmFyYSBBbGRlcnRvbg==?=

    Using Summary Validation control with server Custom validation

    =?Utf-8?B?QmFyYmFyYSBBbGRlcnRvbg==?=, Oct 15, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    885
    =?Utf-8?B?QmFyYmFyYSBBbGRlcnRvbg==?=
    Oct 15, 2004
  5. tshad
    Replies:
    0
    Views:
    802
    tshad
    Jan 27, 2005
Loading...

Share This Page