<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>net-20 &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://wordpress.com/tag/net-20/</link>
	<description>Feed of posts on WordPress.com tagged "net-20"</description>
	<pubDate>Wed, 20 Aug 2008 22:02:33 +0000</pubDate>

	<generator>http://wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[Blog Shifted]]></title>
<link>http://techaid.wordpress.com/?p=95</link>
<pubDate>Wed, 20 Aug 2008 18:22:55 +0000</pubDate>
<dc:creator>Kumar A.P.P</dc:creator>
<guid>http://techaid.wordpress.com/?p=95</guid>
<description><![CDATA[Its now Sparsham
]]></description>
<content:encoded><![CDATA[<p>Its now <a href="http://sparsham.com" target="_self">Sparsham</a></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Get rid of Regsvr32, Regasm, Gacutil... A Shellextension for .Net and COM dlls]]></title>
<link>http://nishantpant.wordpress.com/?p=131</link>
<pubDate>Tue, 19 Aug 2008 14:35:07 +0000</pubDate>
<dc:creator>Nishant Pant</dc:creator>
<guid>http://nishantpant.wordpress.com/?p=131</guid>
<description><![CDATA[I had originally written a Shellextension for COM dlls, which would give you the option of registeri]]></description>
<content:encoded><![CDATA[<p>I had originally written a Shellextension for COM dlls, which would give you the option of registering/unregistering a dll (if it is a com dll) by right clicking on it. Here is the original post :<a href="http://nishantpant.wordpress.com/wp-admin/post.php?action=edit&#38;post=11">http://nishantpant.wordpress.com/wp-admin/post.php?action=edit&#38;post=11</a></p>
<p>After several years, I finally took out some time and created a Shellextension which works for .Net assemblies as well. These are the few features it has :</p>
<p>1. If you right click on a DLL and if it is a COM Plus dll it will show you the following menu.</p>
<p><a href="http://nishantpant.files.wordpress.com/2008/08/rightclickcomplus.jpg"><img class="size-full wp-image-132" src="http://nishantpant.wordpress.com/files/2008/08/rightclickcomplus.jpg" alt="COM Plus Dlls" /></a>If you click on a COM dll but it is not installed in COM+, then you will get all above options except, the last 3 options which are relevant to COM+ only. Also, if you right clik a COM only dll, then it WILL give you an option called "Create COM+ package".</p>
<p>2. IF you Right click on a dll which is a .Net assembly and is Strong Named as well, you will see the following menu :</p>
<p><a href="http://nishantpant.files.wordpress.com/2008/08/rightclickstrongnamed.jpg"><img class="alignnone size-full wp-image-133" src="http://nishantpant.wordpress.com/files/2008/08/rightclickstrongnamed.jpg" alt="" width="377" height="364" /></a></p>
<p>If you right click on an Assembly which is not Strong Named, you will see all options except GACUTIL</p>
<p>3. If you hover your mouse over a dll which is a .Net dll, you will see some brief information about the dll like below :</p>
<p><a href="http://nishantpant.wordpress.com/files/2008/08/tooltipnet.jpg"><img class="alignnone size-full wp-image-134" src="http://nishantpant.wordpress.com/files/2008/08/tooltipnet.jpg" alt="" width="468" height="334" /></a></p>
<p>4. If you right click on an Assembly, you will see a menu option called "Open with Lutz Reflector". In case you dont know what <a href="http://www.aisto.com/Roeder/DotNet/" target="_blank">Lutz Reflector </a>is, it is an awesome free tool written by Lutz Roeder which disassembles any .Net assembly and shows you the source code in a very easy to view typelibrary browser. Since you could have downloaded Lutz Reflector anywhere in your PC, my shellextension will prompt you for the location just once when you first click on this option. It will then remember the location and will just open the Reflector with your assembly loaded in it.</p>
<p><a href="http://nishantpant.files.wordpress.com/2008/08/lutz.jpg"><img class="alignnone size-full wp-image-135" src="http://nishantpant.wordpress.com/files/2008/08/lutz.jpg" alt="" /></a></p>
<p>Tested with Lutz Reflector 5.1</p>
<p>5. If you go to the thumbnail view of any folder which has dlls, the shellextension analyzes the dlls and puts and changes their icon which helps you identify them. The Shellextension can distinguish between a regular dll, COM dll, .Net 1.0, 1.0, 2.0, 3.0 and 3.5 assembly. See below :</p>
<p><a href="http://nishantpant.wordpress.com/files/2008/08/iconhandler.jpg"><img class="alignnone size-full wp-image-146" src="http://nishantpant.wordpress.com/files/2008/08/iconhandler.jpg" alt="" width="362" height="264" /></a></p>
<p>6. Last but not the least, you can customize the behavior of the dll and turn the ShellExtensions off or on. You can toggle, IconHandler extension, Right Click context menu extension and ToolTip extension. Here is a snapshot of the configuration screen :</p>
<p><a href="http://nishantpant.files.wordpress.com/2008/08/options.jpg"><img class="alignnone size-full wp-image-147" src="http://nishantpant.wordpress.com/files/2008/08/options.jpg" alt="" /></a></p>
<p>This is the first time I am releasing this ShellExtension, so there may be a few bugs in it. I would really appreciate if you can report the bugs to me by leave a comment in this post. I will try to work on them as soon as I can find time.</p>
<p>DOWNLOAD/Setup :</p>
<ul>
<li>Download the ShellExtension : <a href="http://cid-51ddcfc18f827e31.skydrive.live.com/self.aspx/Public/NPShellExtSetup.msi">http://cid-51ddcfc18f827e31.skydrive.live.com/self.aspx/Public/NPShellExtSetup.msi</a></li>
<li>Run the above .MSI file (it is a setup file) to install the Extension. To test right click on any .net assembly or com dll and see if the menu comes up.</li>
<li>PREREQUISITES : .Net Framework 2.0</li>
</ul>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Sample code: Implementing a custom installer for .NET 2.0]]></title>
<link>http://lizsgeekyside.wordpress.com/?p=147</link>
<pubDate>Wed, 13 Aug 2008 22:03:16 +0000</pubDate>
<dc:creator>Liz</dc:creator>
<guid>http://lizsgeekyside.wordpress.com/?p=147</guid>
<description><![CDATA[Implementing a custom installer
This is an example class, which would need to be created in the same]]></description>
<content:encoded><![CDATA[<p><strong><span style="text-decoration:underline;">Implementing a custom installer</span></strong></p>
<p>This is an example class, which would need to be created in the same assembly as the application needing to be installed:</p>
<p style="background-color:#CCEEFF;"><code>[System.ComponentModel.RunInstaller(true)]<br />
class NewInstaller : Installer<br />
{<br />
    public NewInstaller() : base()<br />
    {<br />
        this.Committing += new InstallEventHandler<br />
            (NewInstaller_Committing);<br />
        this.Committed += new InstallEventHandler<br />
            (NewInstaller_Committed);<br />
    }</code><code><br />
    private void NewInstaller_Committing(object sender,<br />
        InstallEventArgs e)<br />
    {<br />
        // Whatever needs to be done before installation<br />
    }<br />
    private void NewInstaller_Committed(object sender,<br />
        InstallEventArgs e)<br />
    {<br />
        // Whatever needs to be done after installation<br />
    }<br />
    public override void Install(IDictionary savedState)<br />
    {<br />
        base.Install(savedState);<br />
    }<br />
    public override void Commit(IDictionary savedState)<br />
    {<br />
        base.Commit(savedState);<br />
    }<br />
    public override void Rollback(IDictionary savedState)<br />
    {<br />
        base.Rollback(savedState);<br />
    }<br />
    public override void Uninstall(IDictionary savedState)<br />
    {<br />
        base.Uninstall(savedState);<br />
    }<br />
}</code></p>
<p><strong><span style="text-decoration:underline;">Launching a custom installer programmatically</span></strong></p>
<p style="background-color:#CCEEFF;"><code>static void Main(string[] args)<br />
{<br />
    IDictionary actions = new Hashtable();<br />
    try<br />
    {<br />
        AssemblyInstaller aInstaller = new AssemblyInstaller<br />
            ("ExampleInstaller.dll", args);<br />
            // or you could use the ComponentInstaller<br />
            // object instead<br />
        aInstaller.UseNewContext = true;<br />
        aInstaller.Install(actions);<br />
        aInstaller.Commit(actions);<br />
    }<br />
    catch (Exception e)<br />
    {<br />
        Console.WriteLine(e.Message);<br />
    }<br />
}<br />
</code></p>
<p><span style="text-decoration:underline;"><strong>Uninstalling or Rolling Back an Installation</strong></span></p>
<p>Replace the <em>Install()</em> method from the previous example with one of the following methods:</p>
<p style="background-color:#CCEEFF;"><code>aInstaller.Uninstall(actions);</code></p>
<p style="background-color:#CCEEFF;"><code>aInstaller.Rollback(actions);</code></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Sql  insert in Csharp]]></title>
<link>http://scriptforall.wordpress.com/?p=31</link>
<pubDate>Wed, 13 Aug 2008 12:51:14 +0000</pubDate>
<dc:creator>kostland</dc:creator>
<guid>http://scriptforall.wordpress.com/?p=31</guid>
<description><![CDATA[
public int insertdata(string forname, string lastname, string email, DateTime birthdate, string cou]]></description>
<content:encoded><![CDATA[<blockquote>
<pre class="alt2" style="border:1px inset;overflow:auto;width:640px;height:498px;margin:0;padding:3px;">public int insertdata(string forname, string lastname, string email, DateTime birthdate, string country, string username, string pword)
        {

            String select = "select * from Player where username='" + username+"'";
            SqlCommand cmd = new SqlCommand(select, conn);
            conn.Open();
            SqlDataReader rows = cmd.ExecuteReader();

            if (rows.HasRows)
            {
                return -1;
            }
            conn.Close();
            String insert = "insert into player (forname,lastname,country,email,birthdate,username,password,lastlogin) values (@forname,@lastname,@country,@email,@birthdate,@username,@password,@lastlogin)";

            cmd = new SqlCommand(insert, conn);
            cmd.Parameters.Add("@forname", System.Data.SqlDbType.VarChar).Value = forname;
            cmd.Parameters.Add("@lastname", SqlDbType.VarChar).Value = lastname;
            cmd.Parameters.Add("@country", SqlDbType.VarChar).Value = country;
            cmd.Parameters.Add("@email", SqlDbType.VarChar).Value = email;
            cmd.Parameters.Add("@birthdate", SqlDbType.DateTime).Value = birthdate;
            cmd.Parameters.Add("@username", SqlDbType.VarChar).Value = username;
            cmd.Parameters.Add("@password", SqlDbType.VarChar).Value = pword;
            cmd.Parameters.Add("@lastlogin", SqlDbType.DateTime).Value = DateTime.Now;

            conn.Open();
            int numRows = cmd.ExecuteNonQuery();
            conn.Close();
            if (numRows == 1)
            {

                return 0;
            }
            else
            {

                return -2;
            }

        }</pre>
</blockquote>
]]></content:encoded>
</item>
<item>
<title><![CDATA[The deep water of ASP .NET 2.0]]></title>
<link>http://hchi.wordpress.com/?p=3</link>
<pubDate>Wed, 13 Aug 2008 00:17:45 +0000</pubDate>
<dc:creator>hchi</dc:creator>
<guid>http://hchi.wordpress.com/?p=3</guid>
<description><![CDATA[Chose ASP .NET 2.0 for a recent web development over LAMP (Linux, Apache, MySQL and PHP), now some r]]></description>
<content:encoded><![CDATA[<p>Chose ASP .NET 2.0 for a recent web development over LAMP (Linux, Apache, MySQL and PHP), now some regret.</p>
<p>Stuff from Microsoft proved to be exciting when reading the features list, but falls short on deliver. I am definitely not an anti-Microsoft and always happy with Visual Studio at least.</p>
<p>Things not like:</p>
<ul>
<li>Widgets/controls with too much limitation to be useful, e.g. unless your UI requirement is minimum, GridView control is just not enough, then the hassle of using Repeater control does not justify over just simply writing your only loop or control.</li>
<li>Did I mention that digging out how these controls mysteriously work internally (you will bump into that quickly) costs more efforts than implementing by your own.</li>
<li>Theme and Skin conflict or mess up with CSS - to make your life easier and your design cleaner, stick with CSS.</li>
</ul>
<p>There are more, overall, using most of the "exciting" new features will cost more efforts to  deal with and work around the limitations than to write your own, and the former approach tends to result with messy design.</p>
<p>Something I do like is the Master Page and development and debug environment as usual.</p>
<p>Considering the future cost of hosting and maintenance of server, maybe I should have dig Ruby on Rail a little more, who knows, maybe another hype?</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Review: ANTS Profiler 4.0 Beta]]></title>
<link>http://tiredblogger.wordpress.com/2008/08/11/review-ants-profiler-40-beta/</link>
<pubDate>Mon, 11 Aug 2008 21:09:38 +0000</pubDate>
<dc:creator>David</dc:creator>
<guid>http://tiredblogger.wordpress.com/2008/08/11/review-ants-profiler-40-beta/</guid>
<description><![CDATA[A few months ago, I purchased ANTS Profiler 3.2 and have loved it.&nbsp; It&rsquo;s really helped me]]></description>
<content:encoded><![CDATA[<p>A few months ago, I purchased ANTS Profiler 3.2 and have loved it.&#160; It&#8217;s really helped me dig into some of my code, find performance hang-ups, and (I think) turn out better code and learn (it&#8217;s sometimes hard to find &#8220;do betters&#8221; in a single dev environment).</p>
<p>I played around with a few of the 4.0 builds and they were nice, but I honestly didn&#8217;t have time to dig into them.After a busy weekend, I sat down and spent some quality time with the 4.0 beta (b 4.0.0.740)&#160;of ANTS Profiler and am blown away.</p>
<p><strong><u>Installation</u></strong></p>
<p>Installation was a breeze.&#160; The 4.0 installer saw my existing 3.2 install and &#8220;upgraded&#8221; it; however, I was a bit surprised to find that the 3.2 sat side-by-side with 4.0.&#160; That&#8217;s PERFECT, actually, and&#160;I hope they plan to keep it that way.</p>
<p><img border="2" hspace="5" alt="ANTS 4.0 -- Installed!" vspace="5" src="http://photos.tiredstudent.com/WebStorageHandler.ashx?tb=false&#38;id=398" /></p>
<p><strong><u>First Run Through 4.0</u></strong></p>
<p>I&#8217;d like to start off by saying the new profiler startup UI is <strong>fantastic</strong>.&#160; The prior &#8220;multi-step&#8221; wizard was great and easy to work through; however, I really like seeing everything on the first page.&#160; Simply set the options and click Start.&#160; </p>
<p><font color="#0000ff"><img border="2" hspace="5" alt="Profiler Settings - click for full image" vspace="5" src="http://photos.tiredstudent.com/WebStorageHandler.ashx?tb=false&#38;id=399" width="541" height="406" /><br /><a href="http://photos.tiredstudent.com/WebStorageHandler.ashx?tb=false&#38;id=399">(click for full image)</a></font></p>
<p><font color="#000000">In addition, the quick access to additional performance counters, such as page requests and memory usage is really helpful.&#160; I&#8217;m curious if additional performance counters can be added or if the list (see below) is the only ones handled by ANTS.&#160; </font></p>
<p><img border="2" hspace="5" alt="" vspace="5" src="http://photos.tiredstudent.com/WebStorageHandler.ashx?tb=false&#38;id=400" /></p>
<p><img border="2" hspace="5" alt="" vspace="5" src="http://photos.tiredstudent.com/WebStorageHandler.ashx?tb=false&#38;id=402" /></p>
<p>Once things are rolling, the results come pouring in.&#160; Just like with 3.2, 4.0 has detailed line level data&#8212;percentages per called line, hits, etc.&#160; Very useful information.</p>
<p>However, the new call trees are sweet!&#160; Why look at spreadsheets and lines when a graphical representation is available?&#160; I have to find ways to boggle coworkers with these. :)</p>
<p>My understanding is (I haven&#8217;t RTFM&#8217;d yet) is that the call trees display both your code (those that are bolded) and the managed code from .NET and called libraries (those that are tinted).</p>
<p><img border="2" hspace="5" alt="" vspace="5" src="http://photos.tiredstudent.com/WebStorageHandler.ashx?tb=false&#38;id=403" /></p>
<p>From here, I can see that a good deal of my slow down querying AD is coming not from the top level code, but from the Ldap code in System.DirectoryServices.Protocols and that the wait caused by that is the biggest hold up in all of Session_Start.</p>
<p>Another cool feature is the live performance counter view while you&#8217;re profiling.&#160; This perfmon look into your application&#8217;s performance allows you to pause and checkout spikes (or unexpected dips) in any of the locked counters.</p>
<p><img border="2" hspace="5" alt="Counters graph." vspace="5" src="http://photos.tiredstudent.com/WebStorageHandler.ashx?tb=false&#38;id=404" /></p>
<p>To see the line-by-line details, simply drag the mouse along a section of the graph to select it.&#160; ANTS will zoom in on just that area.&#160; You can see the &#8220;highlighted&#8221; area below in blue.</p>
<p><img border="2" hspace="5" alt="Line Graphs, Zoomed In" vspace="5" src="http://photos.tiredstudent.com/WebStorageHandler.ashx?tb=false&#38;id=406" /></p>
<p>That spike can be diagnosed in the line view&#8212;one of our methods is that doesn&#8217;t call very often (42 times) is taking a HUGE amount of time due to another that is calling 1000+ times.&#160; Time to drill into that code and find a way to unloop it.</p>
<p><img border="2" hspace="5" alt="" vspace="5" src="http://photos.tiredstudent.com/WebStorageHandler.ashx?tb=false&#38;id=407" /></p>
<p><strong><u>Conclusion</u></strong></p>
<p>ANTS 4.0 seems quite a bit faster than 3.2 profiling the couple of .NET 3.5 web projects that I had sitting around in development.&#160; In the past, I tended to avoid running ANTS against local Cassini projects; however, this kept up pretty well (though I think it does explain the LdapConnection latency).</p>
<p>It also appears that 4.0 can profile remote IIS instances (at least it doesn&#8217;t refuse it like 3.2 does); however, I haven&#8217;t quite gotten that working with the port settings (more to learn).</p>
<p>I haven&#8217;t hit all of the features yet, but I&#8217;m very impressed with the new look and feel, added &#8220;while you profile&#8221; live features, and the call trees.&#160;I can&#8217;t wait for the next beta and/or gold release&#8212;it&#8217;s looking good!</p>
<div class="bjtags">Tags: <a rel="tag" href="http://technorati.com/tag/ANTS">ANTS</a>, <a rel="tag" href="http://technorati.com/tag/red+gate">red+gate</a>, <a rel="tag" href="http://technorati.com/tag/review">review</a>, <a rel="tag" href="http://technorati.com/tag/asp.net">asp.net</a>, <a rel="tag" href="http://technorati.com/tag/.net">.net</a></div>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Presenting Getting Started with SQL Server Compact Edition 3.5 at BUG.NET Meeting]]></title>
<link>http://arcanecode.wordpress.com/?p=1203</link>
<pubDate>Mon, 11 Aug 2008 04:01:23 +0000</pubDate>
<dc:creator>arcanecode</dc:creator>
<guid>http://arcanecode.wordpress.com/?p=1203</guid>
<description><![CDATA[Just wanted to let everyone know I&#8217;ll be doing a presentation this coming Tuesday night, Augus]]></description>
<content:encoded><![CDATA[<p>Just wanted to let everyone know I'll be doing a presentation this coming Tuesday night, August the 12th for the Birmingham .Net Users Group (BUG.NET). My topic, as you may have guessed from the title, will be using SQL Server Compact Edition. </p>
<p>While I will be using Visual Studio 2008, I will point out which pieces are 2005 compatible. I will also cover the use of both traditional coding techniques as well as how to use LinqToSQL to talk to the Compact Edition. </p>
<p>The meeting takes place at 6:30 pm at <a href="http://www.newhorizons.com/content/centerSearchResults.aspx?siteid=6">New Horizons Training Center </a>in Homewood. </p>
<p>I also plan a new series of blog posts to start later this week on the subject, and will be creating a new Code Gallery site to hold my examples. </p>
<p>Also, don't forget the regular BSDA meeting this coming Thursday night, the 14th. Also starting at 6:30 pm at New Horizons, Shannon Brooks-Hamilton, a software usability expert, will be there to talk about user interface design. Lots of good thought material on how we can make better UIs for our users.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Resharper 4.0.1 Beta Released]]></title>
<link>http://tiredblogger.wordpress.com/2008/08/04/resharper-401-beta-released/</link>
<pubDate>Mon, 04 Aug 2008 16:36:37 +0000</pubDate>
<dc:creator>David</dc:creator>
<guid>http://tiredblogger.wordpress.com/2008/08/04/resharper-401-beta-released/</guid>
<description><![CDATA[Since the 4.0 release, the JetBrains team has been working diligently towards the 4.0.1 release.]]></description>
<content:encoded><![CDATA[<p>Since the 4.0 release, the JetBrains team has been working diligently towards the 4.0.1 release.&#160; According to Confluence, there are several hundred bug fixes between 4.0 diamond and the current build (#917) of 4.0.1.</p>
<p>What&#8217;s new with 4.0.1?&#160; According to a newsgroup post from Ilya, the 4.0.1 updates revolve around bugfixes; I haven&#8217;t found any indication of additional features.&#160; I haven&#8217;t scanned through all of the JIRA cases yet, but there&#8217;s a huge volume of &#8220;fixes&#8221;&#8212;which surprises me.&#160; R# 4.0 has been running like a dream for me.</p>
<p>I&#8217;m installing <a href="http://www.jetbrains.net/confluence/display/ReSharper/ReSharper+4.0+Nightly+Builds">4.0.1 beta</a> (marked &#8220;works here&#8221;) now; the joys of testing!</p>
<div class="bjtags">Tags: <a rel="tag" href="http://technorati.com/tag/ReSharper">ReSharper</a>, <a rel="tag" href="http://technorati.com/tag/Visual+Studio+2008">Visual+Studio+2008</a></div>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Microsoft.Net Frequently Asked .Net Interview Questions And Answers ]]></title>
<link>http://programminginterviews.wordpress.com/?p=25</link>
<pubDate>Tue, 29 Jul 2008 11:39:33 +0000</pubDate>
<dc:creator>InterViewer</dc:creator>
<guid>http://programminginterviews.wordpress.com/?p=25</guid>
<description><![CDATA[http://dotnetframeworkfaq.blogspot.com/
]]></description>
<content:encoded><![CDATA[<p><a href="http://dotnetframeworkfaq.blogspot.com/">http://dotnetframeworkfaq.blogspot.com/</a></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[IQueryable Methods on ActiveReports ControlCollections]]></title>
<link>http://tiredblogger.wordpress.com/2008/07/25/iqueryable-methods-on-activereports-controlcollections/</link>
<pubDate>Fri, 25 Jul 2008 21:18:33 +0000</pubDate>
<dc:creator>David</dc:creator>
<guid>http://tiredblogger.wordpress.com/2008/07/25/iqueryable-methods-on-activereports-controlcollections/</guid>
<description><![CDATA[I&rsquo;m currently working on a project with an extremely complex, multi-page report.&nbsp; Unfortu]]></description>
<content:encoded><![CDATA[<p>I&#8217;m currently working on a project with an extremely complex, multi-page report.&#160; Unfortunately, a customer requirement was EXACT typography to the &#8220;Excel&#8221; report and there are hundreds (literally) of data points randomly on the page.&#160; </p>
<p>There isn&#8217;t a good way to iterate through the results (it&#8217;s a very detailed grade card for elementary students) and still match the layout requirements.</p>
<p>So, I went about &#8220;drawing&#8221; it out&#8212;lots of Label controls, lines, boxes, and such.&#160; To save myself a bit of time assigning DataFields, querying results, etc., I opted for a different kind of iteration&#8212;control iteration.</p>
<p>My schema was simple: q#i#, for the quarter and the primary data point of the report, the indicator Id.&#160; Since my business object, a Report, was already assigned to the ActiveReport document, I could simply iterate away!</p>
<p>Unfortunately, if you try to determine if the detail.Controls (a ControlCollection) contains a control and it doesn&#8217;t exist&#8212;it doesn&#8217;t simply return null, it throws an exception.&#160; In addition, the ControlCollection doesn&#8217;t have an Exists or a FindControl method.&#160; So, you&#8217;re stuck catching exceptions.</p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;color:blue;font-family:Consolas;">foreach</span><span style="font-size:10pt;font-family:Consolas;"> (<span style="color:blue;">var</span> indicator <span style="color:blue;">in</span> _indicators)</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;">{</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;color:blue;font-family:Consolas;">try</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;">{</span></p>
<p class="MsoNormal" style="text-indent:0.5in;line-height:normal;margin:0;"><span style="font-size:10pt;color:blue;font-family:Consolas;">var</span><span style="font-size:10pt;font-family:Consolas;"> indicatorHeader = </span></p>
<p class="MsoNormal" style="text-indent:0.5in;line-height:normal;margin:0 0 0 0.5in;"><span style="font-size:10pt;color:blue;font-family:Consolas;">string</span><span style="font-size:10pt;font-family:Consolas;">.Format(<span style="color:#a31515;">"i{0}"</span>, indicator.Id);</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0 0 0 0.5in;"><span style="font-size:10pt;font-family:Consolas;">((<span style="color:#2b91af;">Label</span>)detail.Controls[indicatorHeader]).Text = </span></p>
<p class="MsoNormal" style="text-indent:0.5in;line-height:normal;margin:0 0 0 0.5in;"><span style="font-size:10pt;font-family:Consolas;">IsSpanish <span>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;</span></span></p>
<p class="MsoNormal" style="line-height:normal;margin:0 0 0 1.5in;"><span style="font-size:10pt;font-family:Consolas;">? indicator.SpanishText<span>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>: indicator.EnglishText;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;">}</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;color:blue;font-family:Consolas;">catch</span><span style="font-size:10pt;font-family:Consolas;"> (<span style="color:#2b91af;">Exception</span>)</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;">{</span></p>
<p class="MsoNormal" style="text-indent:0.5in;line-height:normal;margin:0;"><span style="font-size:10pt;color:blue;font-family:Consolas;">continue</span><span style="font-size:10pt;font-family:Consolas;">;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;">}</span></p>
<p class="MsoNormal" style="margin:0 0 10pt;"><span style="font-size:10pt;line-height:115%;font-family:Consolas;">}</span></p>
<p>Unfortunately, that <strong>destroys</strong> performance&#8212;especially with hundreds of iterations (of indicators).</p>
<p>There&#8217;s a way around this, at least in my opinion.&#160; Instead of addressing the controls as part of the details.Controls ControlCollection, use a custom IQueryable collection.</p>
<p>Begin by adding a private variable to the report to hold the controls.&#160; In my case, all of the controls I&#8217;ll be modifying are Label (of ARControl) controls.</p>
<p class="MsoNormal" style="margin:0 0 10pt;"><span style="font-size:10pt;color:blue;line-height:115%;font-family:Consolas;">private</span><span style="font-size:10pt;line-height:115%;font-family:Consolas;"> <span style="color:#2b91af;">IQueryable</span>&#60;<span style="color:#2b91af;">Label</span>&#62; _controls;</span></p>
<p>On my ReportStart (I&#8217;m sure I could use another method, but since these are static controls, that seemed a good place to start), dump all Label controls into a generic List object (because you cannot add into an IQueryable).</p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;color:blue;font-family:Consolas;">var</span><span style="font-size:10pt;font-family:Consolas;"> controlList = <span style="color:blue;">new</span> <span style="color:#2b91af;">List</span>&#60;<span style="color:#2b91af;">Label</span>&#62;();</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;color:blue;font-family:Consolas;">foreach</span><span style="font-size:10pt;font-family:Consolas;"> (<span style="color:blue;">var</span> control <span style="color:blue;">in</span> detail.Controls.OfType&#60;<span style="color:#2b91af;">Label</span>&#62;())</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;">{</span></p>
<p class="MsoNormal" style="text-indent:0.5in;line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;">controlList.Add(control);</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;">}</span></p>
<p class="MsoNormal" style="margin:0 0 10pt;"><span style="font-size:10pt;line-height:115%;font-family:Consolas;">_controls = controlList.AsQueryable();</span></p>
<p>OR, if you want to get fancy and save a few objects:</p>
<p class="MsoNormal" style="margin:0 0 10pt;"><span style="font-size:10pt;line-height:115%;font-family:Consolas;">_controls = detail.Controls.OfType&#60;<span style="color:#2b91af;">Label</span>&#62;().AsQueryable();</span></p>
<p>At this point, your _controls object has all of the standard LINQ goodness.&#160; Our foreach now looks like:</p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;color:blue;font-family:Consolas;">foreach</span><span style="font-size:10pt;font-family:Consolas;"> (<span style="color:blue;">var</span> indicator <span style="color:blue;">in</span> _indicators)</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;">{</span></p>
<p class="MsoNormal" style="text-indent:0.5in;line-height:normal;margin:0;"><span style="font-size:10pt;color:blue;font-family:Consolas;">var</span><span style="font-size:10pt;font-family:Consolas;"> indicatorHeader = </span></p>
<p class="MsoNormal" style="text-indent:0.5in;line-height:normal;margin:0 0 0 0.5in;"><span style="font-size:10pt;color:blue;font-family:Consolas;">string</span><span style="font-size:10pt;font-family:Consolas;">.Format(<span style="color:#a31515;">"i{0}"</span>, indicator.Id);</span></p>
<p class="MsoNormal" style="text-indent:0.5in;line-height:normal;margin:0;"><span style="font-size:10pt;color:blue;font-family:Consolas;">var</span><span style="font-size:10pt;font-family:Consolas;"> indicatorControl = </span></p>
<p class="MsoNormal" style="text-indent:0.5in;line-height:normal;margin:0 0 0 0.5in;"><span style="font-size:10pt;font-family:Consolas;">_controls.SingleOrDefault(x =&#62; x.Name == indicatorHeader);</span></p>
<p class="MsoNormal" style="text-indent:0.5in;line-height:normal;margin:0;"><span style="font-size:10pt;color:blue;font-family:Consolas;">if</span><span style="font-size:10pt;font-family:Consolas;"> (indicatorControl != <span style="color:blue;">null</span>)</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;"><span>&#160;&#160;&#160;&#160;&#160;&#160; </span>{</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;"><span>&#160;&#160;&#160;&#160;&#160;&#160; </span><span>&#160;&#160;&#160;&#160;&#160;&#160; </span>indicatorControl.Text = IsSpanish </span></p>
<p class="MsoNormal" style="text-indent:0.5in;line-height:normal;margin:0 0 0 1in;"><span style="font-size:10pt;font-family:Consolas;">? indicator.SpanishText </span></p>
<p class="MsoNormal" style="text-indent:0.5in;line-height:normal;margin:0 0 0 1in;"><span style="font-size:10pt;font-family:Consolas;">: indicator.EnglishText;</span></p>
<p class="MsoNormal" style="text-indent:0.5in;line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;">}</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;">}</span></p>
<p>The entire block can be wrapped in a try/catch&#8212;rather than each &#8220;object check&#8221;.&#160; The report also runs almost 100x faster.</p>
<div class="bjtags">Tags: <a rel="tag" href="http://technorati.com/tag/ActiveReports">ActiveReports</a>, <a rel="tag" href="http://technorati.com/tag/IQueryable">IQueryable</a>, <a rel="tag" href="http://technorati.com/tag/LINQ">LINQ</a></div>
]]></content:encoded>
</item>
<item>
<title><![CDATA[IE6 Causes Z-Index Nightmares...]]></title>
<link>http://tiredblogger.wordpress.com/2008/07/25/ie6-causes-z-index-nightmares/</link>
<pubDate>Fri, 25 Jul 2008 17:48:00 +0000</pubDate>
<dc:creator>David</dc:creator>
<guid>http://tiredblogger.wordpress.com/2008/07/25/ie6-causes-z-index-nightmares/</guid>
<description><![CDATA[Rather than update the post from yesterday, this chaos deserves it&rsquo;s own post.
Yesterday, I di]]></description>
<content:encoded><![CDATA[<p>Rather than update the post from yesterday, this chaos deserves it&#8217;s own post.</p>
<p>Yesterday, I discussed layering Modal Popup Extenders with the Update Progress controls.&#160; In IE7, FF3, and, well, most everything except IE6, it works like a champ as-is.</p>
<p>The &#8220;bug&#8221;?&#160; After quite a bit of research, the problem revolves around the following issues:</p>
<ul>
<li>lack of support for the { position: fixed } property,</li>
<li>lack of support for the&#160;{ right; bottom} properties,</li>
<li>&#8230; unreliable suport for {height: 100%, width: 100%&#160;} properties,</li>
<li>general pain and suffering</li>
<li>&#60;SELECT&#62; tags (or ASP:DropDownList objects) exist above any other z-index,</li>
</ul>
<p>I&#8217;m sure there were other issues.&#160; Really.</p>
<p>After spending a good part of the day trying code, looking it up on <a href="http://www.quirksmode.org/" target="_blank">QuirksMode</a>, and trying again, I have <em>somewhat</em> of a solution; however, I still greatly dislike how it works in IE6.</p>
<p>On the MasterPage, I have a single UpdateProgress that isn&#8217;t associated to a specific UpdatePanel.&#160; Therefore, it&#8217;ll catch all Async postbacks (and I only have ONE UpdateProgress control).</p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;color:blue;font-family:Consolas;">&#60;</span><span style="font-size:10pt;color:#a31515;font-family:Consolas;">asp</span><span style="font-size:10pt;color:blue;font-family:Consolas;">:</span><span style="font-size:10pt;color:#a31515;font-family:Consolas;">UpdateProgress</span><span style="font-size:10pt;font-family:Consolas;"> </span></p>
<p class="MsoNormal" style="text-indent:0.5in;line-height:normal;margin:0;"><span style="font-size:10pt;color:red;font-family:Consolas;">runat</span><span style="font-size:10pt;color:blue;font-family:Consolas;">="server"</span><span style="font-size:10pt;font-family:Consolas;"> <span style="color:red;">DisplayAfter</span><span style="color:blue;">="100"</span> <span style="color:red;">ID</span><span style="color:blue;">="UpdateProgress"&#62;</span></span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;color:blue;font-family:Consolas;">&#60;</span><span style="font-size:10pt;color:#a31515;font-family:Consolas;">ProgressTemplate</span><span style="font-size:10pt;color:blue;font-family:Consolas;">&#62;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;color:blue;font-family:Consolas;">&#60;</span><span style="font-size:10pt;color:#a31515;font-family:Consolas;">div</span><span style="font-size:10pt;font-family:Consolas;"> <span style="color:red;">class</span><span style="color:blue;">="UpdateProgressModalBackground"&#62;&#60;/</span><span style="color:#a31515;">div</span><span style="color:blue;">&#62;</span></span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;color:blue;font-family:Consolas;">&#60;</span><span style="font-size:10pt;color:#a31515;font-family:Consolas;">div</span><span style="font-size:10pt;font-family:Consolas;"> <span style="color:red;">class</span><span style="color:blue;">="UpdateProgressPanel"&#62;</span></span></p>
<p class="MsoNormal" style="text-indent:0.5in;line-height:normal;margin:0;"><span style="font-size:10pt;color:blue;font-family:Consolas;">&#60;</span><span style="font-size:10pt;color:#a31515;font-family:Consolas;">h3</span><span style="font-size:10pt;color:blue;font-family:Consolas;">&#62;</span><span style="font-size:10pt;font-family:Consolas;">Please wait...<span style="color:blue;">&#60;/</span><span style="color:#a31515;">h3</span><span style="color:blue;">&#62;</span></span></p>
<p class="MsoNormal" style="line-height:normal;margin:0 0 0 0.5in;"><span style="font-size:10pt;color:blue;font-family:Consolas;">&#60;</span><span style="font-size:10pt;color:#a31515;font-family:Consolas;">img</span><span style="font-size:10pt;font-family:Consolas;"> <span style="color:red;">src</span><span style="color:blue;">="Images/ajaxbar.gif"</span><br /><span style="color:red;">alt</span><span style="color:blue;">="Please wait..."</span> </span></p>
<p class="MsoNormal" style="line-height:normal;margin:0 0 0 0.5in;"><span style="font-size:10pt;color:red;font-family:Consolas;">style</span><span style="font-size:10pt;color:blue;font-family:Consolas;">="</span><span style="font-size:10pt;color:red;font-family:consolas;">text-align</span><span style="font-size:10pt;font-family:consolas;">: <span style="color:blue;">center</span>; <span style="color:red;">width</span>: <span style="color:blue;">100%</span>; <span style="color:red;">height</span>: <span style="color:blue;">10px</span>;<span style="color:blue;">"</span> <span style="color:blue;">/&#62;</span></span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;color:blue;font-family:Consolas;">&#60;/</span><span style="font-size:10pt;color:#a31515;font-family:Consolas;">div</span><span style="font-size:10pt;color:blue;font-family:Consolas;">&#62;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;color:blue;font-family:Consolas;">&#60;/</span><span style="font-size:10pt;color:#a31515;font-family:Consolas;">ProgressTemplate</span><span style="font-size:10pt;color:blue;font-family:Consolas;">&#62;</span></p>
<p class="MsoNormal" style="margin:0 0 10pt;"><span style="font-size:10pt;color:blue;line-height:115%;font-family:Consolas;">&#60;/</span><span style="font-size:10pt;color:#a31515;line-height:115%;font-family:Consolas;">asp</span><span style="font-size:10pt;color:blue;line-height:115%;font-family:Consolas;">:</span><span style="font-size:10pt;color:#a31515;line-height:115%;font-family:Consolas;">UpdateProgress</span><span style="font-size:10pt;color:blue;line-height:115%;font-family:Consolas;">&#62;</span></p>
<p>This, again, references our UpdateProgressModalBackground and UpdateProgressPanel styles.&#160; These two styles are unchanged from the post yesterday.&#160; Here they&#160;are again for reference:</p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;color:green;font-family:Consolas;">/* UpdateProgressPanel is above EVERYTHING ELSE, </span></p>
<p class="MsoNormal" style="text-indent:0.5in;line-height:normal;margin:0;"><span style="font-size:10pt;color:green;font-family:Consolas;">even other modal popups */</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;color:#a31515;font-family:Consolas;">.UpdateProgressPanel</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;">{</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;"><span>&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color:red;">z-index</span>: <span style="color:blue;">99999999</span>;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;"><span>&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color:red;">background-color</span>:<span style="color:blue;">#fff</span>;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;"><span>&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color:red;">color</span>:<span style="color:blue;">#fff</span>;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;"><span>&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color:red;">width</span>: <span style="color:blue;">200px</span>;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;"><span>&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color:red;">text-align</span>: <span style="color:blue;">center</span>;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;"><span>&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color:red;">vertical-align</span>: <span style="color:blue;">middle</span>;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;"><span>&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color:red;">position</span>: <span style="color:blue;">fixed</span>;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;"><span>&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color:red;">bottom</span>: <span style="color:blue;">50%</span>;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;"><span>&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color:red;">left</span>: <span style="color:blue;">45%</span>;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;"><span>&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color:red;">padding</span>: <span style="color:blue;">10px</span>;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;"><span>&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color:red;">border</span>: <span style="color:blue;">solid</span> <span style="color:blue;">2px</span> <span style="color:blue;">#5D7B9D</span>;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;">}</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;">&#160;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;color:#a31515;font-family:Consolas;">.UpdateProgressModalBackground</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;">{</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;"><span>&#160;&#160;&#160; </span><span style="color:red;">z-index</span>: <span style="color:blue;">99999998</span>;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;"><span>&#160;&#160;&#160; </span><span style="color:red;">background-color</span>: <span style="color:blue;">#6D7B8D</span>;<span style="color:green;"></span></span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;"><span>&#160;&#160;&#160; </span><span style="color:red;">position</span>: <span style="color:blue;">fixed</span>;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;"><span>&#160;&#160;&#160; </span><span style="color:red;">top</span>: <span style="color:blue;">0</span>;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;"><span>&#160;&#160;&#160; </span><span style="color:red;">left</span>: <span style="color:blue;">0</span>;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;"><span>&#160;&#160;&#160; </span><span style="color:red;">height</span>: <span style="color:blue;">100%</span>;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;"><span>&#160;&#160;&#160; </span><span style="color:red;">width</span>: <span style="color:blue;">100%</span>;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;"><span>&#160;&#160;&#160; </span><span style="color:red;">min-height</span>: <span style="color:blue;">100%</span>;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;"><span>&#160;&#160;&#160; </span><span style="color:red;">min-width</span>: <span style="color:blue;">100%</span>;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;"><span>&#160;&#160;&#160; </span><span style="color:red;">filter</span>: <span style="color:blue;">alpha(opacity=50)</span>;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;"><span>&#160;&#160;&#160; </span><span style="color:red;">opacity</span>: <span style="color:blue;">0.5</span>;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;"><span>&#160;&#160;&#160; </span><span style="color:red;">-moz-opacity</span>: <span style="color:blue;">0.5</span>;</span></p>
<p class="MsoNormal" style="margin:0 0 10pt;"><span style="font-size:10pt;line-height:115%;font-family:Consolas;">}</span></p>
<p>The UpdateProgress and these two classes <strong>work just fine in IE7+, FF2+.</strong>&#160; So, now to fix IE6..</p>
<p>So, what&#8217;s the difference in IE6?&#160; Well,&#160;we can&#8217;t use the positioning attributes in the above classes&#8211;-they won&#8217;t work properly.&#160; </p>
<p><strong>Issue #1 &#8211; Fitting the Popup and Background Without Positioning Attributes</strong></p>
<p>Searching the web, I <a href="http://blogs.visoftinc.com/archive/2008/03/13/Modal-UpdateProgress-for-UpdatePanel-Revisited.aspx" target="_blank">found an article</a> by Damien White discussing his his same pains with this.&#160; His solution involved using the IE-specific CSS &#8220;expressions&#8221; to calculate the height and width of the window.</p>
<blockquote>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;color:red;font-family:'Courier New';">height</span><span style="font-size:10pt;font-family:'Courier New';">: </span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;color:blue;font-family:'Courier New';">expression(</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;color:blue;font-family:'Courier New';"><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>document.documentElement.scrollTop + </span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;color:blue;font-family:'Courier New';"><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>document.documentElement.clientHeight + "px")</span><span style="font-size:10pt;font-family:'Courier New';">;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;color:red;font-family:'Courier New';">&#160;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;color:red;font-family:'Courier New';">width</span><span style="font-size:10pt;font-family:'Courier New';">: <span style="color:blue;">expression(document.body.clientWidth + "px")</span>;</span></p>
</blockquote>
<p>However, at least for me, Damien&#8217;s expressions wouldn&#8217;t handle scrolling down the page.</p>
<p>Damien explains: </p>
<blockquote>
<p>The thinking behind this was to take the window height (which <strong>document.documentElement.clientHeight</strong> gives us) and then add the scroll top position, which will give us the upper portion if the user scrolls up.&#160; The problem shows itself when the user scrolls down; that area is not covered.&#160; The good thing about this is that I didn't need to mess with the body height, but the solution isn't optimal in the long haul.</p>
</blockquote>
<p>That&#8217;s a bad deal because that&#8217;s the whole point!&#160; Reading a bit more, there was a comment from <em>Kunal Mukherjee</em> on Damien&#8217;s post that solved the problem.</p>
<p>Kunal&#8217;s expressions looked at the scrollHeight of the window as compared to the offsetHeight and returned the larger.</p>
<blockquote>
<p class="MsoNormal" style="margin:0 0 10pt;"><span style="font-size:10pt;color:red;line-height:115%;font-family:Consolas;">height</span><span style="font-size:10pt;line-height:115%;font-family:Consolas;">: <span style="color:blue;">expression(</span></span></p>
<p class="MsoNormal" style="margin:0 0 10pt 0.5in;"><span style="font-size:10pt;color:blue;line-height:115%;font-family:Consolas;">document.body.scrollHeight &#62; document.body.offsetHeight <br />? document.body.scrollHeight <br />: document.body.offsetHeight + 'px' )</span><span style="font-size:10pt;line-height:115%;font-family:Consolas;">;<span style="color:blue;"></span></span></p>
</blockquote>
<p>Actually, that works really well. Cool.</p>
<p>Finally, I&#8217;d recommend, as Damien did, breaking out your CSS into two files&#8212;one for &#8220;IE6&#8221; and one for everyone else.&#160; This is easily done using the IE-specific conditional statements.</p>
<p class="MsoNormal" style="margin:0 0 10pt;"><span style="font-size:10pt;color:green;line-height:115%;font-family:Consolas;">&#60;!--[if lt IE 7]&#62;<br />&#60;link rel="stylesheet" type="text/css" href="App_Themes/ie6/ie6.css" /&#62;<br />&#60;![endif]--&#62;</span></p>
<p>I also included !important flags on each of the properties in the ie6.css file&#8212;just to be safe.</p>
<p><strong>Issue #2 &#8211; IE6 Pushes &#60;SELECT&#62; tags above everything else&#8230;</strong></p>
<p>This is where the solution gets dicey; however, I&#8217;m relying on Kunal&#8217;s solution again.&#160; In his comment, he pointed out a way to hide &#60;SELECT&#62; tags in IE6 without causing the <a href="http://forums.asp.net/t/1015368.aspx" target="_blank">disappearing act</a> that the ModalPopupExtender causes&#8212;cover them with an IFRAME.</p>
<p>To me, this hack seems&#8230; sketchy at best, but it works.</p>
<p>In the ProgressTemplate of the UpdateProgress control, add in the IFRAME.</p>
<p class="MsoNormal" style="margin:0 0 10pt;"><span style="font-size:10pt;color:blue;line-height:115%;font-family:Consolas;">&#60;</span><span style="font-size:10pt;color:#a31515;line-height:115%;font-family:Consolas;">iframe</span><span style="font-size:10pt;line-height:115%;font-family:Consolas;"> <span style="color:red;">id</span><span style="color:blue;">="UpdateProgressHideSelect"&#62;&#60;/</span><span style="color:#a31515;">iframe</span><span style="color:blue;">&#62;</span></span></p>
<p>In the default.css (or the non-ie6.css, whatever you&#8217;ve called it), I recommend setting the iframe&#8217;s style to {display: none}&#8212;it isn&#8217;t needed outside IE6, don&#8217;t render it. :)</p>
<p>On the ie6.css, add the UpdateProgressHideSelect in&#8212;along with another expression to place the iframe over the entire page (like the standard BackgroundCssClass of a ModalPopupExtender):</p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;color:#a31515;font-family:Consolas;">#UpdateProgressHideSelect</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;">{</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;"><span>&#160;&#160;&#160; </span><span style="color:red;">z-index</span>: <font color="#0000ff">15000</font>;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;"><span>&#160;&#160;&#160; </span><span style="color:red;">position</span>: <span style="color:blue;">fixed</span>;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;"><span>&#160;&#160;&#160; </span><span style="color:red;">top</span>: <span style="color:blue;">0</span>;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;"><span>&#160;&#160;&#160; </span><span style="color:red;">left</span>: <span style="color:blue;">0</span>;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;"><span>&#160;&#160;&#160; </span><span style="color:red;">background-color</span>: <span style="color:blue;">#fff</span>;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;"><span>&#160;&#160;&#160; </span><span style="color:red;">border</span>: <span style="color:blue;">none</span>;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;"><span>&#160;&#160;&#160; </span><span style="color:red;">filter</span>: <span style="color:blue;">alpha(opacity=0)</span>;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;"><span>&#160;&#160;&#160; </span><span style="color:red;">-moz-opacity</span>: <span style="color:blue;">0</span>;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;"><span>&#160;&#160;&#160; </span><span style="color:red;">opacity</span>: <span style="color:blue;">0</span>;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;"><span>&#160;&#160;&#160; </span><span style="color:red;">height</span>: <span style="color:blue;">100%</span>;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;"><span>&#160;&#160;&#160; </span><span style="color:red;">width</span>: <span style="color:blue;">100%</span>;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;"><span>&#160;&#160;&#160; </span><span style="color:red;">display</span>: <span style="color:blue;">inline</span> <span style="color:blue;">!important</span>;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;">}</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;">&#160;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;color:#a31515;font-family:Consolas;">*</span><span style="font-size:10pt;font-family:Consolas;"> <span style="color:#a31515;">html</span> <span style="color:#a31515;">#UpdateProgressHideSelect</span></span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;">{</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;"><span>&#160;&#160;&#160; </span><span style="color:red;">position</span>: <span style="color:blue;">absolute</span>;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;"><span>&#160;&#160;&#160; </span><span style="color:red;">height</span>: <span style="color:blue;">expression(</span></span></p>
<p class="MsoNormal" style="text-indent:0.5in;line-height:normal;margin:0;"><span style="font-size:10pt;color:blue;font-family:Consolas;">document.body.scrollHeight &#62; document.body.offsetHeight </span></p>
<p class="MsoNormal" style="text-indent:0.5in;line-height:normal;margin:0;"><span style="font-size:10pt;color:blue;font-family:Consolas;">? document.body.scrollHeight </span></p>
<p class="MsoNormal" style="text-indent:0.5in;line-height:normal;margin:0;"><span style="font-size:10pt;color:blue;font-family:Consolas;">: document.body.offsetHeight + 'px')</span><span style="font-size:10pt;font-family:Consolas;">;</span></p>
<p class="MsoNormal" style="margin:0 0 10pt;"><span style="font-size:10pt;line-height:115%;font-family:Consolas;">}</span></p>
<p>The z-index of 15000 for the iframe ensures that it appears above the normal 10000 of a ModalPopupExtender panel; however, under our crazy high UpdateProgress control.</p>
<p>Problem solved&#8212;for now.</p>
<p>Here&#8217;s how they look, side by side.</p>
<p><strong>FireFox 3:</strong></p>
<p><img alt="FireFox 3 Output" hspace="5" src="http://photos.tiredstudent.com/WebStorageHandler.ashx?tb=false&#38;id=385" vspace="5" border="2" /></p>
<p>Nice and clean, properly centered given the size of the box and window size.&#160; Can see drop down lists and MPE behind the UpdateProgress, but cannot access them.</p>
<p><strong>IE 7:</strong></p>
<p><img alt="IE7 Output" hspace="5" src="http://photos.tiredstudent.com/WebStorageHandler.ashx?tb=false&#38;id=383" vspace="5" border="2" /></p>
<p>Output as expected and where expected.&#160; Can see drop down lists and MPE behind the UpdateProgress, but cannot access them.</p>
<p><strong>IE 6:</strong></p>
<p><img alt="IE6 Output" hspace="5" src="http://photos.tiredstudent.com/WebStorageHandler.ashx?tb=false&#38;id=387" vspace="5" border="2" /></p>
<p>Output as expected&#8212;basically where expected.&#160; Drop down lists are hidden behind the IFRAME to prevent input.&#160; Other controls are visible, including the MPE, but behind the background.</p>
<p><strong><em>What fun!</em></strong></p>
<div class="bjtags">Tags: <a rel="tag" href="http://technorati.com/tag/UpdateProgress">UpdateProgress</a>, <a rel="tag" href="http://technorati.com/tag/ModalPopupExtender">ModalPopupExtender</a>, <a rel="tag" href="http://technorati.com/tag/IE6">IE6</a>, <a rel="tag" href="http://technorati.com/tag/IE7">IE7</a>, <a rel="tag" href="http://technorati.com/tag/css">css</a></div>
]]></content:encoded>
</item>
<item>
<title><![CDATA[La sicurezza in Asp.net]]></title>
<link>http://pythonyan.wordpress.com/?p=244</link>
<pubDate>Wed, 23 Jul 2008 08:26:31 +0000</pubDate>
<dc:creator>pythonyan</dc:creator>
<guid>http://pythonyan.wordpress.com/?p=244</guid>
<description><![CDATA[La sicurezza così come viene implementata in Asp.Net chiarita da Joe Stagner su www.asp.net .Si pos]]></description>
<content:encoded><![CDATA[<p>La <a href="http://www.asp.net/learn/security/tutorial-01-cs.aspx">sicurezza </a>così come viene implementata in Asp.Net chiarita da Joe Stagner su www.asp.net .Si possono vedere altri video sullo stesso ambito, il tutto corredato da codice e pdf.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[An enhanced UpdateProgress control, which shows an animation at the point where mouse was clicked]]></title>
<link>http://nishantpant.wordpress.com/?p=110</link>
<pubDate>Fri, 18 Jul 2008 01:08:17 +0000</pubDate>
<dc:creator>Nishant Pant</dc:creator>
<guid>http://nishantpant.wordpress.com/?p=110</guid>
<description><![CDATA[WHY DO IT ???
Before you read the post, let us answer why did I waste time in changing the behavior ]]></description>
<content:encoded><![CDATA[<p><strong><a href="http://nishantpant.files.wordpress.com/2008/07/vbajaxzip1.jpg"></a>WHY DO IT ???</strong></p>
<p>Before you read the post, let us answer why did I waste time in changing the behavior of the <em><strong>UpdateProgress </strong></em>control. Here is the deal. Suppose, you have 5 or 6 controls on your page, which when clicked result in an Ajax call. You know that the <em><strong>UpdateProgress </strong></em>control is pretty much static, meaning, wherever you put the <strong><em>&#60;asp:UpdateProgress&#62;</em></strong> tags, that is the place where the progressbar will show up when your Ajax call is in progress. So, no matter which control the user clicks the progressbar is being shown in a fixed place. Why may some people consider this bad ???</p>
<ul>
<li>You or anyone looking at the screen, may lose track of why you are waiting because the progressbar just shows that you are waiting not what has triggered the wait.</li>
<li>If the page is long, and the progress bar is at a fixed place, there is a possibility that you clicked a control which is a scroll length away from where the progressbar will show.</li>
<li>If the control which was clicked can give a feedback for the user to wait, it prevents the user from clicking the same button twice.</li>
</ul>
<p>So, much for justifying why I wrote this control. But those were just a few thoughts behind it. Let us get back to the nitty gritties. Btw, here is a YouTube vide of how it looks (video is a little fuzzy but it shows what I am trying to communicate)</p>
<p><span style='text-align:center; display: block;'><object width='425' height='350'><param name='movie' value='http://www.youtube.com/v/a46xkBea6mg'></param><param name='wmode' value='transparent'></param><embed src='http://www.youtube.com/v/a46xkBea6mg&rel=0' type='application/x-shockwave-flash' wmode='transparent' width='425' height='350'></embed></object></span></p>
<p><strong>The Code :</strong></p>
<p>I will not go into too much detail explaining the code, because I am sharing the source code with you. But here is the high level overview :</p>
<ul>
<li>Create a new control, which inherits from <strong><em>UpdateProgress </em></strong>control</li>
<li>Embed two resources in your control assembly. (the default hourglass image and the javascript used to make this control work)</li>
<li>Override Render method, and inject javascript. The javascript will hook into the AJAX <strong><em>InitializeRequest </em></strong>and <strong><em>EndRequest </em></strong>events, by calling <strong><em>add_initializeRequest</em></strong>() and <strong><em>add_endRequest</em></strong>() methods of <strong><em>Sys.WebForms.PageRequestManager </em></strong>class.</li>
<li>The first Image control in the &#60;<strong><em>ProgressTemplate</em></strong>&#62; of the UpdateProgress control will be assumed to be the hourglass image, and if you haven't set an ImageURL value for it, a default image will be supplied. You can create your own hourglass images from this awesome website : <a href="http://www.ajaxload.info/#preview">http://www.ajaxload.info/#preview</a></li>
</ul>
<p>That is it. Do leave comments and suggestions if you find this control useful. I am also attaching the <a title="Rigth Click --&#62;Save Target--&#62;Rename to .Zip" href="http://nishantpant.files.wordpress.com/2008/07/vbajaxzip1.jpg">source code </a>and the assembly. If you don't want to see the code, just use the assembly and things should work right away.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Check log every 5 min in C#]]></title>
<link>http://scriptforall.wordpress.com/?p=27</link>
<pubDate>Tue, 15 Jul 2008 11:42:54 +0000</pubDate>
<dc:creator>kostland</dc:creator>
<guid>http://scriptforall.wordpress.com/?p=27</guid>
<description><![CDATA[where timerticlickvoid is the click of the timer&#8230;.
public void timertickvoid()
{
// Set the ti]]></description>
<content:encoded><![CDATA[<p>where timerticlickvoid is the click of the timer....</p>
<p>public void timertickvoid()<br />
{<br />
// Set the timer interval to 5 minutes<br />
timerCheck.Interval = (int)(5 * 1000 * 60);</p>
<p>FileStream fs = File.OpenRead("timer.log");<br />
StreamReader sr = new StreamReader(fs);<br />
string myInput = sr.ReadToEnd();<br />
sr.Close();<br />
fs.Close();</p>
<p>DateTime dtFile = Convert.ToDateTime(myInput);</p>
<p>DateTime dt2 = DateTime.Now;</p>
<p>TimeSpan span = dt2.Subtract(dtFile);<br />
int dif = span.Days*60*24 + span.Hours*60+span.Minutes;<br />
if (dif &#62; 5)//&#62;60<br />
{<br />
RunRoutines();<br />
}</p>
<p>}</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[AnkhSVN 2.0 Released - How's it look?]]></title>
<link>http://tiredblogger.wordpress.com/2008/07/11/ankhsvn-20-released-hows-it-look/</link>
<pubDate>Fri, 11 Jul 2008 20:14:29 +0000</pubDate>
<dc:creator>David</dc:creator>
<guid>http://tiredblogger.wordpress.com/2008/07/11/ankhsvn-20-released-hows-it-look/</guid>
<description><![CDATA[When I first started using Subversion full time for all of my personal projects, I stuck with the Vi]]></description>
<content:encoded><![CDATA[<p dir="ltr" style="margin-right:0;">When I first started using Subversion full time for all of my personal projects, I stuck with the VisualSVN server and AnkhSVN as a Visual Studio client.&#160; Both were free, easy to install, and easy to use.</p>
<p dir="ltr" style="margin-right:0;">However, after a few weeks, the AnkhSVN client could almost be called &#8220;annoying.&#8221;&#160; It trampled over the existing SCC plugins for SourceSafe (for work) and made a mess out of several of my project uploads.&#160; I ended up going back to using TortioiseSVN and doing everything through Explorer.</p>
<p dir="ltr" style="margin-right:0;">When <a href="http://blogs.open.collab.net/svn/2008/07/ankhsvn-20-fina.html" target="_blank">AnkhSVN 2.0 was released</a>, I figured I&#8217;d give it another shot.</p>
<p dir="ltr" style="margin-right:0;">The site claims quite a bit&#8212;including several unique additions:</p>
<ul>
<li>Pending changes window; subversion status and commands available in one place</li>
<li>Full support for Visual Studio 2005 and 2008; AnkhSVN is now a SCC package instead of just an addin</li>
<li>Better log viewer</li>
<li>Merge support</li>
<li>Property editor</li>
<li>AnkhSVN now supports most project types previously unsupported via the SCC api</li>
<li>All solution explorer actions (rename, copy&#38;paste, drag&#38;drop) keep subversion history now</li>
<li>Enhanced build process and setup</li>
<li>Automatic check for updates</li>
<li>And last but certainly not least end user documentation</li>
</ul>
<p dir="ltr" style="margin-right:0;">All of those look great&#8212;especially the SCC package and changes window.&#160; But how does it compare once installed?</p>
<p dir="ltr" style="margin-right:0;">After installation and starting up VS2008, everything looks normal.</p>
<p dir="ltr" style="margin-right:0;"><strong>Brief Look</strong></p>
<p dir="ltr" style="margin-right:0;"><u>Pending Changes Window</u></p>
<p dir="ltr" style="margin-right:0;">The new pending changes window is FANTASTIC&#8212;much improved over the old 1.x versions.&#160; I did run into a snafu when trying to resize the window where the scrollbars didn&#8217;t update on the screen; however, I&#8217;m not sure if it&#8217;s a VSS or AnkhSVN issue.</p>
<p dir="ltr" style="margin-right:0;"><img alt="" hspace="5" src="http://photos.tiredstudent.com/WebStorageHandler.ashx?tb=false&#38;id=378" vspace="5" border="2" /></p>
<p dir="ltr" style="margin-right:0;"><u>SCC Package</u></p>
<p dir="ltr" style="margin-right:0;">Under Options &#62; Source Control, AnkhSVN shows up just like it should.</p>
<p dir="ltr" style="margin-right:0;"><img alt="" hspace="5" src="http://photos.tiredstudent.com/WebStorageHandler.ashx?tb=false&#38;id=377" vspace="5" border="2" /></p>
<p dir="ltr" style="margin-right:0;">What does boggle me is that all of the Subversion commands and menus are available no matter what&#8212;even when the VSS SCC is enabled.&#160; It still has the stink of VSS and SVN trying to step on one another (&#8220;pick me! control your project with me! no, I&#8217;m better! pick me!&#8221;).</p>
<p dir="ltr" style="margin-right:0;"><u>Log/History Viewer</u></p>
<p dir="ltr" style="margin-right:0;">I really like the new history viewer.&#160; It&#8217;s clean and easy to read; however, if you change the options at the top&#8212;there doesn&#8217;t appear to be a way to &#8220;change it back&#8221; and see the history again, close the view and review.</p>
<p dir="ltr" style="margin-right:0;"><strong>Annoyances</strong></p>
<ul>
<li>
<div style="margin-right:0;">Opening a project from Subversion (File &#62; Subversion &#62; Open from Subversion) will open a project just fine, copy it down, but <u>never opens it</u>.&#160; You have to go back and open the solution after it&#8217;s created the local structure.&#160; Not huge, but annoying.</div>
</li>
<li>
<div style="margin-right:0;">When viewing history; you cannot view the history of a single file (that I&#8217;ve found) in the Repository Explorer.&#160; </div>
</li>
</ul>
<p style="margin-right:0;">I&#8217;m still planning to give it a whirl for the next couple of weeks and see what happens.&#160; Hopefully over a couple weeks I&#8217;ll have more time to code&#8212;it&#8217;s been a busy July so far!</p>
<div class="bjtags">Tags: <a rel="tag" href="http://technorati.com/tag/AnhkSVN">AnhkSVN</a>, <a rel="tag" href="http://technorati.com/tag/Visual+Studio+2008">Visual+Studio+2008</a>, <a rel="tag" href="http://technorati.com/tag/SCC">SCC</a></div>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Wrapping TabPanel Tabs With A Simple CSS Change]]></title>
<link>http://tiredblogger.wordpress.com/2008/07/10/wrapping-tabpanel-tabs-with-a-simple-css-change/</link>
<pubDate>Thu, 10 Jul 2008 21:31:35 +0000</pubDate>
<dc:creator>David</dc:creator>
<guid>http://tiredblogger.wordpress.com/2008/07/10/wrapping-tabpanel-tabs-with-a-simple-css-change/</guid>
<description><![CDATA[The last few weeks have been filled with taking an old ASP legacy application and updating it to ASP]]></description>
<content:encoded><![CDATA[<p>The last few weeks have been filled with taking an old ASP legacy application and updating it to ASP.NET.&#160; Fun stuff and not to challenging.</p>
<p>However, a &#8220;feature&#8221; of the AJAX Control Toolkit&#8217;s TabContainer finally hit a nerve.&#160; In the past, I&#8217;ve ignored the fact that I couldn&#8217;t &#8220;wrap&#8221; the tabs or set how many rows of tabs to create.&#160; I chalked it up to an annoyance and designed applications with this in mind.</p>
<p>After hunting through the Control Toolkit&#8217;s source code, the problem is simple.&#160; There&#8217;s a line in the CSS explicitly telling it not to wrap.</p>
<p>Well, recompiling the toolkit can get annoying and hurts mobility of your applications&#8212;it&#8217;s no fun to bundle &#8220;custom&#8221; copies for a simple styling change.</p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;color:#a31515;font-family:Consolas;">.ajax__tab_header</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;">{</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:Consolas;"><span>&#160;&#160;&#160; </span><span style="color:red;">white-space</span>: <span style="color:blue;">normal</span> <span style="color:blue;">!important</span>;</span></p>
<p class="MsoNormal" style="margin:0 0 10pt;"><span style="font-size:10pt;line-height:115%;font-family:Consolas;">}</span></p>
<p>That will override the nowrap&#160;that is built into the Toolkit&#8217;s CSS.</p>
<p><img alt="" hspace="5" src="http://photos.tiredstudent.com/WebStorageHandler.ashx?tb=false&#38;id=376" vspace="5" border="2" /></p>
<p>Hopefully, <em>someday</em>, this will be a boolean property on the TabContainer control.</p>
<div class="bjtags">Tags: <a rel="tag" href="http://technorati.com/tag/AJAX+Control+Toolkit">AJAX+Control+Toolkit</a>, <a rel="tag" href="http://technorati.com/tag/TabPanel">TabPanel</a>, <a rel="tag" href="http://technorati.com/tag/TabContainer">TabContainer</a></div>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Update Panel and Default Button fix]]></title>
<link>http://claytonj.wordpress.com/2008/07/07/update-panel-and-default-button-fix/</link>
<pubDate>Mon, 07 Jul 2008 10:34:29 +0000</pubDate>
<dc:creator>CJ</dc:creator>
<guid>http://claytonj.wordpress.com/2008/07/07/update-panel-and-default-button-fix/</guid>
<description><![CDATA[Here is a workaround (hack) to fix the default button on a form that is enclosed inside an update pa]]></description>
<content:encoded><![CDATA[<p>Here is a workaround (hack) to fix the default button on a form that is enclosed inside an update panel.</p>
<p>Add the following to the .aspx page.<br />
function ResetDefaultFired()<br />
{<br />
    __defaultFired = false;<br />
}</p>
<p> </p>
<p>Add the following property to each button that is enclosed inside the update panel<br />
OnClientClick="ResetDefaultFired"</p>
<p> </p>
<blockquote><p><em>Blurb from msdn forum</em></p>
<p><em>The problem is in the used javascript to handle the default button in combination with Atlas.<br />
When a default button is set in a Panel  the following attribute is rendered:<br />
onkeypress = "Javascript:return WebForm_FireDefaultButton(event, '[buttonId]');"</em></p>
<p>If you look at the code of WebForm_FireDefaultButton you will see a variable '__defaultFired'.This variable is used to just fire the event only 1 time in a roundtrip cycle. After you hit the enter key this variable is set to true. Because atlas is updating just a part of the screen this variable won't be reset to false. So the second time you hit enter nothing happens or the default behavior of the browser is taking place (firing the first submit button on the screen in IE)<br />
code snippet of the javascript WebForm_FireDefaultButton function<br />
var __defaultFired = false;<br />
function WebForm_FireDefaultButton(event, defaultButton) {<br />
    if (!__defaultFired &#38;&#38; event.keyCode == 13) {<br />
        if (__nonMSDOMBrowser) {<br />
            src = event.target;<br />
        }<br />
        else {<br />
            src = event.srcElement;<br />
        }<br />
        tagName = src.tagName.toLowerCase();<br />
        if ((tagName != "a") &#38;&#38; ((tagName != "input") &#124;&#124; ((src.type != "submit") &#38;&#38; (src.type != "reset") &#38;&#38; (src.type != "image") &#38;&#38; (src.type != "file")))) {<br />
            if (defaultButton.click != "undefined") {<br />
__defaultFired = true;<br />
                defaultButton.click();<br />
                if (__nonMSDOMBrowser) {<br />
                    event.cancelBubble = true;<br />
                }<br />
                return false;<br />
            }<br />
        }<br />
    }<br />
    return true;<br />
}</p></blockquote>
]]></content:encoded>
</item>
<item>
<title><![CDATA[How to add a filelist directory to combo in winform c#]]></title>
<link>http://scriptforall.wordpress.com/?p=26</link>
<pubDate>Wed, 02 Jul 2008 08:43:50 +0000</pubDate>
<dc:creator>kostland</dc:creator>
<guid>http://scriptforall.wordpress.com/?p=26</guid>
<description><![CDATA[where sPath is the location of directory

DirectoryInfo di = new DirectoryInfo(sPath);
FileInfo[] rg]]></description>
<content:encoded><![CDATA[<p>where sPath is the location of directory</p>
<blockquote></blockquote>
<p>DirectoryInfo di = new DirectoryInfo(sPath);<br />
FileInfo[] rgFiles = di.GetFiles("*.jpg");<br />
foreach (FileInfo fi in rgFiles)<br />
{</p>
<p>string sfile = fi.Name;<br />
sfile = sfile.Replace(".jpg", "");<br />
object obj=sfile;<br />
ckboxTemplates.Items.Add(obj);<br />
}</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Sample code: App configuration settings for .NET 2.0]]></title>
<link>http://lizsgeekyside.wordpress.com/?p=21</link>
<pubDate>Mon, 11 Aug 2008 20:42:51 +0000</pubDate>
<dc:creator>Liz</dc:creator>
<guid>http://lizsgeekyside.wordpress.com/?p=21</guid>
<description><![CDATA[Retrieving configuration settings (non-web):
Configuration config = ConfigurationManager.OpenExeConf]]></description>
<content:encoded><![CDATA[<p><span style="text-decoration:underline;"><strong>Retrieving configuration settings (non-web):</strong></span></p>
<p style="background-color:#CCEEFF;"><code>Configuration config = ConfigurationManager.OpenExeConfiguration<br />
    (ConfigurationUserLevel.None);</code></p>
<p>or</p>
<p style="background-color:#CCEEFF;"><code>Configuration config =<br />
    ConfigurationManager.OpenMachineConfiguration();</code></p>
<p>or</p>
<p style="background-color:#CCEEFF;"><code>ExeConfigurationFileMap map = new ExeConfigurationFileMap();<br />
string fileName = "Example.exe.config";<br />
Debug.Assert (File.Exists(fileName), "This file or path does not<br />
    exist");<br />
map.ExeConfigFilename = fileName;<br />
Configuration config =<br />
    ConfigurationManager.OpenMappedExeConfiguration<br />
    (map, ConfigurationUserLevel.None);</code></p>
<p>or</p>
<p style="background-color:#CCEEFF;"><code>// (Using the first four lines from the previous example)<br />
Configuration config =<br />
    ConfigurationManager.OpenMappedMachineConfiguration<br />
    (map);</code></p>
<p><strong></strong></p>
<p><strong></strong></p>
<p><strong><span style="text-decoration:underline;">Specifying a version of the .NET Framework to run an app:</span></strong></p>
<p style="background-color:#CCEEFF;"><code>&#60;? xml version = "1.0" ?&#62;<br />
&#60;configuration&#62;<br />
    &#60;startup&#62;<br />
        &#60;supported Runtime version="v1.1.4322" /&#62;<br />
    &#60;/startup&#62;<br />
&#60;/configuration&#62;<br />
</code></p>
<p><span style="text-decoration:underline;"><strong></strong></span></p>
<p><span style="text-decoration:underline;"><strong></strong></span></p>
<p><span style="text-decoration:underline;"><strong>Telling the runtime to look for a certain assembly</strong></span></p>
<p>(This technique can also be used for connecting a shared assembly to multiple applications.)</p>
<ol>
<li>Create environment variable called DEVPATH and set it to the assembly location</li>
<li>Tell the runtime to look for the assembly in the location specified by DEVPATH (example below)</li>
</ol>
<p style="background-color:#CCEEFF;"><code>&#60;configuration&#62;<br />
    &#60;runtime&#62;<br />
        &#60;developmentMode developerInstallation = "true" /&#62;<br />
    &#60;/runtime&#62;<br />
&#60;/configuration&#62;</code></p>
<div>
<div><strong><span style="text-decoration:underline;">Specifying the location of a certain version of an assembly</span></strong></div>
<p style="background-color:#CCEEFF;"><code>&#60;configuration&#62;<br />
    &#60;runtime&#62;<br />
        &#60;assemblyBinding xmlns="schema"&#62;<br />
            &#60;dependentAssembly&#62;<br />
                &#60;assemblyIdentity name="sampleProgram"<br />
                    publicKeyToken="xxxxxxxxx"<br />
                    culture="en-us" /&#62;<br />
                &#60;codeBase version="x.0.0.0" <br />
                    href="http://www.example.com/sampleProgram.dll"<br />
                    /&#62;<br />
            &#60;/dependentAssembly&#62;<br />
        &#60;/assemblyBinding&#62;<br />
    &#60;/runtime&#62;<br />
&#60;/configuration&#62;</code></p>
<p><strong><span style="text-decoration:underline;">Configuring appSettings and connectionString settings</span></strong></div>
<p style="background-color:#CCEEFF;"><code><code>&#60;configuration&#62;<br />
    &#60;appSettings&#62;<br />
        &#60;add key="KeyName" value="KeyValue" /&#62;<br />
    &#60;/appSettings&#62;<br />
    &#60;connectionStrings&#62;<br />
        &#60;clear /&#62;<br />
        &#60;add name="SampleSqlServerConnection"<br />
            providerName="System.Data.SqlClient"<br />
            connectionString="Data Source=localhost;<br />
            Initial Catalog=AdventureWorks;<br />
            Integrated Security=true" /&#62;<br />
    &#60;/connectionStrings&#62;<br />
&#60;/configuration&#62;</code></code></p>
<p><strong><span style="text-decoration:underline;">Accessing the appSettings values (non-web):</span></strong></p>
<p style="background-color:#CCEEFF;"><code>// This example is obsolete and generally should not be used<br />
string appSettingVariable = ConfigurationSettings.AppSettings<br />
    ["KeyName"];</code></p>
<p>or</p>
<p style="background-color:#CCEEFF;"><code>NameValueCollection allAppSettings =<br />
    ConfigurationManager.AppSettings;<br />
Console.WriteLine(allAppSettings["KeyName"]);<br />
Console.WriteLine(allAppSettings[0]); // same output<br />
int counter = 0;<br />
IEnumerator enumer = allAppSettings.Keys.GetEnumerator();<br />
while (enumer.MoveNext())<br />
{<br />
    Console.WriteLine("Item: " + allAppSettings.Keys[counter]);<br />
    Console.WriteLine("Value: " + allAppSettings[counter]);<br />
    counter++;<br />
}</code></p>
<p><span style="text-decoration:underline;"><strong>Retrieving connection strings (non-web):</strong></span></p>
<p style="background-color:#CCEEFF;"><code>ConnectionStringSettingsCollection csSettings =   <br />
    ConfigurationManager.ConnectionStrings;<br />
if (csSettings != null)<br />
{<br />
    foreach (ConnectionStringSettings setting in csSettings)<br />
    {<br />
        Console.WriteLine("Name: " + setting.Name);<br />
        Console.WriteLine("Provider: " + setting.ProviderName);<br />
        Console.WriteLine("Cnsn string: " +<br />
            setting.ConnectionString);<br />
    }<br />
}<br />
SqlConnection cnxn = new SqlConnection(setting.ConnectionString);</code></p>
<p><span style="text-decoration:underline;"><strong>Retrieving one particular connection string (non-web):</strong></span></p>
<p style="background-color:#CCEEFF;"><code>ConnectionStringSettings settings1 =<br />
    ConfigurationManager.ConnectionStrings["sName"]; // by name<br />
ConnectionStringSettings settings2 =<br />
    ConfigurationManager.ConnectionStrings[0]; // by index<br />
if (settings1 != null)<br />
{<br />
    SqlConnection connection = new SqlConnection(<br />
        settings1.ConnectionString);<br />
}</code></p>
<p><span style="text-decoration:underline;"><strong>Retrieving connection strings (web app):</strong></span></p>
<p style="background-color:#CCEEFF;"><code>ConnectionStringsSection csSection =<br />
    WebConfigurationManager.GetWebApplicationSection<br />
    ("connectionStrings") as ConnectionStringsSection;<br />
ConnectionStringSettingsCollection csSettings =<br />
    csSection.ConnectionStrings;<br />
IEnumerator enumer = csSettings.GetEnumerator();<br />
int counter = 0;<br />
while (enumer.MoveNext())<br />
{<br />
    Console.WriteLine("Name: " + csSettings[counter].Name);<br />
    Console.WriteLine("Provider: " + csSettings<br />
        [counter].ProviderName);<br />
    Console.WriteLine("Cnxn string: " + csSettings<br />
        [counter].ConnectionString);<br />
}</code></p>
<p><span style="text-decoration:underline;"><strong>Retrieving a setting ("WebColor") from a settings file ("Settings1"):</strong></span></p>
<p style="background-color:#CCEEFF;"><code>Settings1 mySettings = new Settings1();<br />
Console.WriteLine("Color: " + mySettings.WebColor);</code></p>
<p><span style="text-decoration:underline;"><strong>Storing and retrieving custom settings (without using a Settings file):</strong></span></p>
<p style="background-color:#CCEEFF;"><code>class ExampleWrapperClass : ApplicationSettingsBase<br />
{<br />
    [UserScopedSetting()]<br />
    public string ExampleUserSetting<br />
    {<br />
        get { return this["ExampleUserSetting"] as string); }<br />
        set { this["ExampleUserSetting"] = value; }<br />
    }<br />
    [ApplicationScopedSetting()]<br />
    public int ExampleAppSetting<br />
    {<br />
        get { return (Convert.ToInt32(this["ExampleAppSetting"])); }<br />
        set { this["ExampleAppSetting"] = value; }<br />
    }<br />
}</code></p>
<p><strong><span style="text-decoration:underline;">Registering a component as a server</span></strong></p>
<p style="background-color:#CCEEFF;"><code>&#60;system.runtime.remoting&#62;<br />
    &#60;application name="ExampleApplication"&#62;<br />
        &#60;service&#62;<br />
            &#60;wellknown type="FullyQualifiedName,AssemblyName"<br />
                mode="Singleton" objectUri="ExampleClass.rem" /&#62;<br />
        &#60;/service&#62;<br />
    &#60;/application&#62;<br />
&#60;/system.runtime.remoting&#62;<br />
</code></p>
<p><strong><span style="text-decoration:underline;">Configuring a client application to consume a new assembly</span></strong></p>
<p>(If you are hosting from a local machine on port 5000...)</p>
<p style="background-color:#CCEEFF;"><code>&#60;system.runtime.remoting&#62;<br />
    &#60;application name="ExampleClientApplication"&#62;<br />
        &#60;service&#62;<br />
            &#60;wellknown type="FullyQualifiedName,AssemblyName"<br />
                url="http://localhost:5000/ExampleClass.rem" /&#62;<br />
        &#60;/service&#62;<br />
    &#60;/application&#62;<br />
&#60;/system.runtime.remoting&#62;<br />
</code></p>
]]></content:encoded>
</item>

</channel>
</rss>
