By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,211 Members | 1,884 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,211 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.