<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>C# on Andrea Azzola</title><link>https://andreaazzola.com/tags/c%23/</link><description>Recent content in C# on Andrea Azzola</description><generator>Hugo -- 0.150.1</generator><language>en-us</language><lastBuildDate>Tue, 06 May 2014 00:00:00 +0000</lastBuildDate><atom:link href="https://andreaazzola.com/tags/c%23/index.xml" rel="self" type="application/rss+xml"/><item><title>Logging con NLog e SQLite</title><link>https://andreaazzola.com/it/logging-nlog-sqlite/</link><pubDate>Tue, 06 May 2014 00:00:00 +0000</pubDate><guid>https://andreaazzola.com/it/logging-nlog-sqlite/</guid><description>&lt;p align="center"&gt;&lt;img src="https://andreaazzola.com/images/nlogsqlite_love-1.png" loading="lazy" alt=""&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;img src="https://andreaazzola.com/images/nlogsqlite_nlog-1.png" loading="lazy" alt=""&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;img src="https://andreaazzola.com/images/nlogsqlite_sqlite-1.png" loading="lazy" alt=""&gt;&lt;/p&gt;
&lt;p&gt;Questo articolo spiega come ottenere una soluzione di logging portabile ed elegante grazie all&amp;rsquo;uso di &lt;strong&gt;NLog&lt;/strong&gt; e &lt;strong&gt;SQLite&lt;/strong&gt;, su piattaforma .NET e con poche configurazioni.&lt;/p&gt;
&lt;h2 id="nlog"&gt;NLog&lt;/h2&gt;
&lt;p&gt;&lt;a href="http://nlog-project.org/"&gt;NLog&lt;/a&gt; è una libreria di logging leggera e gratuita che supporta l&amp;rsquo;ecosistema .NET (Silverlight, Windows Phone, ecc.). Costituisce un&amp;rsquo;opzione eccellente per un ampio range di scenari: dalle semplici utilities quotidiane a servizi critici di produzione. Consente di avere multipli target, siano essi file, database, console, rete o email.&lt;/p&gt;</description></item><item><title>Logging with NLog and SQLite</title><link>https://andreaazzola.com/post/logging-nlog-sqlite/</link><pubDate>Tue, 06 May 2014 00:00:00 +0000</pubDate><guid>https://andreaazzola.com/post/logging-nlog-sqlite/</guid><description>&lt;p align="center"&gt;&lt;img src="https://andreaazzola.com/images/nlogsqlite_love-1.png" loading="lazy" alt=""&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;img src="https://andreaazzola.com/images/nlogsqlite_nlog-1.png" loading="lazy" alt=""&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;img src="https://andreaazzola.com/images/nlogsqlite_sqlite-1.png" loading="lazy" alt=""&gt;&lt;/p&gt;
&lt;p&gt;This article explains how to achieve a portable and elegant &lt;em&gt;logging&lt;/em&gt; solution with &lt;strong&gt;NLog&lt;/strong&gt; and &lt;strong&gt;SQLite&lt;/strong&gt; on the .NET platform with a few configurations.&lt;/p&gt;
&lt;h2 id="nlog"&gt;NLog&lt;/h2&gt;
&lt;p&gt;NLog is a free, lightweight logging library for .NET. It supports many targets (files, databases, console, network, email, and more). &lt;a href="https://nlog-project.org/" target="_blank" rel="noopener"&gt;nlog-project.org&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Install (NuGet Package Manager Console)&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-powershell" data-lang="powershell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;PM&amp;gt; Install-Package NLog
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="sqlite"&gt;SQLite&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://www.sqlite.org/" target="_blank" rel="noopener"&gt;SQLite&lt;/a&gt; is a simple embedded database engine. No separate server daemon is required; the database is a single file (e.g., &lt;code&gt;.db3&lt;/code&gt;).&lt;/p&gt;</description></item><item><title>Using an ajax:ModalPopup Without a TargetControl</title><link>https://andreaazzola.com/post/using-ajax-modalpopup-targetcontrol/</link><pubDate>Tue, 25 Sep 2007 00:00:00 +0000</pubDate><guid>https://andreaazzola.com/post/using-ajax-modalpopup-targetcontrol/</guid><description>&lt;p&gt;The &lt;strong&gt;ModalPopup&lt;/strong&gt; extender usually requires a control for firing up, set through the &lt;em&gt;TargetControlID&lt;/em&gt; property. However, sometimes you may want to show and hide the panel programmatically. All you need is a fake activator, like the following:&lt;/p&gt;
&lt;h2 id="the-extender"&gt;The Extender&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;&amp;lt;ajax:ModalPopupExtender&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;ID=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;mpeInfo&amp;#34;&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;runat=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;server&amp;#34;&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;TargetControlID=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;divFakeActivator&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#a6e22e"&gt;PopupControlID=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;pnlInfo&amp;#34;&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;CancelControlID=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;bttInfoClose&amp;#34;&lt;/span&gt; &lt;span style="color:#f92672"&gt;/&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="the-panel"&gt;The Panel&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;&amp;lt;asp:Panel&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;ID=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;pnlInfo&amp;#34;&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;runat=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;server&amp;#34;&lt;/span&gt;&lt;span style="color:#f92672"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; Hello World!!!
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;&amp;lt;/asp:Panel&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="the-c-code"&gt;The C# code&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-csharp" data-lang="csharp"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;// Show and hide programmatically&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;mpeInfo.Show();
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;mpeInfo.Hide();
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note (2025):&lt;/strong&gt; This post reflects an older ASP.NET AJAX pattern. In modern frameworks you would likely manage modal dialogs through client‑side libraries (e.g., Bootstrap, React, Blazor components).&lt;/p&gt;</description></item></channel></rss>