469,934 Members | 1,846 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,934 developers. It's quick & easy.

Remove language attribute from HtmlInputButton

Hi!

I'm working with an ASP.NET web site that needs to conform with XHTML 1.0
Transitional and got an ASP.NET HtmlInputButton which automatically adds the
attribute language="javascript" which isn't allowed in XHTML. I've tried to
remove this attribute by executing

QuickSearchButton.Attributes["language"] = ""; or
QuickSearchButton.Attributes["language"] = null; or
QuickSearchButton.Attributes.Remove("language");

in either Page_Load or QuickSearchButton_PreRender, but it does not work. I
can add a new custom attribute, so I know that I can access the control.

I found some postings about using a filter when outputting the response
stream, but that seems to be overkill for just this issue. Before I start
hacking away, I have some questions:

1. Is it possible to build the control entirely from code-behind without
a language attribute ?

2. Could I perhaps use .RenderControl and filter the output there?

3. Is there any other way to accomplish this?

Brgds

Jonas
Nov 18 '05 #1
0 1035

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Erwin Moller | last post: by
37 posts views Thread by Jan Wagner | last post: by
2 posts views Thread by SAL | last post: by
11 posts views Thread by Richard Maher | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.