Ask a Question related to ASP.NET General, Design and Development.
-
Art Kedroski #1
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
Art Kedroski Guest
-
Paging for DataList Control
Hi Like datagrid, there is no paging for DataList control How to get paging for datalist? thanks NagaKiran -
DATALIST control
Hello, I have a doubt... I have a TextBox by name txtMessage.Text ,Button by name btnSend and Datalist Control by name dltMessage i my aspx... -
DataList parrent control with a Repeater child control
I've been trying to bind a Repeater 'child control' to a DataList control and seem to have lost the plot. Tec spec: Connection to SQL server 2... -
Validators in a user control
ive made a usercontrol with some textboxes. ive added some required field validators to the textoxes. i made a page with a button and my user... -
Required field validators do not while editing a row in a datagrid present in a composite control
Hi All, I have created a composite control and I have added a datagrid in it. I am dynamically adding an edit column for editing the data. Now I... -
Krissy #2
Re: Error when placing Validators on a DataList Control.
"Art Kedroski" <kedroski@eglin.af.mil> wrote in message
news:5fce01c3579d$bfdd4fe0$a001280a@phx.gbl...Do you have Smart Navigation turned on? When I used to on my pages I got> 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
>
>
>
>
this error all the time. I turned it off and the errors went away :)
Krissy Guest
-
Art Thomas #3
Re: Error when placing Validators on a DataList Control.
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 [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Art Thomas Guest



Reply With Quote

