ValidationSummary issue

H

Hardy Wang

Hi,
I have some validations on a page, some of them are CustomValidation
which will go to server to do some complex logic.
I set the ValidationSummary.ShowMessageBox = true, but message box won't
popup. After I do a research over net, I found it is a bug from MS. Anybody
has good work-around? I know I can loop through each validation control to
check statuses of them, then build a JavaScript to register on client side.
Any better idea?


Thanks!
 
G

Guest

Actually, this link is pretty much useless since it does not directly address
the issue.
 
R

redhair

I don't know if it's a bug of .Net Framework, but I found a work-around:
Just add following Javascript in the buttom of the .aspx page.
<script LANGUAGE="Javascript">
<!--
ValidationSummaryOnSubmit();
//-->
</script>

Let me know if it does solve this issue.
 
G

Guest

Here is a work-around.
Add following JavaScript in the bottom of the html tag.
<Script Language=JavaScript>
<!--
ValidationSummaryOnSubmit();
//-->
</Script

User submitted from AEWNET (http://www.aewnet.com/)
 
R

redhair

Since the ValidationSummaryOnSubmit() is a built-in function from the
WebUIValidation.js
The system should place the Javascript block automatically based on which
version .Net Framework
was registered and mapped to IIS, if not, the browser will pop up a window
to show following message:
Unable to find script library
'/aspnet_client/system_web/1_1_4322/WebUIValidation.js'. Try placing this
file manually, or reinstall by running 'aspnet_regiis -c'.
 
G

Guest

A workaround that does seem to be effective is to place the following code
inside the form tag:

<script language="javascript" type="text/javascript"
src="/aspnet_client/system_web/1_1_4322/WebUIValidation.js"></script>

The problem with this solution is that the version is hard-coded.
 
J

johanngunn

Hardy said:
*Hi,
I have some validations on a page, some of them are CustomValidation
which will go to server to do some complex logic.
I set the ValidationSummary.ShowMessageBox = true, but message box
won't
popup. After I do a research over net, I found it is a bug from MS.
Anybody
has good work-around? I know I can loop through each validation
control to
check statuses of them, then build a JavaScript to register on client
side.
Any better idea?


Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top