I'm trying to add a Javascript function to the onLoad event of a asp:Panel. It goes something like this:
string clickFunction = "$('[id*=lblHiddenPageArray]').text('');"
PagesPanel.Attribues.Add("onLoad", clickFunction);
I'm attaching this function to other controls (Checkboxes and Buttons) and it's working fine. But in the PagesPanel (my asp:Panel control) it HTMLEncodes the function. The output source looks like this:
onLoad="$('[id*=lblHiddenPageArray]').text('');
I've tried to Server.HTMLDecode it on the assignment, but I get the same thing. I've run into this before in .net 4.0. Surely there's a way to escape the characters or something?