<?xml version="1.0" encoding="UTF-8"?>
<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/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>gljakal.com - blog &#187; Tips and tricks</title>
	<atom:link href="http://www.gljakal.com/blog/category/tips-and-tricks/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gljakal.com/blog</link>
	<description></description>
	<lastBuildDate>Sat, 14 Nov 2009 17:27:55 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Getting rid of the Naming container in ASP.Net 2.0 &#8211; update</title>
		<link>http://www.gljakal.com/blog/2009/10/06/getting-rid-of-the-naming-container-in-asp-net-2-0-update/</link>
		<comments>http://www.gljakal.com/blog/2009/10/06/getting-rid-of-the-naming-container-in-asp-net-2-0-update/#comments</comments>
		<pubDate>Tue, 06 Oct 2009 17:33:44 +0000</pubDate>
		<dc:creator>glJakaL</dc:creator>
				<category><![CDATA[Tips and tricks]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[web design]]></category>

		<guid isPermaLink="false">http://www.gljakal.com/blog/?p=59</guid>
		<description><![CDATA[In my previous article, Getting rid of the Naming Container in asp.net 2.0, I explained a method to override the extended naming functionality provided by ASP.net in order to create client-side controls with better IDs.
I was however informed in the comments that by overriding the NamingContainer property the control loses the ability to read its [...]]]></description>
			<content:encoded><![CDATA[<p>In my previous article, <a href="http://www.gljakal.com/blog/2007/09/12/getting-rid-of-the-naming-container-in-aspnet-20/">Getting rid of the Naming Container in asp.net 2.0</a>, I explained a method to override the extended naming functionality provided by ASP.net in order to create client-side controls with better IDs.</p>
<p>I was however informed in the comments that by overriding the NamingContainer property the control loses the ability to read its value from the PostBack data.</p>
<p>Since the controls I developed were not meant to to be used in a postback scenario, this wasn’t a big problem for me.</p>
<p>Fast-forward a couple of years and here I am, wondering why post back does not work in one of my projects <img src='http://www.gljakal.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Anyway, I looked at the link provided by Alex, where <a href="http://www.west-wind.com/WebLog/ShowPost.aspx?id=4605">Rick Strahl talks about overriding the <code>ClientId</code> and the <code>UniqueId</code> properties</a> instead of <code>NamingContainer</code>.</p>
<p>In a standard web control, the two properties <code>ClientID</code> and <code>UniqueID</code> are mapped, respectively, to the <code>id</code> and <code>name</code> properties of the HTML control generated. </p>
<p>Since most (all? ) JS frameworks use the <code>id</code> property to access the varius HTML elements and the PostBack mechanism uses the <code>name</code> property, I think the “best of both worlds” solution is to only override the ClientId:</p>
</p>
<p>  <pre><pre class="csharpcode">&lt;p&gt;&lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;class&lt;/span&gt; NiceTextBox : System.Web.UI.WebControls.TextBox
{
&nbsp;&nbsp;&nbsp;&nbsp;&lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;bool&lt;/span&gt; UseNamingContainer { get; set; }
&lt;/p&gt;&lt;p&gt;&nbsp;&nbsp;&nbsp;&nbsp;&lt;br /&gt;&nbsp;&nbsp;&nbsp;&nbsp;&lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;override&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt; ClientID
&nbsp;&nbsp;&nbsp;&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;get
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;span class=&quot;kwrd&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;kwrd&quot;&gt;this&lt;/span&gt;.UseNamingContainer)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;span class=&quot;kwrd&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;base&lt;/span&gt;.ClientID;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;span class=&quot;kwrd&quot;&gt;else&lt;/span&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;span class=&quot;kwrd&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;this&lt;/span&gt;.ID;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;&nbsp;&nbsp;}
}
&lt;/p&gt;</pre></pre></p>
<style type="text/css">
<p>.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
<p>Now our NiceTextBox works even during post-back scenarios <img src='http://www.gljakal.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  </p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwww.gljakal.com%2Fblog%2F2009%2F10%2F06%2Fgetting-rid-of-the-naming-container-in-asp-net-2-0-update%2F';
  addthis_title  = 'Getting+rid+of+the+Naming+container+in+ASP.Net+2.0+%26%238211%3B+update';
  addthis_pub    = 'gljakal';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://www.gljakal.com/blog/2009/10/06/getting-rid-of-the-naming-container-in-asp-net-2-0-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to start any program with Windows</title>
		<link>http://www.gljakal.com/blog/2007/06/22/how-to-start-any-program-with-windows/</link>
		<comments>http://www.gljakal.com/blog/2007/06/22/how-to-start-any-program-with-windows/#comments</comments>
		<pubDate>Fri, 22 Jun 2007 18:24:39 +0000</pubDate>
		<dc:creator>glJakaL</dc:creator>
				<category><![CDATA[Tips and tricks]]></category>
		<category><![CDATA[gljakal software]]></category>

		<guid isPermaLink="false">http://gljakal.com/blog/2007/06/22/how-to-start-any-program-with-windows/</guid>
		<description><![CDATA[A lot of people asked me what&#8217;s the best way to launch Clock! as soon as they log into their computers.
In Windows, there is a very simple way to start any program right after you type your username and your password in the login screen. It&#8217;s called the &#8220;Startup Menu&#8221;.

The startup menu is simply a [...]]]></description>
			<content:encoded><![CDATA[<p>A lot of people asked me what&#8217;s the best way to launch Clock! as soon as they log into their computers.<br />
In Windows, there is a very simple way to start any program right after you type your username and your password in the login screen. It&#8217;s called the &#8220;Startup Menu&#8221;.</p>
<p><a class="imagelink" style="display: block;width: 490px;overflow: auto;" href="http://gljakal.com/blog/wp-content/uploads/2007/06/startup_l.jpg" title="The startup menu"><img id="image42" src="http://gljakal.com/blog/wp-content/uploads/2007/06/startup_s.jpg" alt="The startup menu" /></a></p>
<p>The startup menu is simply a folder located under &#8220;All programs&#8221; in your Start menu. Every program located in this folder is automatically launched when you log into windows.<br />
How do you add an item to the startup menu? The first thing to do is right-click it and choose <strong>Open</strong>. Now, probably you have a link to the program you would like to launch on your desktop. Just drag and drop your desktop icon inside the startup menu folder and there you have it: your favorite program will now start with windows!</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwww.gljakal.com%2Fblog%2F2007%2F06%2F22%2Fhow-to-start-any-program-with-windows%2F';
  addthis_title  = 'How+to+start+any+program+with+Windows';
  addthis_pub    = 'gljakal';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://www.gljakal.com/blog/2007/06/22/how-to-start-any-program-with-windows/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>gljakal&#8217;s MP3Streamer</title>
		<link>http://www.gljakal.com/blog/2007/04/17/gljakals-mp3streamer/</link>
		<comments>http://www.gljakal.com/blog/2007/04/17/gljakals-mp3streamer/#comments</comments>
		<pubDate>Tue, 17 Apr 2007 15:42:22 +0000</pubDate>
		<dc:creator>glJakaL</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Tips and tricks]]></category>
		<category><![CDATA[gljakal software]]></category>

		<guid isPermaLink="false">http://gljakal.com/blog/2007/04/17/gljakals-mp3streamer/</guid>
		<description><![CDATA[
Have you ever visited the website of an independent musician? Often you will find that they are kind enough to let you download some of their tracks in mp3 format. But then you have to download the mp3 somewhere on your computer, wait for the transfer to complete and (if you still remember where you [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.gljakal.com/mp3" title="play mp3 files online"><img id="image34" src="http://gljakal.com/blog/wp-content/uploads/2007/04/mp3stream.png" alt="gljakal's MP3Streamer screenshot" /></a><br />
Have you ever visited the website of an independent musician? Often you will find that they are kind enough to let you download some of their tracks in mp3 format. But then you have to download the mp3 somewhere on your computer, wait for the transfer to complete and (if you still remember where you actually saved it!) open the mp3 file with your audio player of choice. Isn&#8217;t there a quicker way to listen to a song or a podcast? Sure there is! <br />
<a href="http://www.gljakal.com/mp3" title="play mp3 files online">Gljakal&#8217;s MP3Streamer</a> does just that, in the simplest way possible: just copy the address of the song you want to listen in the &#8220;mp3 file address&#8221; field and hit &#8220;Stream&#8221; to start listening: no downloads, no waiting, it&#8217;s all set!<br />
If you are a musician or a podcaster, you can also use the HTML code provided to embed the mp3 player directly into your site!<br />
Also, if you are really really lazy like me, you can get a <a href="http://en.wikipedia.org/wiki/Bookmarklet" title="what's a bookmarklet?">bookmarklet</a> that will convert all the links to mp3 files in the page you are currently visiting in mp3 players <img src='http://www.gljakal.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .<br />
Have fun!</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwww.gljakal.com%2Fblog%2F2007%2F04%2F17%2Fgljakals-mp3streamer%2F';
  addthis_title  = 'gljakal%26%238217%3Bs+MP3Streamer';
  addthis_pub    = 'gljakal';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://www.gljakal.com/blog/2007/04/17/gljakals-mp3streamer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick searches in Firefox</title>
		<link>http://www.gljakal.com/blog/2006/04/28/quick-searches-in-firefox/</link>
		<comments>http://www.gljakal.com/blog/2006/04/28/quick-searches-in-firefox/#comments</comments>
		<pubDate>Fri, 28 Apr 2006 09:09:50 +0000</pubDate>
		<dc:creator>glJakaL</dc:creator>
				<category><![CDATA[Tips and tricks]]></category>

		<guid isPermaLink="false">http://gljakal.com/blog/2006/04/28/quick-searches-in-firefox/</guid>
		<description><![CDATA[One thing I really loved about Opera (the browser), is that you can launch a google search simply by typing the letter g followed by your search phrase in the address bar: so, for example, if I&#8217;m searching for free task management software, I can just type &#8220;g free task management software&#8221; in the address [...]]]></description>
			<content:encoded><![CDATA[<p>One thing I really loved about Opera (the browser), is that you can launch a google search simply by typing the letter <strong>g</strong> followed by your search phrase in the address bar: so, for example, if I&#8217;m searching for <em>free task management software</em>, I can just type &#8220;<em><strong>g</strong> free task management software</em>&#8221; in the address bar and I&#8217;ll be taken to the google results page for my search phrase. This is an incredibly nice feature to have, because it greatly speeds up any web search.<br />
Firefox users will surely love to learn that their favorite browser has an even better approach to the same feature. Not only Firefox comes with an array of quick searches (for example, &#8220;google&#8221; searches on google, &#8220;wp&#8221; searches on wikipedia and so on), but these searches are totally configurable! <br />
For example, <strong>let&#8217;s try to add a quick search for Google Images</strong>, so that when I want to search for an image of a cat I can just type &#8220;i cat&#8221; in the address bar.<br />
First, we have to go to the <a href="http://www.google.com/imghp">google images page</a>. <br />
Next, we need to right click inside the text box and choose &#8220;Add a keyword for this search&#8221;.</p>
<p><a href="http://gljakal.com/blog/wp-content/uploads/2006/04/addkgimagesbig.png" title="Adding a quick search for Google Images in Firefox - step one" ><br />
<img id="image14" class="centered" src="http://gljakal.com/blog/wp-content/uploads/2006/04/addkgimagessmall.png" alt="Adding a quick search for Google Images in Firefox - step one"  /></a></p>
<p> The &#8220;Add Bookmark&#8221; window pops up. Let&#8217;s use &#8220;Google Images&#8221; as the bookmark&#8217;s name and &#8220;i&#8221; as the bookmark&#8217;s keyword.<br />
I usually save my quick searches inside a folder named &#8220;Quick Searches&#8221;.</p>
<p><img class="centered" id="image15" src="http://gljakal.com/blog/wp-content/uploads/2006/04/gimg_bk.png" alt="Adding a quick search for Google Images in Firefox - step two" /></p>
<p>Press Ok and you&#8217;re done! Now, any time you want to search for an image you just need to type the letter i followed by your search terms in the address bar and you will be taken to the google images results page.</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwww.gljakal.com%2Fblog%2F2006%2F04%2F28%2Fquick-searches-in-firefox%2F';
  addthis_title  = 'Quick+searches+in+Firefox';
  addthis_pub    = 'gljakal';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://www.gljakal.com/blog/2006/04/28/quick-searches-in-firefox/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Enchance text readability on your laptop</title>
		<link>http://www.gljakal.com/blog/2006/02/21/enchance-text-readability-on-your-laptop/</link>
		<comments>http://www.gljakal.com/blog/2006/02/21/enchance-text-readability-on-your-laptop/#comments</comments>
		<pubDate>Tue, 21 Feb 2006 11:38:05 +0000</pubDate>
		<dc:creator>glJakaL</dc:creator>
				<category><![CDATA[Tips and tricks]]></category>

		<guid isPermaLink="false">http://gljakal.com/blog/2006/02/21/enchance-text-readability-on-your-laptop/</guid>
		<description><![CDATA[A lot of people don&#8217;t know this, but you can greatly enhance the appearance of the text displayed on your screen by turning on ClearType.
Cleartype is a new feature introduced in Windows XP that uses a technique known as &#8220;sub-pixel font rendering&#8221; to &#8220;round up&#8221; the text displayed.
While the &#8220;cleartyped&#8221; text may be a little [...]]]></description>
			<content:encoded><![CDATA[<p>A lot of people don&#8217;t know this, but you can greatly enhance the appearance of the text displayed on your screen by turning on <em>ClearType</em>.<br />
Cleartype is a new feature introduced in Windows XP that uses a technique known as &#8220;sub-pixel font rendering&#8221; to &#8220;round up&#8221; the text displayed.<br />
While the &#8220;cleartyped&#8221; text may be a little too blurry on normal CRT monitors, it becomes more readable and pleasing to the eye on laptop monitors.<br />
<img src="http://gljakal.com/blog/wp-content/uploads/2006/02/VerdanaCompareVertical.png" alt="Cleartype vs standard" title="Cleartype vs standard" /><br />
Cleartype is enabled by right-clicking on your desktop, selecting [Properties], then on the [Appearance] tab clicking on [Effects] and finally enabling &#8220;use the following method to smooth edges of screen fonts&#8221;. You can choose [Standard] or [Cleartype]. The difference between standard and cleartype is that the standard setting smooths only big-sized text, thus making it more suitable to CRT displays.<br />
You can also change your Cleartype settings with <a href="http://www.ioisland.com/cleartweak/">ClearTweak</a>, a free software from <a href="http://www.ioisland.com/">ioIsland.com</a>.</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwww.gljakal.com%2Fblog%2F2006%2F02%2F21%2Fenchance-text-readability-on-your-laptop%2F';
  addthis_title  = 'Enchance+text+readability+on+your+laptop';
  addthis_pub    = 'gljakal';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://www.gljakal.com/blog/2006/02/21/enchance-text-readability-on-your-laptop/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
