473,396 Members | 1,797 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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><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

Apr 27 '06 #1
1 1456
Ben
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

May 24 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Gary Varga | last post by:
In the file WebUIValidation.js, when a postback that doesn't fail the validation has a javascript error saying summary is undefined in the ValidationSummaryOnSubmit function....
3
by: Rob Meade | last post by:
Hi all, I have a login page which has username and password fields, a login button, and 2 validation controls (one for each field) - currently I have controls to display to the summary if the...
14
by: Matt | last post by:
I want to know if ASP.NET Web Forms Validation Controls are Server-Side or Client-Side form validation? Since I think each validator control can select either 1) JavaScript based error dialog or 2)...
2
by: Ely | last post by:
When validating a control client side, is there a way to get the error message to display in the validation summary as soon as the control losses focus? Right now it only displays when the user...
2
by: Martyn Fewtrell | last post by:
Dear All I have a Windows 2003 Server with IIS6 where the validation controls on ASP.Net pages no longer work. I believe it to be specific to the server as if I create an ASP.Net page on the...
2
by: Barbara Alderton | last post by:
I setup some standard Required Field Validation controls and one Custom validation control on an ASP.NET page (within a user control) to validate text entry. I also setup a Summary Control to post...
5
by: TJS | last post by:
I need to add validation to drodownlist control but it sends back an error message that says: "System.Web.UI.WebControls.DropDownList' does not allow child controls" the code is : If...
5
by: Richard Brown | last post by:
Ok, I've been looking through the .NET SDK docs and stuff. I'm wondering if you can provide a control extender that does generic validation or functionality just by dropping it on the form. For...
2
by: ticars | last post by:
I have a telephone number user control in which I need to validate the data entered (Required field validation and regular expression validation). The phone number is represented as 3 text boxes...
10
by: gweasel | last post by:
What is the best way to apply a Validation Rule - or rather, where is the best place to put it? Is there an advantage to putting it on the field in the table vs setting the validation rule on the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.