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

<asp:CustomValidator > strange behavior

when validation fails on the server side
after a button was clicked,
must i check in the beggining of my button click server event handler that
the page is valid, or if the page is not valid my handler should not be
called ( as i thought )
?
because i see that my code is being called even when the page is not valid,
but should it?

TIA, z.

Nov 18 '05 #1
1 1143
If I understand your question correctly, you are wondering why you have to
check Page.IsValid.

You must always check Page.IsValid or individual validator's IsValid
property for true before saving or using the data of the page. The Click
event will always be called. Internally, the button runs Page.Validate()
before your Click event runs. But it still runs your Click event, regardless
of the results of Validate().

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

"z. f." <zi**@info-scopeREMSPAM.co.il> wrote in message
news:eZ**************@TK2MSFTNGP10.phx.gbl...
when validation fails on the server side
after a button was clicked,
must i check in the beggining of my button click server event handler that
the page is valid, or if the page is not valid my handler should not be
called ( as i thought )
?
because i see that my code is being called even when the page is not valid, but should it?

TIA, z.

Nov 18 '05 #2

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

Similar topics

0
by: Martin Jacobsson | last post by:
Hi! I have just installed VS.NET 2003, I have problem with intelisense in <asp:>-tags in aspx-files. I prevoiusly ran VS.NET and had no problems with this. Is it some property on the project or...
1
by: s8chem | last post by:
I'm working with an XSL document that renders ASP.NET Server Controls. In order to do this, I have to declare an "asp" namespace within the XSL document. This namespace is the same as when you see...
4
by: z. f. | last post by:
Hi, I'm having an aspx page with a server form. i have a grid with a delete button and below the grid, another area with inputs for inserting new values and an "add" button for submiting the...
4
by: Jim Bancroft | last post by:
Hi everyone, I've been working with ASP.Net for about a month, and in all the samples I've seen the authors know ahead of time how many DropDownLists or Labels they're going to need. My...
5
by: Alex Maghen | last post by:
I frequently find myself wanting to insert some basic client-side JavaScript functions in the page of an ASPX of mine. But I find it so frustrating that I have to actually contruct my JavaScript in...
3
by: henk | last post by:
Hey, Question, how can i create client-side javascript that refers to a asp.net webcontrol. For example set the focus of a textbox lik this. <asp: TextBox ID="Textbox1" /> (client side)...
3
by: Andy | last post by:
Hi folks, I have a customvalidator control that works properly if it isn't contained in an ASP:TABLE. But, when I place it inside an ASP:TABLE, I find that _ServerValidate doesn't get fired,...
2
by: Jay | last post by:
I have a web app that uses some javaScript behaviors (using the createCallOptions method) that go off and call webmethods and return/ display data on the web page. When I introduced the...
0
by: reema | last post by:
EJB Interview Questions http://interviewdoor.com/technical/EJB-Interview-Questions.htm CSS Interview Questions http://interviewdoor.com/technical/CSS-Interview-Questions.htm C Interview Questions...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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.