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

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.
 
A

Art Thomas

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.
 
A

Art Thomas

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.
 

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

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,821
Latest member
AleidaSchi

Latest Threads

Top