Monthly Archives

January 2011

XML Parsing Error: No Element Found

IIS 7

I recently came across a pretty weird error. I had a standard ASP.Net page with some HTML markup, some .net controls, etc. , the page was working just fine in IIS7, but in IIS6 I was getting this error in FireFox: XML Parsing Error: no element found, and in IE the page was just loading blank.

After spending hours pulling my hair out trying to figure out this problem, I noticed that ONLY in…

Find first parent control of a specific type using recursion

Just like the title says.  There have been some scenarios where I have had to search a controls parents until I find a specific control of type.  A common example would be within a datagrid.  Say you have a button that fires, and you need to to call Update() on a parent updatePanel.  But you don’t want to do something like so:
protected void btn_Click(object sender, ImageClickEventArgs e)
{…

Copyright © 2013 Krueger Web Design - All rights reserved