<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>ASP.NET 2.0</title>
        <link>http://blogs.ugidotnet.org/franx_blog/category/2193.aspx</link>
        <description>ASP.NET 2.0</description>
        <language>it-IT</language>
        <copyright>Francesco Geri</copyright>
        <managingEditor>fgeri@itconsult.it</managingEditor>
        <generator>Subtext Version 1.9.5.176</generator>
        <item>
            <title>La propriet&amp;agrave; Attributes di un ListItem viene persa nel postback</title>
            <link>http://blogs.ugidotnet.org/franx_blog/archive/2008/07/21/93479.aspx</link>
            <description>&lt;p&gt;Definiamo una pagina aspx con un controllo DropDownList al quale aggiungiamo un dei ListItem da codice.&lt;/p&gt;  &lt;p&gt;Vogliamo creare i ListItem con un attributo per memorizzare una informazione che ci interessa:&lt;/p&gt;  &lt;p&gt;&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof1252\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Consolas;}}{\colortbl;??\red0\green0\blue0;\red255\green255\blue255;\red43\green145\blue175;\red0\green0\blue255;\red163\green21\blue21;}??\fs22 \tab \tab \tab \tab \tab \tab \tab \tab \cf3 ListItem\cf0  item;\par ??\tab \tab \tab \tab \tab \tab \tab \tab item = \cf4 new\cf0  \cf3 ListItem\cf0 (\cf5 "Valore 1"\cf0 , \cf5 "V1"\cf0 );\par ??\tab \tab \tab \tab \tab \tab \tab \tab item.Attributes.Add(\cf5 "MyCustomAttribute"\cf0 , \cf5 "CUSTOM 1"\cf0 );\par ??\tab \tab \tab \tab \tab \tab \tab \tab \cf4 this\cf0 .MyDropDownList.Items.Add(item);\par ??\tab \tab \tab \tab \tab \tab \tab \tab item = \cf4 new\cf0  \cf3 ListItem\cf0 (\cf5 "Valore 2"\cf0 , \cf5 "V2"\cf0 );\par ??\tab \tab \tab \tab \tab \tab \tab \tab item.Attributes.Add(\cf5 "MyCustomAttribute"\cf0 , \cf5 "CUSTOM 2"\cf0 );\par ??\tab \tab \tab \tab \tab \tab \tab \tab \cf4 this\cf0 .MyDropDownList.Items.Add(item);\par ??}
--&gt;&lt;/p&gt;  &lt;div style="font-size: 11pt; background: white; color: black; font-family: consolas"&gt;   &lt;p style="margin: 0px"&gt;&lt;span style="color: #2b91af"&gt;ListItem&lt;/span&gt; item;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;item = &lt;span style="color: blue"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af"&gt;ListItem&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"Valore 1"&lt;/span&gt;, &lt;span style="color: #a31515"&gt;"V1"&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin: 0px"&gt;item.Attributes.Add(&lt;span style="color: #a31515"&gt;"MyCustomAttribute"&lt;/span&gt;, &lt;span style="color: #a31515"&gt;"CUSTOM 1"&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;this&lt;/span&gt;.MyDropDownList.Items.Add(item);&lt;/p&gt;    &lt;p style="margin: 0px"&gt;item = &lt;span style="color: blue"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af"&gt;ListItem&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"Valore 2"&lt;/span&gt;, &lt;span style="color: #a31515"&gt;"V2"&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin: 0px"&gt;item.Attributes.Add(&lt;span style="color: #a31515"&gt;"MyCustomAttribute"&lt;/span&gt;, &lt;span style="color: #a31515"&gt;"CUSTOM 2"&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;this&lt;/span&gt;.MyDropDownList.Items.Add(item);&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Mettiamo in esecuzione e ci accorgiamo che l'attributo viene perso al primo postback.&lt;/p&gt;  &lt;p&gt;Sembra si tratti di un un baco o giù di lì, in quanto l'oggetto DropDownList non salva nel ViewState la collezione degli attributes dei ListItem contenuti.&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;L'alternativa potrebbe essere di ri-definire il proprio DropDownList che si preoccupi di salvere e poi rileggere quelle informazioni.&lt;/p&gt;  &lt;p&gt;Ecco un paio di esempi/post di come fare: &lt;/p&gt;  &lt;p&gt;&lt;a title="http://weblogs.asp.net/fmarguerie/archive/2003/02/27/3103.aspx" href="http://weblogs.asp.net/fmarguerie/archive/2003/02/27/3103.aspx"&gt;http://weblogs.asp.net/fmarguerie/archive/2003/02/27/3103.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="http://aspnet.4guysfromrolla.com/articles/091405-1.aspx" href="http://aspnet.4guysfromrolla.com/articles/091405-1.aspx"&gt;http://aspnet.4guysfromrolla.com/articles/091405-1.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;Da quardare anche nella KB di Microsoft il suggerimento seguente:&lt;/p&gt;  &lt;p&gt;&lt;a title="http://support.microsoft.com/default.aspx?scid=kb;en-us;Q309338" href="http://support.microsoft.com/default.aspx?scid=kb;en-us;Q309338"&gt;http://support.microsoft.com/default.aspx?scid=kb;en-us;Q309338&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.ugidotnet.org/franx_blog/aggbug/93479.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Francesco Geri</dc:creator>
            <guid>http://blogs.ugidotnet.org/franx_blog/archive/2008/07/21/93479.aspx</guid>
            <pubDate>Mon, 21 Jul 2008 12:38:35 GMT</pubDate>
            <wfw:comment>http://blogs.ugidotnet.org/franx_blog/comments/93479.aspx</wfw:comment>
            <comments>http://blogs.ugidotnet.org/franx_blog/archive/2008/07/21/93479.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://blogs.ugidotnet.org/franx_blog/comments/commentRss/93479.aspx</wfw:commentRss>
            <trackback:ping>http://blogs.ugidotnet.org/franx_blog/services/trackbacks/93479.aspx</trackback:ping>
        </item>
        <item>
            <title>Se la build di un progetto funziona in debug e fallisce in Release...</title>
            <link>http://blogs.ugidotnet.org/franx_blog/archive/2007/04/02/74495.aspx</link>
            <description>Oggi mi è capitato un problemino con un progetto di un webservice. 
&lt;br&gt;&lt;br&gt;
Il progetto faceva riferimento ad una dll che stava su un percorso di rete condiviso, all'interno della mia intranet.&lt;br&gt;
Capitava che quando facevo la Build del progetto in modalità Debug tutto funzionava bene, mentre in Release falliva...&lt;br&gt;

&lt;img src="http://blogs.ugidotnet.org/franx_blog/aggbug/74495.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Francesco Geri</dc:creator>
            <guid>http://blogs.ugidotnet.org/franx_blog/archive/2007/04/02/74495.aspx</guid>
            <pubDate>Tue, 03 Apr 2007 05:33:00 GMT</pubDate>
            <wfw:comment>http://blogs.ugidotnet.org/franx_blog/comments/74495.aspx</wfw:comment>
            <comments>http://blogs.ugidotnet.org/franx_blog/archive/2007/04/02/74495.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://blogs.ugidotnet.org/franx_blog/comments/commentRss/74495.aspx</wfw:commentRss>
            <trackback:ping>http://blogs.ugidotnet.org/franx_blog/services/trackbacks/74495.aspx</trackback:ping>
        </item>
        <item>
            <title>Alla ricerca del Tab ASP.NET scomparso da IIS Manager</title>
            <link>http://blogs.ugidotnet.org/franx_blog/archive/2007/03/23/73684.aspx</link>
            <description>&lt;P&gt;Ciao, pu&amp;#242; capitare a causa di non so bene cosa (ma potete vedere &lt;A href="http://dotnet.org.za/ahmeds/archive/2005/04/26/19028.aspx" target=_blank&gt;qui&lt;/A&gt; o &lt;A href="http://www.eggheadcafe.com/forumpost.aspx?topicid=6&amp;amp;forumpostid=20592" target=_blank&gt;qui&lt;/A&gt; o &lt;A href="http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=119449" target=_blank&gt;qui&lt;/A&gt; o &lt;A href="http://www.kbalertz.com/kb_919283.aspx" target=_blank&gt;qui&lt;/A&gt; alcuni esempi) che scompaia da IIS Manager il tab ASP.NET, da cui poter ad esempio scegliere se usare il framework 2.0 o precedente.&lt;/P&gt;
&lt;P&gt;In questi casi potete provare a cancellare alcune chiavi di registro, cito:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#006400 size=2&gt;Microsoft comments: If a previous version was not uninstalled correctly, please regedit eliminate all versions except 2.0.0.0 in the following locations:&lt;BR&gt;&lt;FONT color=#a52a2a&gt;HKEY_CLASSES_ROOT\CLSID\{7D23CCC6-A390-406E-AB67-2F8B7558F6F6}\InprocServer32\&lt;BR&gt;HKEY_CLASSES_ROOT\CLSID\{FD5CD8B1-6FE0-44F3-BBFB-65E3655B096E} \InprocServer32\&lt;BR&gt;HKEY_CLASSES_ROOT\CLSID\{FEDB2179-2335-48F0-AA28-5CDA35A2B36D}\InprocServer32\&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;Oppure provare questo simpatico tool &lt;A href="http://www.denisbauer.com/NETTools/ASPNETVersionSwitcher.aspx" target=_blank&gt;ASP.NET Version Switcher&lt;/A&gt;:&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;&lt;IMG src="http://www.denisbauer.com/NETTools/ASPNETVersionSwitcher.jpg"&gt;&lt;/P&gt;&lt;img src="http://blogs.ugidotnet.org/franx_blog/aggbug/73684.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Francesco Geri</dc:creator>
            <guid>http://blogs.ugidotnet.org/franx_blog/archive/2007/03/23/73684.aspx</guid>
            <pubDate>Sat, 24 Mar 2007 00:46:00 GMT</pubDate>
            <wfw:comment>http://blogs.ugidotnet.org/franx_blog/comments/73684.aspx</wfw:comment>
            <comments>http://blogs.ugidotnet.org/franx_blog/archive/2007/03/23/73684.aspx#feedback</comments>
            <wfw:commentRss>http://blogs.ugidotnet.org/franx_blog/comments/commentRss/73684.aspx</wfw:commentRss>
            <trackback:ping>http://blogs.ugidotnet.org/franx_blog/services/trackbacks/73684.aspx</trackback:ping>
        </item>
        <item>
            <title>[ASP.NET 2.0] Master Page e l'ID del form perduto!</title>
            <link>http://blogs.ugidotnet.org/franx_blog/archive/2006/11/15/54789.aspx</link>
            <description>Migrando in ASP.NET 2.0 una mia appicazione fatta in ASP.NET 1.1 mi sono imbattuto in una situazione un po' spiacevole...

Se una webform ASP.NET 2.0 ha una master page con un certo form quando viene renderizzata quel form avrà come ID la costante "aspnetForm"!

[vedi il resto &lt;a href="http://blogs.ugidotnet.org/franx_blog/archive/2006/11/15/54789.aspx"&gt;qui&lt;/a&gt;...]&lt;img src="http://blogs.ugidotnet.org/franx_blog/aggbug/54789.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Francesco Geri</dc:creator>
            <guid>http://blogs.ugidotnet.org/franx_blog/archive/2006/11/15/54789.aspx</guid>
            <pubDate>Thu, 16 Nov 2006 06:06:00 GMT</pubDate>
            <wfw:comment>http://blogs.ugidotnet.org/franx_blog/comments/54789.aspx</wfw:comment>
            <comments>http://blogs.ugidotnet.org/franx_blog/archive/2006/11/15/54789.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://blogs.ugidotnet.org/franx_blog/comments/commentRss/54789.aspx</wfw:commentRss>
            <trackback:ping>http://blogs.ugidotnet.org/franx_blog/services/trackbacks/54789.aspx</trackback:ping>
        </item>
        <item>
            <title>ASP.NET 2.0: Cedo DLL generica Asp_Code.dll per DLL personalizzata myCustomWebServiceConIlNomeCheVoglioIo.dll</title>
            <link>http://blogs.ugidotnet.org/franx_blog/archive/2006/08/03/45816.aspx</link>
            <description>Ciao! 
Sono in ritardo di una vita, la maglia rosa è a 2 ore, ma finalmente anch'io ho "deciso" di lavorare un po' in ASP.NET 2.0!!

Creando in VS2005 un progettino di un web service ho notato che al momento della pubblicazione viene creata una DLL di nome App_Code.dll nella cartella \bin.

[...c'è dell'altro e lo puoi trovare &lt;a href="http://blogs.ugidotnet.org/franx_blog/archive/2006/08/03/45816.aspx"&gt;qui&lt;/a&gt;...]&lt;img src="http://blogs.ugidotnet.org/franx_blog/aggbug/45816.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Francesco Geri</dc:creator>
            <guid>http://blogs.ugidotnet.org/franx_blog/archive/2006/08/03/45816.aspx</guid>
            <pubDate>Thu, 03 Aug 2006 23:52:00 GMT</pubDate>
            <wfw:comment>http://blogs.ugidotnet.org/franx_blog/comments/45816.aspx</wfw:comment>
            <comments>http://blogs.ugidotnet.org/franx_blog/archive/2006/08/03/45816.aspx#feedback</comments>
            <wfw:commentRss>http://blogs.ugidotnet.org/franx_blog/comments/commentRss/45816.aspx</wfw:commentRss>
            <trackback:ping>http://blogs.ugidotnet.org/franx_blog/services/trackbacks/45816.aspx</trackback:ping>
        </item>
    </channel>
</rss>