Remove language attribute from HtmlInputButton

J

Jonas

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top