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

How to trigger textchanged event of a user control on page submit?

Hi all,

I've created an User control. It's an extension of a textbox wich has some extra properties so that validation becomes a lot faster.

The control wordks great if autopostback is on. When there's a value in the textbox, the (overridden) textchanged event fires and validation is performed.

Now I want to turn off autopostback. So I want my contol only validate if the submit button is pressed. I've tried Page.Validate(), but It seems only to trigger Validators. My control doesn't have to have validators, but just raises an error.

So, I think the question is: how do I trigger the overridden textchanged event of my custom control, preferably without writing code in de click event of the submit-button?

Greetz,
Owin
Amsterdam
Nov 18 '05 #1
2 3955
Odd.. shouldnt it trigger it iself since autopostback is turned off.. the
submit button should cause the textchanged event to trigger as long as u did
cause a change in the textbox...

"Owin" <Ow**@discussions.microsoft.com> wrote in message
news:96**********************************@microsof t.com...
Hi all,

I've created an User control. It's an extension of a textbox wich has some extra properties so that validation becomes a lot faster.
The control wordks great if autopostback is on. When there's a value in the textbox, the (overridden) textchanged event fires and validation is
performed.
Now I want to turn off autopostback. So I want my contol only validate if the submit button is pressed. I've tried Page.Validate(), but It seems only
to trigger Validators. My control doesn't have to have validators, but just
raises an error.
So, I think the question is: how do I trigger the overridden textchanged event of my custom control, preferably without writing code in de click
event of the submit-button?
Greetz,
Owin
Amsterdam

---
Outgoing mail is certified Virus Free. (well i'd like to think it is.. )
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.720 / Virus Database: 476 - Release Date: 14/07/2004
Nov 18 '05 #2
when u say user control u mean an .ascx page with a textbox ? or u inherited
and redifined the textbox class ?

"Owin" <Ow**@discussions.microsoft.com> wrote in message
news:96**********************************@microsof t.com...
Hi all,

I've created an User control. It's an extension of a textbox wich has some extra properties so that validation becomes a lot faster.
The control wordks great if autopostback is on. When there's a value in the textbox, the (overridden) textchanged event fires and validation is
performed.
Now I want to turn off autopostback. So I want my contol only validate if the submit button is pressed. I've tried Page.Validate(), but It seems only
to trigger Validators. My control doesn't have to have validators, but just
raises an error.
So, I think the question is: how do I trigger the overridden textchanged event of my custom control, preferably without writing code in de click
event of the submit-button?
Greetz,
Owin
Amsterdam

---
Outgoing mail is certified Virus Free. (well i'd like to think it is.. )
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.720 / Virus Database: 476 - Release Date: 14/07/2004
Nov 18 '05 #3

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

Similar topics

3
by: KathyB | last post by:
Hi, clearly I'm just not getting something here. I have an aspx form with ONE textbox and several label controls on it. I have the textbox set to AutoPostBack = True, but when I enter my text...
1
by: Samuel Chan | last post by:
I used the textchanged event of textbox and set the autopostback property to true. The textchanged event should fire when the content of the textbox is changed and user tab out of the textbox...
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: Zyrthofar | last post by:
Hi I have three textboxes indicating the individual RGB values of a color. When the user leaves a textbox (Leave event), I check the validity of that number and saves the three values to a set of...
3
by: Robert W. | last post by:
I'm new to ASP.net programming so excuse my ignorance if the following question seems overly simplistic. I've created a simple Login form with 3 primary WebControls: - A TextBox for the Username...
1
by: jeeber | last post by:
I saw this on another thread (Francesco November 15th, 2005 UserControl.TextChanged) but I didn't see how to add to the discussion, so I'm just starting a new one and hope that people find it. The...
1
by: koraykazgan | last post by:
Hi all, I have a user control (ASCX). In that user control there is a panel, and inside that panel there is a textbox and a button. The panel has a DefaultButton property set, which is set to the...
6
by: Mark B | last post by:
I have a function that looks up a SQL table to see if a search term matches. It works fine but so far there are two things yet to work: 1) After entering a search term and pressing Enter, nothing...
9
by: David C | last post by:
I have an asp.net page that contains a FormView with several controls bound to a SqlDataSource. One of the controls is a TextBox bound to a date column. I have the following additional properties...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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
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,...
0
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...

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.