XML Parsing Error

XML Parsing Error

I just want to share a possible fix for this odd error. In my case it was a silly if statement in which i decide if MyPanel control should be rendered or not. However i missed the name of the panel control so i ended up with this XML Parsing Error. After i while i figured out that i have an error in the code-behind that looked like the following:

If condition = True Then
   MyPanel.Visible = True
Else
   Visible = False
End Try

Once i changed to the below it worked like a charm.

If condition = True Then
   MyPanel.Visible = True
Else
   MyPanel.Visible = False
End Try

Hope this helps to someone at least