473,383 Members | 1,789 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,383 software developers and data experts.

Error when placing Validators on a DataList Control.

We are using .NET validators on most of our aspx pages.
When the validator is contained within a datalist (i.e.
the EditItemTemplate) the WebUIValidation.js file location
tag is not rendered on the page.

Missing Tag:
<script language="javascript"
src="/aspnet_client/system_web/1_0_3705_0/WebUIValidation.j
s"></script>

When we attempt to edit the item we receive the following
error message:

Error Message:
Unable to find script
library '/aspnet_client/system_web/1_0_3705_0/WebUIValidati
on.js'. Try placing the file manually.
If the validators are located directly on the page and not
in the datalist, the tag is rendered correctly.

1) We can hard code the path on each page but this creates
maintenance issues.

2) If we add a hidden field with a default value and a
required field validator on the page, the tag is
rendered. This is successful but not very clean.

I would like to do one of the following.

1) Trigger the rendering of this tag in code. I have been
unsuccessful in this regard.

2) Dynamically read the file location and render the tag.
I can read the cryptic path "/aspnet_client/{0}/{1}/"
from the machine.config file but I have been unsuccessful
translating it.

Dim configData As IDictionary = context.GetConfig
("system.web/webControls")
Response.Write(configData("clientScriptsLocation") )

We are currently running the .NET Framework 1.0 SP2. Any
thoughts would be greatly appreciated.

Thanks,
Art Kedroski


Nov 17 '05 #1
2 1605

"Art Kedroski" <ke******@eglin.af.mil> wrote in message
news:5f****************************@phx.gbl...
We are using .NET validators on most of our aspx pages.
When the validator is contained within a datalist (i.e.
the EditItemTemplate) the WebUIValidation.js file location
tag is not rendered on the page.

Missing Tag:
<script language="javascript"
src="/aspnet_client/system_web/1_0_3705_0/WebUIValidation.j
s"></script>

When we attempt to edit the item we receive the following
error message:

Error Message:
Unable to find script
library '/aspnet_client/system_web/1_0_3705_0/WebUIValidati
on.js'. Try placing the file manually.
If the validators are located directly on the page and not
in the datalist, the tag is rendered correctly.

1) We can hard code the path on each page but this creates
maintenance issues.

2) If we add a hidden field with a default value and a
required field validator on the page, the tag is
rendered. This is successful but not very clean.

I would like to do one of the following.

1) Trigger the rendering of this tag in code. I have been
unsuccessful in this regard.

2) Dynamically read the file location and render the tag.
I can read the cryptic path "/aspnet_client/{0}/{1}/"
from the machine.config file but I have been unsuccessful
translating it.

Dim configData As IDictionary = context.GetConfig
("system.web/webControls")
Response.Write(configData("clientScriptsLocation") )

We are currently running the .NET Framework 1.0 SP2. Any
thoughts would be greatly appreciated.

Thanks,
Art Kedroski


Do you have Smart Navigation turned on? When I used to on my pages I got
this error all the time. I turned it off and the errors went away :)
Nov 17 '05 #2
Thanks for the feedback. Unfortunately I still get the error popup.
Just to give you a little more history, the browser setting is essential
to recreating the popup error. However, the browser setting does not
affect the rendering of the tag into html. If the setting is changed,
the .js file is cached and the error does not occur. Under any of the
described scenarios, the tag does not get rendered.

Browser setting to recreate the issue: Tools / Internet Options /
Settings / Check for newer versions of stored pages Every visit to the
page.

Art Kedroski
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 17 '05 #3

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

Similar topics

4
by: Ian Cox | last post by:
I have a web form that contains a Datagrid. This grid has a number of columns, one of which contains a text box and validator for that text box. Everything works fine, when I press the "Save"...
6
by: Nathan Sokalski | last post by:
I am using a DataSet as the DataSource of a DataList in my code. The SQL used to get the data from the database begins with: SELECT...
1
by: Nathan Sokalski | last post by:
When I run my application, which uses databinding in a DataList, I recieve the following error: Server Error in '/' Application. ...
2
by: Lisa Calla | last post by:
My aspnet web was working perfectly fine, then I added a second datalist to a page. The datalist can be formatted in the designer and everything looks fine. In the codefile, I can see the...
2
by: ntuyen01 | last post by:
Hi All, I create a long form, (user have to Scroll down to Click the submit button) on the form i have couple fields using the control "RequiredFieldValidator". Now the user click on the...
6
by: Don | last post by:
I have a page with several controls on the page and all except one are hidden. This page works like a wizard by hiding and showing controls has the user clicks next. The control are hidden by...
1
by: Patrick.O.Ige | last post by:
Hi guys, I just moved a project from my pc to a server production (to an ISP). on my pc it all works fine with no errors. After fireing up the first page "default.aspx" i get the error...
2
by: Nathan Sokalski | last post by:
I have a DataList in which the ItemTemplate contains two Button controls that use EventBubbling. When I click either of them I receive the following error: Server Error in '/' Application....
7
by: Jim in Arizona | last post by:
I'm brand new at ajax. In fact, about 20 minutes ago was the first time I got it to work. The problem I'm having on another page did not work, however. I'm running into the following error: ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.