I have a UserControl that builds a Tree-View Menu using Javascript. This UC does not run as a ServerControl
Then, in every aspx page I include this UC. Everything works perfect, except that if I press ENTER on a aspx, the "Menu" (means, the UserControl) disappears. Of course I can prevent pressing Enter - but the same problem still happens when I try to initialize all Textboxes using this code
private void ClearTextBoxes( Control parent)
foreach (Control c in parent.Controls )
TextBox tb = c as TextBox
if (tb != null)
tb.Text=""
if (c.HasControls( )
ClearTextBoxes( c)
I should be able to make UC loaded (and the Javascript that it contains runing) again. Is there a way to do this ?