Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RenderControl issue

Status
Not open for further replies.

tshad

Programmer
Jul 15, 2004
386
US
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
 
What are you doing this in? This doesnt look like an SQL question.

----------------------------------------

Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind - Bernard Baruch

Computer Science is no more about computers than astronomy is about telescopes - EW Dijkstra
----------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top