<span> attributes

  • Thread starter Thread starter Ante Perkovic
  • Start date Start date
A

Ante Perkovic

Hi,

I noticed that client-side validation (in IE6) is done with <span>
tags that have the same attributes as in original aspx code
(controlToValidate and others...). I noticed that, when i save
generated html as a new document with html extension and open it in
Visual Studio.NET, the same VS.NET that created them doesn't
recognised those span atributtes (ie.5 shema is used) and marks them
with underline!
How is it possible that VS.NET doesn't recognize its own creation?

Also, i couldn't find any javascript that actually makes validator's
text visible on submit.
Is it done by some javascript code that is inserted in page with some
included .js file or is this functionality included in <span> tag?

Thanks, Ante
 
..Net uses HTML and .Net syntax standards. These extended attributes are not
really part of either world.

..Net uses the fact that you can define your own attributes. The development
environment may underline the "offending" attribute, but you can still use
them.

Check out <Center>...</center> same thing - it doesn't "like" it, but you
can use it. Think of it as a little warning, not as an error.
 
(e-mail address removed) (Ante Perkovic) wrote in
Hi,

I noticed that client-side validation (in IE6) is done with
<span> tags that have the same attributes as in original aspx
code (controlToValidate and others...). I noticed that, when i
save generated html as a new document with html extension and
open it in Visual Studio.NET, the same VS.NET that created them
doesn't recognised those span atributtes (ie.5 shema is used)
and marks them with underline!
How is it possible that VS.NET doesn't recognize its own
creation?

Ante,

controlToValidate is not a standard attribute of the <SPAN> tag. A
browser will ignore any invalid HTML it sees. VS.NET doesn't know
that the controlToValidate attribute was added to the <SPAN> tag by
an ASP.NET validator, so it sees controlToValidate as invalid and
underlines it.
Also, i couldn't find any javascript that actually makes
validator's text visible on submit.
Is it done by some javascript code that is inserted in page with
some included .js file or is this functionality included in
<span> tag?

ASP.NET pages include a JavaScript file located on the server at:

C:\Inetpub\wwwroot\aspnet_client\system_web\1_1_4322

The script's name is WebUIValidation.js. Code in the script
shows/hides the error text from a validator by setting the <SPAN>
tag's style.display property:

http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/
display.asp


Hope this helps.

Chris.
 
Back
Top