Ask a Question related to ASP.NET Building Controls, Design and Development.
-
Peter Blum #1
XHTML and custom attributes
I'm planning my strategy to be XHTML ready for "Whidbey". My ASP.NET
controls have a lot of client-side scripting. Sometimes I pass along custom
attributes as data for my scripts to use. Those attributes appear in the
normal HTML tag. For example:
<input type=text attr1=value1 attr2=value2 />
(I added them through the control's Attributes collection.)
1. Is it legal to add custom attributes to a known tag in an XHTML page? If
so, does the !DOCTYPE XHTML 1.0 Strict support them?
2. Predefined attributes are supposed to be lowercase names. Are my custom
attributes also supposed to be lowercase?
--- Peter Blum
[url]www.PeterBlum.com[/url]
Email: [email]PLBlum@PeterBlum.com[/email]
Creator of "Professional Validation And More" at
[url]http://www.peterblum.com/vam/home.aspx[/url]
Peter Blum Guest
-
Custom Controls with non-String Attributes
I want to add attributes to my custom controls that are not of type String. I know how to convert from a String to the different types that I want,... -
Designer/attributes for custom DataSource Control?
Hi, I've developed my own datasource control. When I make my datasource control be the datasource of a formview control, I would like the... -
Custom Control does not allow access to Attributes
I built a custom control for all the basic web.ui.controls like textbox, label, checkbox etc etc. I added my custom attribute called ApplySecurity... -
XmlAttributeOverrides with Custom Attributes?
Dear All, I really enjoy the cleaness of using the build in Serialization of .NET. Now I am sitting with a dillema. I need to limit the Properties... -
Custom TextBox with custom attributes and properties question
I have an webform that has a datarepeater on it. In that repeater I'm binding some data and I have put a textbox control in there. On the... -
Jeffrey Tan[MSFT] #2
RE: XHTML and custom attributes
Hi Peter,
Thank you for posting in the community!
Based on my understanding, you want to know validation about XHtml
==========================================
Actually, you can validate your xhtml through a web of W3 organization,
please refer to:
[url]http://validator.w3.org/[/url]
XHtml will use the DTD to validate the attribute for you, so your custom
attribute will be treated as a valid attribute. So your xhtml file will not
be valid.
The html have build-in attributes collection and build-in html tag
collection, you can not extend them.
For more information, I think you should refer to:
[url]http://www.w3.org/TR/xhtml1/#a_dtd_XHTML-1.0-Strict[/url]
Thank you for your patience and cooperation. If you have any questions or
concerns, please feel free to post it in the group. I am standing by to be
of assistance.
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - [url]www.microsoft.com/security[/url]
This posting is provided "as is" with no warranties and confers no rights.
Jeffrey Tan[MSFT] Guest
-
Jeffrey Tan[MSFT] #3
RE: XHTML and custom attributes
Hi Peter,
Does my reply make sense to you?
If you still have any concern, please feel free to feedback, I will help
you.
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - [url]www.microsoft.com/security[/url]
This posting is provided "as is" with no warranties and confers no rights.
Jeffrey Tan[MSFT] Guest
-
Alessandro Zifiglio #4
Re: XHTML and custom attributes
Peter, I think you might want to change that part where you define custom
attributes. As far as XHML 1.0 strict is concerned you have to declare in
all your pages that you are using a specific doc type and all attributes and
elements are already declared in this doc type. When you specify to be using
the XHTML 1.0 strict doc type your browser automatically goes into the so
called "Strict mode". . . .
Attribute :
An attribute is a parameter to an element declared in the DTD. An
attribute's type and value range, including a possible default value, are
defined in the DTD
The above line implies that you cannot use custom attributes. An attribute
has to be declared in the DTD(Document type). "XHTML family document types
are XML based"
4.2 Element and attribute names must be in lower case
XHTML documents must use lower case for all HTML element and attribute
names. This difference is necessary because XML is case-sensitive e.g. <li>
and <LI> are different tags
For more on the differences btw HTML 4 and XHTML take a look at the
following recommendation on the w3c.
[url]http://www.w3.org/TR/2000/REC-xhtml1-20000126/#xhtml[/url]
"""Jeffrey Tan[MSFT]""" <v-jetan@online.microsoft.com> wrote in message
news:y2onsH$$DHA.836@cpmsftngxa06.phx.gbl...>
> Hi Peter,
>
> Does my reply make sense to you?
>
> If you still have any concern, please feel free to feedback, I will help
> you.
>
> Best regards,
> Jeffrey Tan
> Microsoft Online Partner Support
> Get Secure! - [url]www.microsoft.com/security[/url]
> This posting is provided "as is" with no warranties and confers no rights.
>
Alessandro Zifiglio Guest



Reply With Quote

