ALL’UNA E TRENTACINQUE CIRCA – Vinicio Capossela

[…]
Che strana razza e’ poi il cliente
c’e’ quello bello e intelligente
c’e’ il casinaro e l’invadente
c’e’ chi ascolta trasognato
c’e’ chi urla e sta sbracato
c’e’ chi la donna se la intorta
c’e’ chi gli fa la mano morta
ma c’e’ il cliente piu’ divino
il piu’ richiesto e il piu’ invitante
e’ quello che offre, paga a tutti e fa il brillante
[…]

ContentPlaceHolder ID and Page Size

We don’t always think about the size of a web page, but when you need the top performance from a web site, you need to consider this aspect too.
I was trying to reduce my page size and I founded some interesting articles about how to remove the ViewState from the page and move it to the user cache (http://www.eggheadcafe.com/articles/20040613.asp) without loosing performance time, or compress javascript files in different way (http://rumkin.com/tools/compression/compress_huff.php; http://www.creativyst.com/Prod/3/; http://www.west-wind.com/WebLog/posts/10294.aspx).
But today I founded something more: how to save page size changing IDs of your controls.
In my pages I have many Repeater and Controls that implements the INamingContainer interface. what does it means? It means that when Asp.Net generate the client side control all the client controls they have a long name made by Parent.UniqueID+"_"+Parent.UniqueID+"_"+Parent.UniqueID+[…]+Child.UniqueID.

[DesignerSerializationVisibility(
DesignerSerializationVisibility.Hidden),
Browsable(false),
WebSysDescription("Control_ClientID")] public virtual string ClientID { get { this.EnsureID(); string uniqueID = this.UniqueID; if ((uniqueID != null) &&
(uniqueID.IndexOf(this.IdSeparator) >= 0)) { return uniqueID
.Replace(this.IdSeparator, '_'); } return uniqueID; } }

So, if one of the parent controls have a long UniqueID, and you have a Repeater inside this control, all the controls inside the repeater will be rendered with a long ClientID.
Just to made an example, I changed on my Default.master
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server"/>
to
<asp:ContentPlaceHolder ID="CPH" runat="server"/>
and the page size is decreased from 78K to 75K, 4% of the page size only changing one ID… isn’t it unbelievable??

8 settembre 2007: VAFFANCULO DAY

 

8 settembre 2007: VAFFANCULO DAY

L’8 settembre sarà il giorno del Vaffanculo day, o V-Day. Una via di mezzo tra il D-Day dello sbarco in Normandia e V come Vendetta. Si terrà sabato otto settembre nelle piazze d’Italia, per ricordare che dal 1943 non è cambiato niente. Ieri il re in fuga e la Nazione allo sbando, oggi politici blindati nei palazzi immersi in problemi “culturali”. Il V-Day sarà un giorno di informazione e di partecipazione popolare.

Beppe Grillo

"On September 8, I will organise a demonstration in every Italian city. I’ve called it Vaffanculo Day. It’s half way between D-day of Normandy landings and V for Vendetta. It’ll be on Saturday September 8th in the squares of Italy to remind us that nothing hase changed since 1943. Yesterday it was the King fleeing and the Nation was breaking up, today politicians preotected in their buildings immersed in "cultural" problems. V-Day will be a day for information and popular anticipation."

Beppe Grillo

VS2008

Today is the day!!! 😀
I’ve just installed VS2008 and I’m trying to use it to build and modify my .net 2.0 project.
My project is composed by 2 web sites and 14 class library, so, the first time I opened the project using Visual Studio 2008, it run the upgrade wizard. I was a bit scared about that, but in the end it seems to modify only the *.csproj files adding those elements on the PropertyGroup Element :
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation>
</UpgradeBackupLocation>

I’m pretty sure the first conversion I did OldToolsVersion was 2.0, but… I’ll go deep into this.

For now, after the first day of use it seems to be a stable IDE.