Forcing .NET to render the '/aspnet_client/system_web/1_0_3705_0/WebUIValidation.js' on the web page

  • Thread starter Thread starter Art Thomas
  • Start date Start date
A

Art Thomas

We are using our own custom JavaScript validation as well as .Net
validation. However, when we include our custom validation on a page,
..NET does not render/write the
'/aspnet_client/system_web/1_0_3705_0/WebUIValidation.js' path on the
page. If we do not include our own custom JavaScript validation, .NET
DOES render/write the
'/aspnet_client/system_web/1_0_3705_0/WebUIValidation.js' path on the
page.

I would like to make sure the path gets rendered automatically. Can I
force this to happen? I do not want to hardcode the path on the page.
I would also settle for setting it dynamically. However, I have been
unsuccessful reading the path from the machine.config file and rendering
the path
<webControls clientScriptsLocation="/aspnet_client/{0}/{1}/"/>

Any thoughts.
 
For our custom validation we are including the custom javascript in the
header tag of ASP.NET pages. However, I want to clarify what I mean
when I say rendering. I consider the dynamic creation and inclusion of
the '/aspnet_client/system_web/1_0_3705_0/WebUIValidation.js' path on
the page rendering. We DO NOT do this. I was relying on .NET to handle
this.
For our validation, the javascript code is on the page. Some of our
fields incorporate the required field validation included as part of
.NET. This is the code that is looking for the path to the use
"WebUIValidation.js" page but the path was never rendered to the page.
 
When using a ASP.NET CustomValidator, which runs client-side javascript,
and using other ASP.NET validators (i.e. RequiredField, Compare, etc.)
the <script language="javascript"
src="http://servername/aspnet_client/system_web/1_0_3705_0/WebUIValidati
on.js"></script> tag needed for the other .NET validators to work is not
rendered. On other pages without the ASP.NET CustomValidator that tag
is rendered. This is the only difference we can find between pages that
function properly and the ones that don't. I interpret what you meant
by BaseValidator as an ASP.NET validator that comes with the IDE. It
seems there should be a simple way to trigger the rendering of this tag
on a page with a CustomValidator considering it is rendered
automatically on other pages.
 
Back
Top