By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,870 Members | 2,400 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,870 IT Pros & Developers. It's quick & easy.

Remove language attribute from HtmlInputButton

P: n/a

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

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?


Nov 18 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.