I have a panel that I has all my filter object (textboxes, radiobuttons etc). I want to know if anything has changed, so I use the Panel's RenderControl method to get the xml and then will Create a Hash on that. Each time I save the screen, I look to see if anything had changed.
StringBuilder sb;
container.RenderControl(new System.Web.UI.HtmlTextWriter(new System.IO.StringWriter(sb)));
I found that if one of the objects is disabled, the RenderControl doesn't work correctly. It will add a class of aspNetDisabled as many times as the page is refreshed. A textbox may have a class of "aspNetDisabled aspNetDisabled aspNetDisabled aspNetDisabled aspNetDisabled aspNetDisabled aspNetDisabled " if refreshed 6 times.
This is obviously a bug.
Do we know why this happens?
I fixed it by adding a line after the RenderControl:
sb = sb.Replace("aspNetDisabled aspNetDisabled");
This fixes it, but I would like to know why it happens and if it can be fixed.
Thanks,
Tom
StringBuilder sb;
container.RenderControl(new System.Web.UI.HtmlTextWriter(new System.IO.StringWriter(sb)));
I found that if one of the objects is disabled, the RenderControl doesn't work correctly. It will add a class of aspNetDisabled as many times as the page is refreshed. A textbox may have a class of "aspNetDisabled aspNetDisabled aspNetDisabled aspNetDisabled aspNetDisabled aspNetDisabled aspNetDisabled " if refreshed 6 times.
This is obviously a bug.
Do we know why this happens?
I fixed it by adding a line after the RenderControl:
sb = sb.Replace("aspNetDisabled aspNetDisabled");
This fixes it, but I would like to know why it happens and if it can be fixed.
Thanks,
Tom