473,587 Members | 2,508 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Required Field Validator Does Not Block Postback

Wow, this is a really embarassing thing to have to ask about...

I have an asp.net page with a multiview control in it. We want to enter
person info in a semi - wizard style and I wanted to use required field
validators for, well required fields. On the first view, the person
enters first name, last name and a couple other things. the RFV works
great on first and last name and we move on to the next view -
Addresses. I want to be able to enter multiple addresses so I have an
update button that stores each address entered into a private variable
and clears the form for the next address (yes, it is set to
CauseValidation ). The problem is the update button IS NOT causing
client side validation? WTF???

I thought this may be due to the views but I created a quick test
mockup with a MultiView, two views each with a button, a text field and
a RFV. It works every time.
Field and Validator:
<tr>
<th align="left" nowrap="nowrap" >
Address One:
</th>
<td width="90%" align="left">
<asp:TextBox ID="txtAddressL ineOne" runat="server"
MaxLength="100" Width="250px"></asp:TextBox>&nb sp;
<asp:RequiredFi eldValidator id="rfvAddressL ineOne"
runat="server" ErrorMessage="A ddress 1 is a
Required Field" ControlToValida te="txtAddressL ineOne"
CssClass="Error Message"
EnableClientScr ipt="true">
*Required
</asp:RequiredFie ldValidator>

</td>
</tr>
Button:

<asp:Button ID="btnUpdate" runat="server" Text="Update"
OnClick="btnUpd ate_Click" CausesValidatio n="true"/>

Any ideas?

Dinsdale

Sep 22 '06 #1
0 1992

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

Similar topics

3
2768
by: Rick | last post by:
I have an interesting problem when I run the following code in Netscape (7.02) vs. IE. This page works great in IE and all my controls bring up the validation summary dialog box if the required field is not filled out. However in Netscape NONE of the required field validations occurs at all in Netscape. The form is posting correctly because...
5
2412
by: Do | last post by:
Hi, Has anybody run into problems with Page.IsValid? My errors show up when the fields aren't filled correctly, but my processing continues even if the page is invalid. I leave name and description blank and I do get the error messages. But the code still continues to run the addfolder method from my class. Is there something wrong...
5
319
by: Brent Burkart | last post by:
I have a page with a couple of Required Field Validators. However, I have a button which displays a popup with some information. I want this button to be able to work without having the Required Field Validators fire. I can't figure out how to do that. Is there a better way of validating the info rather than using field validators? Any...
4
16745
by: Milan | last post by:
Hi, I am having a problem with displaying a * to a required field. There seems to be a problem with this and the static value does not appear unless you submit the page. I am trying to display the static text as soon as the page is loaded in the browser. Does anyone know if there is a bug with the aps.net validator controls? Or is this...
2
2344
by: pmud | last post by:
Hi, I have an ASP.Net web page . The page was working fine until I added a required field field validator. My page has a link button which takes the user to another page, a submit button which takes the values of the text boxes & puts them into an SQL database. After adding the required field validator, when I click any button, (be it...
3
2708
by: Kivak Wolf | last post by:
Hi, Could someone give me a quick review of how to use the required field Validator? I'm completely at a loss, and MSDN does not help one bit. =/ Basically all I want done is to make sure that the user enters some text into a field called "txbName" and when they click on the submit button, if they have not entered anything into the field, a...
3
6336
by: tshad | last post by:
Can you use a Required Validator on a CheckBoxList? You can on a RadioButtonList. But when I try on my CheckBoxList I get the error: Control 'RFPServiceTypes' referenced by the ControlToValidate property of 'ServiceTypesCheck' cannot be validated <asp:CheckBoxList id="RFPServiceTypes" CellPadding="0" CellSpacing="0"
1
7331
by: spidur1 | last post by:
For some reason these fields are not being validated before the postback. Here the HTML page. Am I missing something from the validator controls that needs to be set? <table cellpadding="0" cellspacing="0" style="padding-top:0; padding-bottom:0; padding-left:0; padding-right:0;" width="800"> <tr style=" background-color : #5D7B9D;">...
0
1750
by: nimeshdotnet | last post by:
Hi All, I have a textbox whose readonly property is set to true. This textbox is also guarded by a required field validator. What i m doing that I have a calendar control whose on date selection i am filling the this textbox , it works fine when i am in development server. But whenever i moved my code to hosting server the required field...
0
7923
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8216
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8349
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6629
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5719
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5395
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3882
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2364
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1455
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.