473,396 Members | 2,036 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.

Question about RequiredFieldValidator

pc
I've created a simple form with a submit button and a textfield. I
assigned a RequiredFieldValidator to the textfield and set
EnabledClientScript to ture. I noticed the validator did not display
the error message if the textfield was empty. It seems to me that the
client side validation script did not executed. After I pressed the
submit button, the validator displayed the error message. I tried
entering and clearing the textfield without pressing the submit button
and everything worked as described in the documentation. So my
question is why isn't the client side validation work the first time
(before pressing the submit button)? Is this by desgin?
Nov 17 '05 #1
2 1879
Is it possible that the validator is detecting the browser as "downlevel" and
therefore not emitting the client-side script? If the browser version isn't
known to ASP.NET you may have problems like this.

Is there any evidence of the client-side script when you view the source of a
rendered page?

Ken
"pc" <pe***********@yahoo.com> wrote in message
news:1e*************************@posting.google.co m...
I've created a simple form with a submit button and a textfield. I
assigned a RequiredFieldValidator to the textfield and set
EnabledClientScript to ture. I noticed the validator did not display
the error message if the textfield was empty. It seems to me that the
client side validation script did not executed. After I pressed the
submit button, the validator displayed the error message. I tried
entering and clearing the textfield without pressing the submit button
and everything worked as described in the documentation. So my
question is why isn't the client side validation work the first time
(before pressing the submit button)? Is this by desgin?
Nov 17 '05 #2
I'm using IE 6. I don't think it has anything to do with the browser. Client
side validation work correctly after I pressed the submit button.

"Ken Cox [Microsoft MVP]" <BA************@sympatico.ca> wrote in message
news:eC**************@TK2MSFTNGP10.phx.gbl...
Is it possible that the validator is detecting the browser as "downlevel" and therefore not emitting the client-side script? If the browser version isn't known to ASP.NET you may have problems like this.

Is there any evidence of the client-side script when you view the source of a rendered page?

Ken
"pc" <pe***********@yahoo.com> wrote in message
news:1e*************************@posting.google.co m...
I've created a simple form with a submit button and a textfield. I
assigned a RequiredFieldValidator to the textfield and set
EnabledClientScript to ture. I noticed the validator did not display
the error message if the textfield was empty. It seems to me that the
client side validation script did not executed. After I pressed the
submit button, the validator displayed the error message. I tried
entering and clearing the textfield without pressing the submit button
and everything worked as described in the documentation. So my
question is why isn't the client side validation work the first time
(before pressing the submit button)? Is this by desgin?

Nov 17 '05 #3

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

Similar topics

2
by: Angelos Karantzalis | last post by:
Hi guys, I'm trying to load a class instance dynamically, and then cast it to it's base type so I can use it in my app. More specifically, I'm dynamically instantiating a...
6
by: BK | last post by:
I'm having a really strange problem with and HtmlSelect server control (listbox) and a RequiredFieldValidator that I am trying to use to make sure that someone has items in the listbox. The way...
0
by: Nicolas | last post by:
How can I have only one RequiredFieldValidator to control two TextBox webcontrols so that only one message is displayed <asp:Label id="lbl_UserName" runat="server"></asp:Label><br> <asp:TextBox...
3
by: me | last post by:
Is there any particular reason why a requiredfieldvalidator cant validate a listbox? I have bound the two together but the validator always returns false on isvalid and so does the Page, no matter...
4
by: James | last post by:
Hello, I have a RequiredFieldValidator for several textbox controls on a form. Here's an example with the RequiredFieldValidator. EnableClientScript, Enabled, and Visible are set to true for...
4
by: Joe | last post by:
Hello, I have created a login page using dotnet. I am using requiredFieldValidator and noticed that the code works fine in IE but not in Netscape, Opera, Mozilla, Firefox, etc. For example...
5
by: Fernando Lopes | last post by:
Hi. I want to show an image in a requiredfield validator instead of "*". So, I 'm set the requiredfieldvalidator attributes like following: <asp:RequiredFieldValidator id=rfvFirstName...
13
by: Larry O via DotNetMonster.com | last post by:
Hi - I'm a newbie to .NET and I was hoping someone would be so kind as to help me out with a question? Specifiec in my .aspx file: <input type="file" size="50" id="FileToSend" runat="server"...
2
by: Christina | last post by:
Hello !! I am creating a dynamic textbox and want to validate it using the requiredfieldvalidator. These are the steps which I tried: ==================================================== 1)...
2
by: Ken Fine | last post by:
I want to add the security question and answer security feature to the ChangePassword control. I am aware that this functionality is built into the PasswordRecovery tool. I have implemented 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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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.