473,320 Members | 2,092 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,320 software developers and data experts.

RequiredFieldValidator switching on and off AND TextChanged events not firing

1. I have a series of RequiredFieldValidators that need to be be
enabled/disabled depending on what the user types into various text
boxes.

Can I do this using the Enabled property of the validator. Or should I
use the CausesValidation on the control?

2. Also, with my text boxes, I am not getting the TextChanged events
firing. I tried changing the AutoPostBack property on the text box to
true but this still did not fire the event? What am I doing wrong?

(Note it is within these TextChanged events that I am attempting to
disable the validators).

Sorry if this is a simple ASP.NET question but I have mostly been using
WinForms.

Nov 15 '06 #1
1 3404

To answer your first question: yes, the Enabled property is how you turn
on/off validators.

As for the second question, setting AutoPostBack="true" and
OnTextChanged="..." should work. If you could post your code, it will
be easier for us to figure out what is going wrong.

-bgano

--
bgano
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------

Nov 16 '06 #2

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

Similar topics

3
by: Fabrício de Novaes Kucinskis | last post by:
Hi all, I have a combobox control, in wich I put an autocomplete code. This code is in the TextChanged event, but when this event fires, the Text property isn't updated yet. For example, if...
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...
2
by: jorge | last post by:
Hello I have the following situation: (everything is dynamic (controls.add)) 1. Button.Init { WasButtonClickFired = true } 2. TextBox.TextChanged { WasButtonClickFired?
1
by: bill yeager | last post by:
I have two fields on my webform that I want calculated in my code-behind, but as I type in the controls, the events are not firing (as evidenced in debug mode). <code> Private Sub...
3
by: Mike | last post by:
Hi, I am adding controls dynamically in a WebForm, but none of these controls' events fire. Here is the class code I am using. I have tried so many things, but nothing works :-( namespace...
3
by: Kurt Schroeder | last post by:
I'm setting focus depenting upon which field has changed value. I'm doing this with the following: Page.RegisterStartupScript("SetFocus", "<script language=""Jscript"" >...
1
by: Stan Sainte-Rose | last post by:
Hi, I have a problem with my textchanged and leave events I have a script in the leave event of my textbox and also in my textchanged. The script in my textchanged adds and displays a tabpage....
4
by: Jason Huang | last post by:
Hi, In my C# Windows form MyForm I have some TextBoxes. In these TextBoxes, we have to detect if the TextChanged event occurs, if there're changes in these TextBoxes, it will ask if we want to...
1
by: Arpan | last post by:
Suppose I have the following RequiredFieldValidator control which validates a TextBox: <form id="form1" runat="server"> <asp:TextBox id="txtVal" runat="server"/> <asp:RequiredFieldValidator...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.