Denis Bauer

ASP.NET, .NET Framework and Longhorn stuff

February 2005 - Posts

Announcing Reflector.SQL2005Browser

Reflector.SQL2005Browser

The SQL 2005 Assembly Browser is a little add-in for Lutz Roeder's .NET Reflector that can be used to browse .NET assemblies stored in a SQL Server 2005 (Yukon) database.
You can connect your local Reflector installation to a remote SQL Server instance, list the databases and its assemblies and download them directly into .NET Reflector.

Snapshot of Reflector.SQL2005Browser

http://www.denisbauer.com/NETTools/SQL2005Browser.aspx

Differences between System.Web.UI.LiteralControl and System.Web.UI.WebControls.Literal

Mike Ogden pointed out the fact that the DynamicControlsPlaceholder (DCP) does not correctly recreate System.Web.UI.LiteralControl. At first I was very perplexed because I was somehow sure that I successfully tried that before. However, I must have mixed it up with the System.Web.UI.WebControls.Literal which works without problems.

That raises the question why there are two different controls and how they differ. The major difference is that the LiteralControl does not persist the Text property in ViewState, which is why it is recreated emptily by the DCP. The Literal, however, takes a LiteralControl as a child and saves its Text in ViewState:

protected override void AddParsedSubObject(object obj)
{
if (!(obj is LiteralControl))
{
throw new HttpException(HttpRuntime.FormatResourceString(
"Cannot_Have_Children_Of_Type", "Literal", obj.GetType().Name.ToString()));
}
this.Text = ((LiteralControl) obj).Text;
}

So, if you want to use literal controls with the DynamicControlsPlaceholder make sure that you use Literal instead of LiteralControl.

Posted: Feb 08 2005, 07:41 PM by DBauer | with 4 comment(s) |
Filed under:
More Posts