validation control error message

T

TARUN

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
 
G

Guest

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

Ben
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top