Hi
My inspiration for this question was my discovery of the very annoying default style (border-width: 0px;) on the ImageButton web control. The simple solution is to override it by adding your own style to the control e.g. Style="border-width: 2px;".
How every, it would have been nice to just make a simple control adapter that would j...
My understand of Control Adapters is that they're designed to allow different HTML rendering for different browsers (thus, you register them in the .browsers file...).
However, it appears people are just registering adapters for the default browser and are using them to generally override the Render method of ASP.Net controls.
Do you b...
I have a radio button control adaptor that attempts to render the radio button control with the CSS class as part of the input tag, rather than as a surrounding span.
public class RadioButtonAdapter : WebControlAdapter
{
protected override void Render(HtmlTextWriter writer)
{
RadioButton targetControl = this.Control as R...
I have confirmed that my Control Adapters are not triggering in Chrome and Safari. I've debugged, and the breakpoints inside the adapters just don't get hit in Chrome/Safari, when they work perfectly find in Firefox/IE. So, for Chrome/Safari, IIS is just ignoring the mapping.
My AdapterMappings.browser file looks like this:
<browsers...
I have been researching this one for awhile. I found several resources on the subject and they all tend to use the same approach - override Page.Render, use the HtmlTextWriter to convert the output into a string, and then use a series of compiled regular expressions to remove the extra whitespace. Here is an example.
Well, I tried it an...