A
Axel Dahmen
Hi,
I've added a couple of validators to my page. Now I get a couple of Runtime
Errors when I load the page (I have "Show client-script errors" enabled in
IE6):
"A Runtime Error has occurred. Do you wish to debug? Line: ... Error:
Expected ';'"
This shouldn't happen. Adding the validators to the pages has changed
"something" but I don't understand what. Now I have a couple of questions
and hopefully someone can enlighten me on this:
* In my code-behind I've added an onclick event handler to one of the
buttons, like "return DoSomething()", having DoSomething() returning false
so that the button doesn't cause a postback. ASP.NET puts validation code
BEHIND my code - so the validation code never gets executed. How can I
change this?
* Actually for this button I don't need to go through validation as it just
opens a pop-up window. So I set CausesValidation="False" which keeps ASP.NET
from adding validation code to the button. Still the JavaScript Runtime
Error occurs when the page reaches the onclick event on load - why?
* The IE error message offers me to debug by providing me with two buttons:
Yes/No. If I click "Yes", nothing happens, i.e. execution is not brought
into Visual Studio - why?
I'm baffled. I'd really appreciate if someone could give me some answers on
these issues.
TIA,
Axel Dahmen
I've added a couple of validators to my page. Now I get a couple of Runtime
Errors when I load the page (I have "Show client-script errors" enabled in
IE6):
"A Runtime Error has occurred. Do you wish to debug? Line: ... Error:
Expected ';'"
This shouldn't happen. Adding the validators to the pages has changed
"something" but I don't understand what. Now I have a couple of questions
and hopefully someone can enlighten me on this:
* In my code-behind I've added an onclick event handler to one of the
buttons, like "return DoSomething()", having DoSomething() returning false
so that the button doesn't cause a postback. ASP.NET puts validation code
BEHIND my code - so the validation code never gets executed. How can I
change this?
* Actually for this button I don't need to go through validation as it just
opens a pop-up window. So I set CausesValidation="False" which keeps ASP.NET
from adding validation code to the button. Still the JavaScript Runtime
Error occurs when the page reaches the onclick event on load - why?
* The IE error message offers me to debug by providing me with two buttons:
Yes/No. If I click "Yes", nothing happens, i.e. execution is not brought
into Visual Studio - why?
I'm baffled. I'd really appreciate if someone could give me some answers on
these issues.
TIA,
Axel Dahmen