Web Forms :: Either This Group Of Fields Or That Field Is Required?

Mar 28, 2010

I'm trying to write a form for a user to leave a testimonial on the website. I would like a group of inputs related to the users name (title, firstname and surname) or an input for their company name to be required. They can leave both if they like, but they must at least either fill in all the inputs related to their name or the input for their company name.can I do this with the RequiredFieldValidator?

View 3 Replies


Similar Messages:

Web Forms :: Required Field Validation For A Checkbox Group?

Mar 29, 2011

I have three asp checkbox controls and button click. If any of those three checkboxes is not selected it shoudld validate . How can i accomplish this?

View 3 Replies

Web Forms :: Required Field Validator & Validation Group?

Feb 12, 2010

I have a web forms where i have 10 required field validators for 10 textboxes. Validation group for these required field validator needs to be determined when the page loads. I tried to change the validator in the .cs file but failed.

rfvBT.ValidationGroup = "registration";

View 3 Replies

Web Forms :: Set Required Field Validator For Radio Button Based On Group Names?

Aug 1, 2012

how to set required field validator for radio button based on the  group names

View 1 Replies

Forms Data Controls :: A Required Input Field DropDownList If Old Records Have Null In This Field?

Apr 1, 2011

I have a DetailsView on the page and I have made one of the fields a TemplateField. In the EditItemTemplate and InsertItemTemplate I have a DropdownList that is databound to a table in my Sql Server database. I wanted to add an initial value to the DropdownList
namely "- select -" .

I set the AppendDataBoundItems property to true and added the initial value as a ListItem.Markup of the DropdownList

<asp:DropDownList ID="DropDownList_HP" runat="server"

AppendDataBoundItems="True" DataSourceID="SqlDataSource_HP" [code]...

This works fine for new input. The problem is however that the database already has records that were entered through a Windows Application and many of these records has a null value in this field and exceptions are thrown when I tried to open these records
and the system tried to set the SelectedValue of the DropdownList.After some more searching I found this help

http://msdn.microsoft.com/en-us/library/ms366709.aspx

So I changed the ListItem in the DropDownList markup to the following:

<asp:DropDownList ID="DropDownList_RefHospDV4" runat="server"

AppendDataBoundItems="True" DataSourceID="SqlDataSource_RefHosp" [code]...

This now solved the problem of opening a record where the value is null in the database, BUT now the RequiredFieldValidator is not validating anymore to make sure that a databound item is selected for this field and not the initial value "- select -". So basically now it is not checking anymore to see if valid input has been entered for the DropDownList and it accepts "- select -" thus it acts as if the field is not a required field anymore.

In short what is required is that I want to make sure that the user enters a valid selection in the DropDownList, but it must also cater for old records that do not have this field entered yet so that those old records can be opened in the DetailsView .Opening Old records (with null in that field):When these old records are opened in the DetailsView the DropDownlist should show "- select -" when the value in the database is null.

Saving records (old or new records):When saving the record in Insert mode or Update mode the RequiredFieldValidator should show that a valid input is not selected if the DropDownList is still on "- select -".

View 1 Replies

Web Forms :: Required Field Validator Not Catching Empty Field?

Feb 3, 2010

I have a aspx page with a ascx control inside an ascx control and the required field validator is not hit on the action of the page.

The issue is with the 2nd nested ascx control. The field validators in the first ascx control validate correctly, but with the ascx control inside the ascx control there are issues.

The nested ascx control is a repeater control and this may be the reason, but I am unsure.

I'm not exactly sure what question to ask, but I'll list a few below.

How do I attach the field validators up a level to the 1st ascx control?

Is it possible to put required fields into a nested ascx control?

View 7 Replies

Web Forms :: Group Data Fields Into Single Value

Jun 19, 2012

Is it possible to group the values of different textboxes to a string....

View 1 Replies

SQL Server :: Combining Two Fields With A Group?

Oct 19, 2010

[Code]....

which is giving me

And i tried

select * from @jax

group by rep

and it did not group them. How would i bring the sum ly up with the sum? so it shows 1-10 cust,sum,sumly

View 1 Replies

Web Forms :: Required Field Validator Not Firing?

Jul 28, 2010

Page validation using Required field validator is not firing I configured everything and tested in other page and found its working fine.

I placed my controls under TabContainer is that the reason for not firing.

View 8 Replies

Web Forms :: Required Field Validators Not Working?

Jun 24, 2010

I have a contact page with fields like E-mail Address, Name, Subject, and Message. I use a RequiredFieldValidator on each text box. They work fine when I test it with the Visual Studio built-in development server, but on IIS7, they don't work and they allow the Send button's click event to be fired.

View 6 Replies

Web Forms :: How To Set Required Field Validators To Calendar

Dec 14, 2010

im currently doing a web application.

user are allow to insert some events.

but if user didnt insert any fields, error message should pop out.

but for my calendar view, if user didnt select any, it still can pass through but data is not stored.

so how do i set required field validators to calendar?

View 12 Replies

Web Forms :: From And To Date.Both Are Using Required Field Validators?

Feb 5, 2010

I have 2 date fields - From and To Date.Both are using required field validators, regular expression validtors and compare validators. When the user enters an invalid date range, e.g. 02-29-2010 to 02-29-2010 (non-leap year), the comparevalidator throws an 'from cannot be greater than to date range' error.Why am I seeing this error when From is not > To.Here's the code snippet

[Code]....

View 8 Replies

Web Forms :: Required Field Validator Inconsistent?

Mar 9, 2010

[Code]....

I have a form that contains times and dates. Each of these controls has a required field validator so that the user must put in the date and time. This apprears to work fine in testing. The data is stored in sql tables which are then worked with in the office using an Access Database. The webforms are simply used for gathering the data. In analyzing the data, they are finding that there are instances when no time has been stored. I don't know how the insert information could be saved if the control was blank. To make matters worse, the staff swear that they are entering the times.

View 7 Replies

Web Forms :: Use Of Asp.net Required Field Validator For Checking Name?

Oct 14, 2010

Sometimes while registering on the website people don't provide correct details like name and e-mailIn order to check correct e-mail it is better to use e-mail activation link send to their e-mail.But how to make sure the user is providing correct name ?I am really impressed by the Facebook name recognition system, it we try to use any word which is not a name, it asks you to enter a valid name.Is there any way we can make use of asp.net requiredfieldvalidator to check if user is providing a correct name or not ?I know we can make use of requiredfieldvalidator to see how many alphabets / special symbols etc butIf we put minimum alphabet requirement - in that case user can enter "....." and can easily bypass the requiredfieldvalidator or a user can easily write "iamfakeuser" instead of name and bypass the requiredfieldvalidator.
question is how to check if name is correct or not just like facebook registration form ?

View 5 Replies

Crystal Reports :: How To Create Dynamic Group Fields

Sep 6, 2010

I have a VB.Net application which generates quite a few Crystal Reports. One report in particular has a Group Section. What I am trying to do with my VB.Net app is pass a value (a sql server column name used in the report). This value is represented by radio buttons. For example, the user may check either "ZipCode" or "State" or "Category" or "Type" or "Vendor". Each of these options represent a column in the database table used in the report. I simply want to be able to write the "SelectionFormula" using one of these options but not sure how to go about it.

View 1 Replies

Web Forms :: Validation Controls: Required Field Validator

Mar 25, 2011

I'm trying to use a field validator to make sure one of my list boxes has a selection before the user is able to proceed to the next page. i'm having is that if the validation message is triggered, all of the buttons on my page loose functionality.Meaning, if I purposely trigger the validation control, I can't get rid of the error message and none of my buttons do anything when clicke after this.

The majority of the HTML:

[Code]....

Is there something that I need to add to the code behind of the page or the Java Script that I'm using?

View 1 Replies

Web Forms :: Required Field Validator - Capture Not Valid

Jul 30, 2010

Interested in a way to call an event when the Required Field Validator component determines the assigned text field is not valid/empty. Is this possible? Somewhat surprised it doesn't have an event for this. Am I missing something?

View 5 Replies

Web Forms :: Required Field Validators Not Firing In The Page?

Feb 17, 2011

I have required field validators in my ASP.NET application form.

In the button click event of the FORM, i.e. OnClientClick(), I am calling a javascript function to validate the controls in this same page. Due to this the required field validators are not getting fired.

I need both the javascript function be fired on the button click , as well as required field validators also to work efficiently.

View 9 Replies

Web Forms :: Regular Expression And Required Field Not Working?

Apr 20, 2010

I hosted my web application in IIS on windows server.Also i did mod_aspdotnet(i configured my aspx in httpd.conf of apache server in a linux box).now when i hit the URL of linux box...Im able ot view my aspx....but the problem is no button click event id fired and ASP validators are not working and the javascript written by me also not working.

View 8 Replies

Web Forms :: To Add A Required Field Validator To A Text Box On Page?

Jan 11, 2010

I need to add a Required Field Validator to a text box on my page. When I add the validator the following happens when I run the page:

When I click the submit button the page doesn't submit because the page is invalid. No error message displays despite my having set the ErronMessage. When I click inside the text box that has the Validation, then the Required error message shows. When that textbox loses focus the error message goes away. The only way I can get the page to function correctly is if I create 2 Validators for the same text box. The first validator is set to have an ErrorMessage of "" and the second one is a regular error message.

I have used these before many upon many times and never experienced this. Below you will find the Source code.

[Code]....

This code is the only way I am able to get the validation to function correctly where the ErrorMessage displays when I leave the field blank. I appreciate any help on resolving this issue. I have deleted/re-added the validation control many times. This is the only page this type of error happens on.

View 6 Replies

Forms Data Controls :: Required Field Gridview?

Jan 19, 2011

Is it possible to make it so that a particular field in my gridview is made mandatory based on a session variable and the value of a dropdwnlist located outside of the grid itself...so

If Session("location") = "HOME" and DropDownList3.SelectedValue = ("5") then
"fieldinmygridview" cannot be null (i.e is required)
end if

View 3 Replies

Web Forms :: How To Validate DropDownList Using Required Field Validator

Jul 3, 2012

i want use this control for dropdownlist i wrote below code

<asp:DropDownList ID="DDL2" runat="server" CssClass="DPCDDL">
</asp:DropDownList>
<asp:RequiredFieldValidator Display = "Dynamic" ID="RequiredFieldValidator4" runat="server"

ErrorMessage="please select your classification." ControlToValidate="DDL1" CssClass="valid1"></asp:RequiredFieldValidator>

but it didn't work how i can define that users should select one item from DDL?

View 1 Replies

Using Validators To Ensure That User Filled Either One Of Two Required Fields?

Jan 31, 2010

I have an ASP.NET form for currency exchange requests. There are two text fields there: amount-source and amount-target.

One of them must be filled and only one.

How to implement this using Validators, if applicable?

View 2 Replies

Web Forms :: Required Field Validators Are Being Triggered By Other Buttons On Page?

Jul 15, 2010

I have created a form with several textboxes and a dropdown list and assigned a required field validator to each of them. I also have a master page with several links to other pages, some made using <a href=..> and some linkbuttons. The problem I am having is that when I click the linkbutton links they do not redirect to the proper page, rather they trigger the validators for all textbox fields and display the validator characters next to each textbox (and the dropdown). When I fill out the form, those links redirect properly. The links created using <a href=..> do not cause this problem.

View 5 Replies

Web Forms :: Highlight Textbox Border When Required Field Is Empty?

Apr 26, 2010

I'm developing an aspx page with vb code.

I am trying to highlight textbox border in red instead on showing an error message in summary. I'm using a required field validator to validate the empty textbox How can i do so?

View 5 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved