473,725 Members | 2,168 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

cant figure out what is causes server-side validation

AFN
I was just dropped into someone else's code (isn't that always so fun?).

I can't figure out why a custom validation control's server event function
is executing. There is nothing (that I see) in page_load, or elsewhere,
that says page.validate, no control says "causesvalidati on=true", and the
AutoEventWireup is set to false. So I would think that the control's
server event function would NOT execute, but it does execute right after
page_load. I want to call page.validate (followed by if page.isvalid ...)
elsewhere, but that means that the event function code will run twice, which
I don't want.

Where else do I look to see why the custom validator's event function is
executing on the server after page_load?
Nov 19 '05 #1
9 2223
Page.IsValid is what triggers server side validation

-- bruce (sqlwork.com)

"AFN" <ne************ *************** @DELETETHISyaho o.com> wrote in message
news:iN******** ***********@twi ster.socal.rr.c om...
| I was just dropped into someone else's code (isn't that always so fun?).
|
| I can't figure out why a custom validation control's server event function
| is executing. There is nothing (that I see) in page_load, or elsewhere,
| that says page.validate, no control says "causesvalidati on=true", and the
| AutoEventWireup is set to false. So I would think that the control's
| server event function would NOT execute, but it does execute right after
| page_load. I want to call page.validate (followed by if page.isvalid
....)
| elsewhere, but that means that the event function code will run twice,
which
| I don't want.
|
| Where else do I look to see why the custom validator's event function is
| executing on the server after page_load?
|
|
Nov 19 '05 #2
AFN
It is going to the validation function BEFORE page.validate & page.isvalid.
That's what puzzles me. I know it will go there upon page.validate, but
can't figure out what else BEFORE that is triggering it.
"bruce barker" <no***********@ safeco.com> wrote in message
news:u1******** ******@tk2msftn gp13.phx.gbl...
Page.IsValid is what triggers server side validation

-- bruce (sqlwork.com)

"AFN" <ne************ *************** @DELETETHISyaho o.com> wrote in message
news:iN******** ***********@twi ster.socal.rr.c om...
| I was just dropped into someone else's code (isn't that always so fun?).
|
| I can't figure out why a custom validation control's server event function | is executing. There is nothing (that I see) in page_load, or elsewhere, | that says page.validate, no control says "causesvalidati on=true", and the | AutoEventWireup is set to false. So I would think that the control's
| server event function would NOT execute, but it does execute right after
| page_load. I want to call page.validate (followed by if page.isvalid
...)
| elsewhere, but that means that the event function code will run twice,
which
| I don't want.
|
| Where else do I look to see why the custom validator's event function is
| executing on the server after page_load?
|
|

Nov 19 '05 #3
The Button control calls Page.Validate() internally just before it calls any
Click event handler. CausesValidatio n=true is the true. So if you don't see
it listed in the ASP.NET definition of the button, Page.Validate() is being
fired.

Only when Page.Validate() or the individual validator's Validate() method is
called will the validator run its custom evaluation function.

In your case, its clear that the button is calling Page.Validate for you and
that is running your event method.

--- Peter Blum
www.PeterBlum.com
Email: PL****@PeterBlu m.com
Creator of "Profession al Validation And More" at
http://www.peterblum.com/vam/home.aspx

"AFN" <ne************ *************** @DELETETHISyaho o.com> wrote in message
news:V9******** ***********@twi ster.socal.rr.c om...
It is going to the validation function BEFORE page.validate &
page.isvalid.
That's what puzzles me. I know it will go there upon page.validate, but
can't figure out what else BEFORE that is triggering it.
"bruce barker" <no***********@ safeco.com> wrote in message
news:u1******** ******@tk2msftn gp13.phx.gbl...
Page.IsValid is what triggers server side validation

-- bruce (sqlwork.com)

"AFN" <ne************ *************** @DELETETHISyaho o.com> wrote in
message
news:iN******** ***********@twi ster.socal.rr.c om...
| I was just dropped into someone else's code (isn't that always so
fun?).
|
| I can't figure out why a custom validation control's server event

function
| is executing. There is nothing (that I see) in page_load, or

elsewhere,
| that says page.validate, no control says "causesvalidati on=true", and

the
| AutoEventWireup is set to false. So I would think that the control's
| server event function would NOT execute, but it does execute right
after
| page_load. I want to call page.validate (followed by if page.isvalid
...)
| elsewhere, but that means that the event function code will run twice,
which
| I don't want.
|
| Where else do I look to see why the custom validator's event function
is
| executing on the server after page_load?
|
|


Nov 19 '05 #4
AFN
I appreciate the reply, but I'm still a bit confused.

I don't have any submit buttons. Instead I'm using an "HtmlInputImage "
control (an image button). In its properties, it does not show any
"CausesValidati on" property, either.

"Peter Blum" <PL****@Blum.in fo> wrote in message
news:uW******** ******@TK2MSFTN GP12.phx.gbl...
The Button control calls Page.Validate() internally just before it calls any Click event handler. CausesValidatio n=true is the true. So if you don't see it listed in the ASP.NET definition of the button, Page.Validate() is being fired.

Only when Page.Validate() or the individual validator's Validate() method is called will the validator run its custom evaluation function.

In your case, its clear that the button is calling Page.Validate for you and that is running your event method.

--- Peter Blum
www.PeterBlum.com
Email: PL****@PeterBlu m.com
Creator of "Profession al Validation And More" at
http://www.peterblum.com/vam/home.aspx

"AFN" <ne************ *************** @DELETETHISyaho o.com> wrote in message
news:V9******** ***********@twi ster.socal.rr.c om...
It is going to the validation function BEFORE page.validate &
page.isvalid.
That's what puzzles me. I know it will go there upon page.validate, but can't figure out what else BEFORE that is triggering it.
"bruce barker" <no***********@ safeco.com> wrote in message
news:u1******** ******@tk2msftn gp13.phx.gbl...
Page.IsValid is what triggers server side validation

-- bruce (sqlwork.com)

"AFN" <ne************ *************** @DELETETHISyaho o.com> wrote in
message
news:iN******** ***********@twi ster.socal.rr.c om...
| I was just dropped into someone else's code (isn't that always so
fun?).
|
| I can't figure out why a custom validation control's server event

function
| is executing. There is nothing (that I see) in page_load, or

elsewhere,
| that says page.validate, no control says "causesvalidati on=true", and

the
| AutoEventWireup is set to false. So I would think that the control's | server event function would NOT execute, but it does execute right
after
| page_load. I want to call page.validate (followed by if page.isvalid ...)
| elsewhere, but that means that the event function code will run twice, which
| I don't want.
|
| Where else do I look to see why the custom validator's event function
is
| executing on the server after page_load?
|
|



Nov 19 '05 #5
AFN
I see that intellisense does bring up a CausesValidatio n property on my
HtmlInputImage "button". I set it to false in page_load, but the
server-side function is still running. In case it makes any difference, I
have text boxes, pulldowns, and text inside a user control on this page.
What else could be causing validation??? I'm pulling my hair out over this.

"AFN" <ne************ *************** @DELETETHISyaho o.com> wrote in message
news:H4******** ***********@twi ster.socal.rr.c om...
I appreciate the reply, but I'm still a bit confused.

I don't have any submit buttons. Instead I'm using an "HtmlInputImage "
control (an image button). In its properties, it does not show any
"CausesValidati on" property, either.

"Peter Blum" <PL****@Blum.in fo> wrote in message
news:uW******** ******@TK2MSFTN GP12.phx.gbl...
The Button control calls Page.Validate() internally just before it calls any
Click event handler. CausesValidatio n=true is the true. So if you don't

see
it listed in the ASP.NET definition of the button, Page.Validate() is

being
fired.

Only when Page.Validate() or the individual validator's Validate() method is
called will the validator run its custom evaluation function.

In your case, its clear that the button is calling Page.Validate for you

and
that is running your event method.

--- Peter Blum
www.PeterBlum.com
Email: PL****@PeterBlu m.com
Creator of "Profession al Validation And More" at
http://www.peterblum.com/vam/home.aspx

"AFN" <ne************ *************** @DELETETHISyaho o.com> wrote in message news:V9******** ***********@twi ster.socal.rr.c om...
It is going to the validation function BEFORE page.validate &
page.isvalid.
That's what puzzles me. I know it will go there upon page.validate,

but can't figure out what else BEFORE that is triggering it.
"bruce barker" <no***********@ safeco.com> wrote in message
news:u1******** ******@tk2msftn gp13.phx.gbl...
> Page.IsValid is what triggers server side validation
>
> -- bruce (sqlwork.com)
>
> "AFN" <ne************ *************** @DELETETHISyaho o.com> wrote in
> message
> news:iN******** ***********@twi ster.socal.rr.c om...
> | I was just dropped into someone else's code (isn't that always so
> fun?).
> |
> | I can't figure out why a custom validation control's server event
function
> | is executing. There is nothing (that I see) in page_load, or
elsewhere,
> | that says page.validate, no control says "causesvalidati on=true", and the
> | AutoEventWireup is set to false. So I would think that the control's> | server event function would NOT execute, but it does execute right
> after
> | page_load. I want to call page.validate (followed by if page.isvalid> ...)
> | elsewhere, but that means that the event function code will run twice,> which
> | I don't want.
> |
> | Where else do I look to see why the custom validator's event function> is
> | executing on the server after page_load?
> |
> |
>
>



Nov 19 '05 #6
I recently posted this thread that breaks the process down in detail:
http://www.asp.net/Forums/ShowPost.a...&PostID=773590

The CausesValidatio n=false prevents your HtmlInputImage button from
automatically calling Page.Validate() . If your custom validator's evaluation
method is getting called, it MUST be due to a call to Page.Validate() or
your own validator's Validate() method. There is no magic here. The code
executes based on specific conditions.

So if you cannot find Page.Validate() or Validate() on your individual
validator on this page, then you must assume its getting called by the image
button that ASP.NET thinks submitted the page. If you have Visual
Studio.net, you can put a breakpoint in your server side method. When its
hit, look through the call stack to see what invoked it.
You can also check that CausesValidatio n is false at this time. I bet its
not.

A common mistake in Page_Load is to put code inside IF Not IsPostBack
statements when it belongs available at all times. Did you do this with
CausesValidatio n?

--- Peter Blum
www.PeterBlum.com
Email: PL****@PeterBlu m.com
Creator of "Profession al Validation And More" at
http://www.peterblum.com/vam/home.aspx

"AFN" <ne************ *************** @DELETETHISyaho o.com> wrote in message
news:Vp******** **********@twis ter.socal.rr.co m...
I see that intellisense does bring up a CausesValidatio n property on my
HtmlInputImage "button". I set it to false in page_load, but the
server-side function is still running. In case it makes any difference,
I
have text boxes, pulldowns, and text inside a user control on this page.
What else could be causing validation??? I'm pulling my hair out over
this.

"AFN" <ne************ *************** @DELETETHISyaho o.com> wrote in message
news:H4******** ***********@twi ster.socal.rr.c om...
I appreciate the reply, but I'm still a bit confused.

I don't have any submit buttons. Instead I'm using an "HtmlInputImage "
control (an image button). In its properties, it does not show any
"CausesValidati on" property, either.

"Peter Blum" <PL****@Blum.in fo> wrote in message
news:uW******** ******@TK2MSFTN GP12.phx.gbl...
> The Button control calls Page.Validate() internally just before it
> calls

any
> Click event handler. CausesValidatio n=true is the true. So if you don't

see
> it listed in the ASP.NET definition of the button, Page.Validate() is

being
> fired.
>
> Only when Page.Validate() or the individual validator's Validate() method
is
> called will the validator run its custom evaluation function.
>
> In your case, its clear that the button is calling Page.Validate for
> you

and
> that is running your event method.
>
> --- Peter Blum
> www.PeterBlum.com
> Email: PL****@PeterBlu m.com
> Creator of "Profession al Validation And More" at
> http://www.peterblum.com/vam/home.aspx
>
> "AFN" <ne************ *************** @DELETETHISyaho o.com> wrote in

message > news:V9******** ***********@twi ster.socal.rr.c om...
> > It is going to the validation function BEFORE page.validate &
> > page.isvalid.
> > That's what puzzles me. I know it will go there upon page.validate,

but
> > can't figure out what else BEFORE that is triggering it.
> >
> >
> > "bruce barker" <no***********@ safeco.com> wrote in message
> > news:u1******** ******@tk2msftn gp13.phx.gbl...
> >> Page.IsValid is what triggers server side validation
> >>
> >> -- bruce (sqlwork.com)
> >>
> >> "AFN" <ne************ *************** @DELETETHISyaho o.com> wrote in
> >> message
> >> news:iN******** ***********@twi ster.socal.rr.c om...
> >> | I was just dropped into someone else's code (isn't that always so
> >> fun?).
> >> |
> >> | I can't figure out why a custom validation control's server event
> > function
> >> | is executing. There is nothing (that I see) in page_load, or
> > elsewhere,
> >> | that says page.validate, no control says "causesvalidati on=true", and > > the
> >> | AutoEventWireup is set to false. So I would think that the

control's
> >> | server event function would NOT execute, but it does execute right
> >> after
> >> | page_load. I want to call page.validate (followed by if

page.isvalid
> >> ...)
> >> | elsewhere, but that means that the event function code will run

twice,
> >> which
> >> | I don't want.
> >> |
> >> | Where else do I look to see why the custom validator's event function > >> is
> >> | executing on the server after page_load?
> >> |
> >> |
> >>
> >>
> >
> >
>
>



Nov 19 '05 #7
AFN
Thanks for your reply. OK, I've done more evaluation and testing, but
still no luck...

The page has 2 image buttons, one at the top and one at the bottom. Both
are definitely set to "causesvalidati on=false" everywhere, and I've
confirmed such by testing the variables in the command window at every stage
of running the page. And no "causesvalidati on=false" lines of code are
within an "if/then" condition.

Remember, in case it makes any difference, that the page has a user control
within it, containing text boxes and 4 custom validators, but that control
has no image or standard buttons, and nothing that has a causesvalidatio n
property (to the best of my knowledge and i've looked hard now).

I run the page.
I click the image button which is on the page, under the user control.
The page_load fires for the main page
The page_load fires for the user control
The next thing that fires is the sub for the image's ServerClick
That ServerClick sub calls page.validate (I understand this will trigger
validation ONCE)
The user control's CustomValidator 1 sub runs, as I would expect
The user control's CustomValidator 2 sub runs, as I would expect
The user control's CustomValidator 3 sub runs, as I would expect
The user control's CustomValidator 4 sub runs, as I would expect
*** this is where I'm absolutely puzzled, here down ***
The user control's CustomValidator 1 sub runs AGAIN, as I would NOT expect
The user control's CustomValidator 2 sub runs AGAIN, as I would NOT expect
The user control's CustomValidator 3 sub runs AGAIN, as I would NOT expect
The user control's CustomValidator 4 sub runs AGAIN, as I would NOT expect
control returns back to the next line after page.validate, which is "If
page.IsValid ..."
The call stack doesn't seem to show anything helpful. It just shows that
the source on each entry into a custom validator's sub is itself
(System.Web.UI. WebControls.Cus tomValidator.

The validators are also not making any extra calls to functions that could
potentially do another page.validate. They simply check simple things like
the length of a textbox field.

Any ideas???

"Peter Blum" <PL****@Blum.in fo> wrote in message
news:uF******** ******@TK2MSFTN GP10.phx.gbl...
I recently posted this thread that breaks the process down in detail:
http://www.asp.net/Forums/ShowPost.a...&PostID=773590

The CausesValidatio n=false prevents your HtmlInputImage button from
automatically calling Page.Validate() . If your custom validator's evaluation method is getting called, it MUST be due to a call to Page.Validate() or
your own validator's Validate() method. There is no magic here. The code
executes based on specific conditions.

So if you cannot find Page.Validate() or Validate() on your individual
validator on this page, then you must assume its getting called by the image button that ASP.NET thinks submitted the page. If you have Visual
Studio.net, you can put a breakpoint in your server side method. When its
hit, look through the call stack to see what invoked it.
You can also check that CausesValidatio n is false at this time. I bet its
not.

A common mistake in Page_Load is to put code inside IF Not IsPostBack
statements when it belongs available at all times. Did you do this with
CausesValidatio n?

--- Peter Blum
www.PeterBlum.com
Email: PL****@PeterBlu m.com
Creator of "Profession al Validation And More" at
http://www.peterblum.com/vam/home.aspx

"AFN" <ne************ *************** @DELETETHISyaho o.com> wrote in message
news:Vp******** **********@twis ter.socal.rr.co m...
I see that intellisense does bring up a CausesValidatio n property on my
HtmlInputImage "button". I set it to false in page_load, but the
server-side function is still running. In case it makes any difference, I
have text boxes, pulldowns, and text inside a user control on this page.
What else could be causing validation??? I'm pulling my hair out over
this.

"AFN" <ne************ *************** @DELETETHISyaho o.com> wrote in message news:H4******** ***********@twi ster.socal.rr.c om...
I appreciate the reply, but I'm still a bit confused.

I don't have any submit buttons. Instead I'm using an "HtmlInputImage "
control (an image button). In its properties, it does not show any
"CausesValidati on" property, either.

"Peter Blum" <PL****@Blum.in fo> wrote in message
news:uW******** ******@TK2MSFTN GP12.phx.gbl...
> The Button control calls Page.Validate() internally just before it
> calls
any
> Click event handler. CausesValidatio n=true is the true. So if you don't see
> it listed in the ASP.NET definition of the button, Page.Validate() is
being
> fired.
>
> Only when Page.Validate() or the individual validator's Validate()

method
is
> called will the validator run its custom evaluation function.
>
> In your case, its clear that the button is calling Page.Validate for
> you
and
> that is running your event method.
>
> --- Peter Blum
> www.PeterBlum.com
> Email: PL****@PeterBlu m.com
> Creator of "Profession al Validation And More" at
> http://www.peterblum.com/vam/home.aspx
>
> "AFN" <ne************ *************** @DELETETHISyaho o.com> wrote in

message
> news:V9******** ***********@twi ster.socal.rr.c om...
> > It is going to the validation function BEFORE page.validate &
> > page.isvalid.
> > That's what puzzles me. I know it will go there upon page.validate, but
> > can't figure out what else BEFORE that is triggering it.
> >
> >
> > "bruce barker" <no***********@ safeco.com> wrote in message
> > news:u1******** ******@tk2msftn gp13.phx.gbl...
> >> Page.IsValid is what triggers server side validation
> >>
> >> -- bruce (sqlwork.com)
> >>
> >> "AFN" <ne************ *************** @DELETETHISyaho o.com> wrote in
> >> message
> >> news:iN******** ***********@twi ster.socal.rr.c om...
> >> | I was just dropped into someone else's code (isn't that always so > >> fun?).
> >> |
> >> | I can't figure out why a custom validation control's server event > > function
> >> | is executing. There is nothing (that I see) in page_load, or
> > elsewhere,
> >> | that says page.validate, no control says "causesvalidati on=true",
and
> > the
> >> | AutoEventWireup is set to false. So I would think that the
control's
> >> | server event function would NOT execute, but it does execute

right > >> after
> >> | page_load. I want to call page.validate (followed by if
page.isvalid
> >> ...)
> >> | elsewhere, but that means that the event function code will run
twice,
> >> which
> >> | I don't want.
> >> |
> >> | Where else do I look to see why the custom validator's event

function
> >> is
> >> | executing on the server after page_load?
> >> |
> >> |
> >>
> >>
> >
> >
>
>



Nov 19 '05 #8
Server-side validation is by default. Look into the custom validator
control that provides for a server_validate function, for the rest of
the controls, it is managed andin-built by ASP.Net.

ASP.Net is a disconnected environment and is not like the Windows local
environment where you can cause the validate function to occur on a
form.

with regards,
J.V.Ravichandra n
- http://www.geocities.com/
jvravichandran
- http://www.411asp.net/func/search?
qry=Ravichandra n+J.V.&cob=aspn etpro
- http://www.southasianoutlook.com
- http://www.MSDNAA.Net
- http://www.csharphelp.com
- http://www.poetry.com/Publications/
display.asp?ID= P3966388&BN=999 &PN=2
- Or, just search on "J.V.Ravichandr an"
at http://www.Google.com

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 19 '05 #9
AFN
I found the solution/answer.

The pages were using a custom template base class.

The 1.1 framework had a bug that dropped validators when copying controls.
So you had to save a copy of validators before adding the page into the
template, and then add them back manually.

The recent 1.1 service pack fixed that bug.

My code had the bug workaround. My machine had the latest 1.1 fix. So the
code was effectively adding a copy of each validator, internally where I
couldn't see it, and that is why each validator event was firing twice even
though you would not see two of the same validator when examining the code!


"AFN" <ne************ *************** @DELETETHISyaho o.com> wrote in message
news:bH******** ***********@twi ster.socal.rr.c om...
Thanks for your reply. OK, I've done more evaluation and testing, but
still no luck...

The page has 2 image buttons, one at the top and one at the bottom. Both
are definitely set to "causesvalidati on=false" everywhere, and I've
confirmed such by testing the variables in the command window at every stage of running the page. And no "causesvalidati on=false" lines of code are
within an "if/then" condition.

Remember, in case it makes any difference, that the page has a user control within it, containing text boxes and 4 custom validators, but that control
has no image or standard buttons, and nothing that has a causesvalidatio n
property (to the best of my knowledge and i've looked hard now).

I run the page.
I click the image button which is on the page, under the user control.
The page_load fires for the main page
The page_load fires for the user control
The next thing that fires is the sub for the image's ServerClick
That ServerClick sub calls page.validate (I understand this will trigger
validation ONCE)
The user control's CustomValidator 1 sub runs, as I would expect
The user control's CustomValidator 2 sub runs, as I would expect
The user control's CustomValidator 3 sub runs, as I would expect
The user control's CustomValidator 4 sub runs, as I would expect
*** this is where I'm absolutely puzzled, here down ***
The user control's CustomValidator 1 sub runs AGAIN, as I would NOT expect The user control's CustomValidator 2 sub runs AGAIN, as I would NOT expect The user control's CustomValidator 3 sub runs AGAIN, as I would NOT expect The user control's CustomValidator 4 sub runs AGAIN, as I would NOT expect control returns back to the next line after page.validate, which is "If
page.IsValid ..."
The call stack doesn't seem to show anything helpful. It just shows that
the source on each entry into a custom validator's sub is itself
(System.Web.UI. WebControls.Cus tomValidator.

The validators are also not making any extra calls to functions that could
potentially do another page.validate. They simply check simple things like the length of a textbox field.

Any ideas???

"Peter Blum" <PL****@Blum.in fo> wrote in message
news:uF******** ******@TK2MSFTN GP10.phx.gbl...
I recently posted this thread that breaks the process down in detail:
http://www.asp.net/Forums/ShowPost.a...&PostID=773590

The CausesValidatio n=false prevents your HtmlInputImage button from
automatically calling Page.Validate() . If your custom validator's

evaluation
method is getting called, it MUST be due to a call to Page.Validate() or
your own validator's Validate() method. There is no magic here. The code
executes based on specific conditions.

So if you cannot find Page.Validate() or Validate() on your individual
validator on this page, then you must assume its getting called by the

image
button that ASP.NET thinks submitted the page. If you have Visual
Studio.net, you can put a breakpoint in your server side method. When its
hit, look through the call stack to see what invoked it.
You can also check that CausesValidatio n is false at this time. I bet its not.

A common mistake in Page_Load is to put code inside IF Not IsPostBack
statements when it belongs available at all times. Did you do this with
CausesValidatio n?

--- Peter Blum
www.PeterBlum.com
Email: PL****@PeterBlu m.com
Creator of "Profession al Validation And More" at
http://www.peterblum.com/vam/home.aspx

"AFN" <ne************ *************** @DELETETHISyaho o.com> wrote in message news:Vp******** **********@twis ter.socal.rr.co m...
I see that intellisense does bring up a CausesValidatio n property on my
HtmlInputImage "button". I set it to false in page_load, but the
server-side function is still running. In case it makes any

difference, I
have text boxes, pulldowns, and text inside a user control on this page. What else could be causing validation??? I'm pulling my hair out over
this.

"AFN" <ne************ *************** @DELETETHISyaho o.com> wrote in message news:H4******** ***********@twi ster.socal.rr.c om...
> I appreciate the reply, but I'm still a bit confused.
>
> I don't have any submit buttons. Instead I'm using an "HtmlInputImage "> control (an image button). In its properties, it does not show any
> "CausesValidati on" property, either.
>
>
>
> "Peter Blum" <PL****@Blum.in fo> wrote in message
> news:uW******** ******@TK2MSFTN GP12.phx.gbl...
> > The Button control calls Page.Validate() internally just before it
> > calls
> any
> > Click event handler. CausesValidatio n=true is the true. So if you don't> see
> > it listed in the ASP.NET definition of the button, Page.Validate() is> being
> > fired.
> >
> > Only when Page.Validate() or the individual validator's Validate()
method
> is
> > called will the validator run its custom evaluation function.
> >
> > In your case, its clear that the button is calling Page.Validate for> > you
> and
> > that is running your event method.
> >
> > --- Peter Blum
> > www.PeterBlum.com
> > Email: PL****@PeterBlu m.com
> > Creator of "Profession al Validation And More" at
> > http://www.peterblum.com/vam/home.aspx
> >
> > "AFN" <ne************ *************** @DELETETHISyaho o.com> wrote in
message
> > news:V9******** ***********@twi ster.socal.rr.c om...
> > > It is going to the validation function BEFORE page.validate &
> > > page.isvalid.
> > > That's what puzzles me. I know it will go there upon page.validate,> but
> > > can't figure out what else BEFORE that is triggering it.
> > >
> > >
> > > "bruce barker" <no***********@ safeco.com> wrote in message
> > > news:u1******** ******@tk2msftn gp13.phx.gbl...
> > >> Page.IsValid is what triggers server side validation
> > >>
> > >> -- bruce (sqlwork.com)
> > >>
> > >> "AFN" <ne************ *************** @DELETETHISyaho o.com> wrote in> > >> message
> > >> news:iN******** ***********@twi ster.socal.rr.c om...
> > >> | I was just dropped into someone else's code (isn't that always so> > >> fun?).
> > >> |
> > >> | I can't figure out why a custom validation control's server event> > > function
> > >> | is executing. There is nothing (that I see) in page_load, or
> > > elsewhere,
> > >> | that says page.validate, no control says "causesvalidati on=true", and
> > > the
> > >> | AutoEventWireup is set to false. So I would think that the
> control's
> > >> | server event function would NOT execute, but it does execute right> > >> after
> > >> | page_load. I want to call page.validate (followed by if
> page.isvalid
> > >> ...)
> > >> | elsewhere, but that means that the event function code will run> twice,
> > >> which
> > >> | I don't want.
> > >> |
> > >> | Where else do I look to see why the custom validator's event
function
> > >> is
> > >> | executing on the server after page_load?
> > >> |
> > >> |
> > >>
> > >>
> > >
> > >
> >
> >
>
>



Nov 19 '05 #10

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

Similar topics

7
9370
by: kecebong | last post by:
I installed php-4.3.3, mysql and apache server 2.0.47. but I can not connect to my apache server from my other computer, i use static ip for my server, set ip address for server name on httpd.conf, setup sua server on router. do i miss something here? anyone can help me to figure it out? thanks.
0
1072
by: importantEmail | last post by:
hi i have pasted page_load, my bindgrid, sort and itemdatabound event. my sorting in not working properly...i tried a couple of ways but there is something i am missing. pls suggest me on this .... i hadnt been able to figure out the solution for this. here is the original display in the dg==> Category Description Size(KB) Last Modified
0
1192
by: samir dsf | last post by:
hi i have pasted page_load, my bindgrid, sort and itemdatabound event. my sorting in not working properly...i tried a couple of ways but there is something i am missing. pls suggest me on this .... i hadnt been able to figure out the solution for this. here is the original display in the dg==> Category Description Size(KB) Last Modified
3
1808
by: Kentor | last post by:
hello, im trying to make a little loop, but i cant figure it out... i have a string with a bunch of 1s and 0s in it: 110101010101111010101 .... i need to count the number of 1s divide it by 2 and make a table with 2 columns and then for every one, depending on its position in the string i need to output a word and then go to the next 1 and output a dif word.... its amenities, winter activities and summer activities for cottages that i...
2
7377
by: g35rider | last post by:
Hi, I have the following code that is giving this error, I cant simplify the code, I was just testing some theory for something we are doing and was getting an issue here. Please someone point out whats wrong with my code. class MsgData { char* data;
5
1648
by: Ouwet5775 | last post by:
Hello peeps. Well i have tried runing the folwoing program several times, and i cant figure out what i am doing wrong. The goal of this is to input values for an array, find the maximum and the do a linear search for a given number. But i cant seem to input the number anywhere. Any kind of input would help me out alot. Thanks ;)
4
4862
by: =?Utf-8?B?UmljaA==?= | last post by:
On a form - I have a datagridview which is docked to the entire form. The datagridview allows users to Delete and/or Add Rows. On the Form_Load event I Fill the datagridview source table with a sql DataAdapter (da) da.SelectCommand.CommandText = "Select * from Servertbl1" da.Fill(ds, "tbl1") so far, so good. If I add a row to the datagridview I use the following sqlDataAdapter code to update the server table - which works OK when...
1
1767
by: durjoy | last post by:
dunno is the right forum to ask for help , but i cant see any category for html help . dont know any other site as well . this site is my last hope dear experts . i was hosting my site with different server than curent hosting however i have moved my site into new server and start having so many troubles . first of all couldnt figure out simple html error .. after successfuly moving site into new server i have checked every single page...
6
2477
by: WolfgangS | last post by:
Ok first off, i am a total beginner at this groups stuff and i have no clue how this works. This is probabaly the wrong group for my problem but i will post it anyways. Learning by doing right? I will post a code snippet and explain my problem. I cant seem to find a logical explanation why this problem would occur after trying to figure it out for a few hours. However I am probably just blind and/or stupid and you will realise where i go...
5
1879
by: chevon1920 | last post by:
I am trying to do my assignment but I cant figure out how to get 8 data points per line to print to a file. Here is the assignment 1. Program asks the user to enter an odd number as a BASE, using this Base it creates 48 multiples of the BASE and prints in a data file "data_3b.txt", 8-data per line. 2. Program opens this data file, scans the contents of "data_3b.txt" file and counts all the odd data, and prints them on the screen: 4 data...
0
8888
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9401
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9257
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9113
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8097
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6702
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4784
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3221
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
3
2157
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.