<?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>Fundamental Provocation &#187; vs.net</title> <atom:link href="http://www.ajaymatharu.com/tag/vsnet/feed/" rel="self" type="application/rss+xml" /><link>http://www.ajaymatharu.com</link> <description>Blog by Ajay Matharu</description> <lastBuildDate>Sun, 06 Nov 2011 15:09:39 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" /> <item><title>Server Application Unavailable</title><link>http://www.ajaymatharu.com/server-application-unavailable/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=server-application-unavailable</link> <comments>http://www.ajaymatharu.com/server-application-unavailable/#comments</comments> <pubDate>Thu, 22 Apr 2010 04:15:51 +0000</pubDate> <dc:creator>Ajay Matharu</dc:creator> <category><![CDATA[.Net]]></category> <category><![CDATA[ASP.Net]]></category> <category><![CDATA[Development]]></category> <category><![CDATA[asp.net 1.1]]></category> <category><![CDATA[asp.net 1.1 server error]]></category> <category><![CDATA[IIS]]></category> <category><![CDATA[server unavailable]]></category> <category><![CDATA[Virtual Directory Error]]></category> <category><![CDATA[vs.net]]></category><guid isPermaLink="false">http://ajaymatharu.wordpress.com/?p=458</guid> <description><![CDATA[Many a time while developing a web application you may come accross &#8220;Server application unavailable&#8221; When you get this error in Windows XP make sure you have given ASPNET user sufficient rights on your physical application folder, it mainly requires read permission. When you get this error in Windows 2003 server you can right click [...]]]></description> <content:encoded><![CDATA[<p>Many a time while developing a web application you may come accross &#8220;Server application unavailable&#8221;</p><p><a href="http://ajaymatharu.files.wordpress.com/2008/11/unavailable2.jpg"><img class="aligncenter size-full wp-image-463" title="unavailable2" src="http://ajaymatharu.files.wordpress.com/2008/11/unavailable2.jpg" alt="unavailable2" width="500" height="284" /></a></p><p>When you get this error in Windows XP make sure you have given ASPNET user sufficient rights on your physical application folder, it mainly requires read permission.</p><p>When you get this error in Windows 2003 server you can right click your virtual directory &#8211; permission &#8211; grant aspnet user sufficient rights there.</p><p>If the above solution doesn&#8217;t work here is another alternative,</p><p>You could try editing the Machine.config (located in<br /> C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\CONFI G\).</p><p>Look for a key userName=&#8221;machine&#8221;. If you set it to &#8220;SYSTEM&#8221;<br /> instead the aspnet_wp.exe runs with a different user (with<br /> higher privileges).</p><p>Hope this helps</p> ]]></content:encoded> <wfw:commentRss>http://www.ajaymatharu.com/server-application-unavailable/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Changing the target framework for the setup file</title><link>http://www.ajaymatharu.com/changing-the-target-framework-for-the-setup-file/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=changing-the-target-framework-for-the-setup-file</link> <comments>http://www.ajaymatharu.com/changing-the-target-framework-for-the-setup-file/#comments</comments> <pubDate>Mon, 25 Jan 2010 08:36:49 +0000</pubDate> <dc:creator>Ajay Matharu</dc:creator> <category><![CDATA[.Net]]></category> <category><![CDATA[Setup]]></category> <category><![CDATA[Visual Studio]]></category> <category><![CDATA[.net framework]]></category> <category><![CDATA[application project]]></category> <category><![CDATA[Change target framework]]></category> <category><![CDATA[deployment project]]></category> <category><![CDATA[Framework]]></category> <category><![CDATA[framework version]]></category> <category><![CDATA[microsoft net framework]]></category> <category><![CDATA[Setup for Framework v2.0]]></category> <category><![CDATA[Setup Project]]></category> <category><![CDATA[Target Framework]]></category> <category><![CDATA[vs.net]]></category> <category><![CDATA[windows application]]></category><guid isPermaLink="false">http://www.ajaymatharu.com/?p=1167</guid> <description><![CDATA[One of my team member, kunal, was facing a problem while creating the setup project for v 20 using VS 2008. Even after just changing the target framework while creating the project did no help so had to search for the solution, and the solution that solved our problem is as follows, 1) Create a [...]]]></description> <content:encoded><![CDATA[<p>One of my team member, <a href="http://kunalsidhpura.wordpress.com" target="_blank">kunal</a>, was facing a problem while creating the setup project for v 20 using VS 2008. Even after just changing the target framework while creating the project did no help so had to search for the solution, and the solution that solved our problem is as follows,</p><p><strong>1) Create a windows application project with target framework as v2.0</strong></p><p><strong> </strong></p><div class="wp-caption aligncenter" style="width: 692px"><strong><strong><img title="Select Framework" src="http://ajaymatharu.wordpress.com/files/2009/05/1selectframework.png" alt="Select Target Framework" width="682" height="313" /></strong></strong><p class="wp-caption-text">Select Target Framework</p></div><p><strong> </strong></p><p><strong>2) Create Setup and deployment project and select target framework as v2.0</strong></p><p><strong> </strong></p><div class="wp-caption aligncenter" style="width: 691px"><strong><strong><img title="Target framework for setup" src="http://ajaymatharu.wordpress.com/files/2009/05/2setupframework.png" alt="Target Framework for Setup" width="681" height="463" /></strong></strong><p class="wp-caption-text">Target Framework for Setup</p></div><p><strong> </strong></p><p><strong>3) Right-Click on setup project Name and select Properties, under properties select Prerequisites<br /> </strong></p><p><strong> </strong></p><div class="wp-caption aligncenter" style="width: 565px"><strong><strong><img title="select prerequisite" src="http://ajaymatharu.wordpress.com/files/2009/05/4prerequisite.png" alt="Select Prerequisite" width="555" height="440" /></strong></strong><p class="wp-caption-text">Select Prerequistes</p></div><p><strong> </strong></p><p><strong>4) Check .NET framework 2.0 and uncheck .NET framework 3.5</strong></p><p><strong> </strong></p><div class="wp-caption aligncenter" style="width: 512px"><strong><strong><img title="Select framework in prerequisite" src="http://ajaymatharu.wordpress.com/files/2009/05/5selectprerequisite.png" alt="Select Framework in Prerequisite" width="502" height="395" /></strong></strong><p class="wp-caption-text">Select Framework in Prerequisite</p></div><p><strong> </strong></p><p><strong>5) Under Solution Explorer double click on Microsoft.NET framework under</strong></p><p><strong> Setup project.</strong></p><p><strong> </strong></p><div class="wp-caption aligncenter" style="width: 267px"><strong><strong><img title="Select Framework" src="http://ajaymatharu.wordpress.com/files/2009/05/6framework.png" alt="Select the Framwork to change the version" width="257" height="226" /></strong></strong><p class="wp-caption-text">Select the Framwork to change the version</p></div><p><strong> </strong></p><p><strong>6) Right-Click on .NET framework select properties and change the version to v2.0&#8230;</strong></p><p><strong> </strong></p><div class="wp-caption aligncenter" style="width: 786px"><strong><strong><img title="Framework Version" src="http://ajaymatharu.wordpress.com/files/2009/05/8changeversion.png" alt="Change Framework Version" width="776" height="483" /></strong></strong><p class="wp-caption-text">Change Framework Version</p></div><p><strong> </strong></p> ]]></content:encoded> <wfw:commentRss>http://www.ajaymatharu.com/changing-the-target-framework-for-the-setup-file/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Add another application as child of BlogEngine.net</title><link>http://www.ajaymatharu.com/add-another-application-as-child-of-blogengine-net/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=add-another-application-as-child-of-blogengine-net</link> <comments>http://www.ajaymatharu.com/add-another-application-as-child-of-blogengine-net/#comments</comments> <pubDate>Fri, 28 Aug 2009 17:48:52 +0000</pubDate> <dc:creator>Ajay Matharu</dc:creator> <category><![CDATA[.Net]]></category> <category><![CDATA[ASP.Net]]></category> <category><![CDATA[Development]]></category> <category><![CDATA[Visual Studio]]></category> <category><![CDATA[BE]]></category> <category><![CDATA[Blog]]></category> <category><![CDATA[Blog Engine]]></category> <category><![CDATA[blogengine]]></category> <category><![CDATA[blogengine.net]]></category> <category><![CDATA[Code]]></category> <category><![CDATA[Microsoft]]></category> <category><![CDATA[VS]]></category> <category><![CDATA[vs.net]]></category><guid isPermaLink="false">http://www.ajaymatharu.com/?p=1632</guid> <description><![CDATA[I have been getting good response for my post Integrating blog engine into existing site. One of the guy asked me this question on how can we do the opposite? He had a BlogEngine as parent site and needed some other site to be child of BlogEngine. So He posted on that and this is [...]]]></description> <content:encoded><![CDATA[<p>I have been getting good response for my post <a href="http://www.ajaymatharu.com/integrating-blogengine-into-an-existing-site/" target="_blank">Integrating blog engine into existing site</a>. One of the guy asked me this question on how can we do the opposite? He had a BlogEngine as parent site and needed some other site to be child of BlogEngine. So He posted on that and this is the answer he got for his question.</p><p>You need to make this change in your web.config file. If you want to have a website as child of BlogEngine</p><pre name="code" class="xml"><strong>&lt;location path="." inheritInChildApplications="false"&gt;</strong>
 &lt;system.web&gt;
 ..... existing content .....
 &lt;/system.web&gt;
<strong>&lt;/location&gt;</strong>

<strong>&lt;location path="." inheritInChildApplications="false"&gt;</strong>
 &lt;system.webServer&gt;
 ..... existing content .....
 &lt;/system.webServer&gt;
<strong>&lt;/location&gt;</strong></pre>]]></content:encoded> <wfw:commentRss>http://www.ajaymatharu.com/add-another-application-as-child-of-blogengine-net/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Visual Studio 2010 IDE Overview</title><link>http://www.ajaymatharu.com/visual-studio-2010-ide-overview/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=visual-studio-2010-ide-overview</link> <comments>http://www.ajaymatharu.com/visual-studio-2010-ide-overview/#comments</comments> <pubDate>Sat, 25 Jul 2009 06:03:37 +0000</pubDate> <dc:creator>Ajay Matharu</dc:creator> <category><![CDATA[Technology]]></category> <category><![CDATA[Visual Studio]]></category> <category><![CDATA[.Net]]></category> <category><![CDATA[.Net Framework 4.0]]></category> <category><![CDATA[Visual Studio 2010]]></category> <category><![CDATA[Visual Studio 2010 IDE]]></category> <category><![CDATA[vs.net]]></category><guid isPermaLink="false">http://ajaymatharu.wordpress.com/?p=509</guid> <description><![CDATA[Understanding existing, and writing new, code As the complexity of applications grows so does the challenge of understanding the code that you’re working on. With Visual Studio 2010 the IDE provides integrated support for understanding what is happening in the code section that you’re viewing. The editor in Visual Studio 2010 has been rebuilt using [...]]]></description> <content:encoded><![CDATA[<p><strong>Understanding existing, and writing new, code</strong></p><p>As the complexity of applications grows so does the<br /> challenge of understanding the code that you’re working<br /> on. With Visual Studio 2010 the IDE provides integrated<br /> support for understanding what is happening in the code<br /> section that you’re viewing.</p><p>The editor in Visual Studio 2010 has been rebuilt using the<br /> Windows Presentation Foundation (WPF) technology. WPF<br /> enables the editor to richly present information about the<br /> code in the context of presenting the actual source. This ability<br /> enables features such as the “Document Map Margin” to render<br /> a graphical view of the source file including information such as<br /> layout, code coverage, symbol highlights and comments.</p><p>This editor ability also enables 3rd parties to create add-ins<br /> that show custom views of the underlying source file such as<br /> taking the XML Doc Comments and converting them to a rich<br /> presentation formation with fonts, colors and highlighting. It<br /> enables Visual Studio to display different layers on the editor<br /> so an add-in could represent a code-based formula in its<br /> traditional mathematical representation.</p><p>While the representation of the underlying source code is<br /> important so is the ability to understand what the code is<br /> actually doing. In Visual Studio 2010, features such as “Inline<br /> Call Hierarchy” &#8211; a feature which enables a developer to select<br /> an entity or method and see how the code calls inwards or<br /> outwards or passes the entity in and out of the code section<br /> - provide developers with the ability to understand the<br /> interaction of the code without needing to juggle multiple<br /> files. Other features such as “Highlight References”, which<br /> provide a visual representation of the references to a selected<br /> entity in the code without needing to use the “Find In Files”<br /> feature, or “Quick Searching”, which delivers a ‘word wheel’<br /> based search tool integrated with “Highlight References”,<br /> enable developers to maintain the context of where they are<br /> but gain the understanding of other locations in the code.</p><p>Additionally the editor integrates with the project system to<br /> simplify the pattern of Test Driver Development (TDD). With<br /> TDD, developers build the tests that will exercise their application<br /> code before they actually write that code. In Visual Studio<br /> 2010 developers can create tests and the editor will provide<br /> functionality to automatically implement the tested classes and<br /> code in the file the developer chooses. This enables developers to<br /> quickly create the class they are consuming without needing to<br /> break out of the test development flow to declare the tested class.</p> ]]></content:encoded> <wfw:commentRss>http://www.ajaymatharu.com/visual-studio-2010-ide-overview/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Visual Studio 2010 &#8211; My Review</title><link>http://www.ajaymatharu.com/visual-studio-2010-my-review/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=visual-studio-2010-my-review</link> <comments>http://www.ajaymatharu.com/visual-studio-2010-my-review/#comments</comments> <pubDate>Sat, 25 Jul 2009 06:03:31 +0000</pubDate> <dc:creator>Ajay Matharu</dc:creator> <category><![CDATA[.Net]]></category> <category><![CDATA[Development]]></category> <category><![CDATA[Technology]]></category> <category><![CDATA[Visual Studio]]></category> <category><![CDATA[.Net Framework 4.0]]></category> <category><![CDATA[Visual Studio 2010]]></category> <category><![CDATA[Visual Studio 2010 Review]]></category> <category><![CDATA[vs.net]]></category><guid isPermaLink="false">http://ajaymatharu.wordpress.com/?p=617</guid> <description><![CDATA[Hi Guys, Microsoft released Visual Studio 2010 CTP in October. You&#8217;ll be amazed with the download size its near about 7 GB. You can download it from here. After you download you&#8217;ll run the .exe file to extract the setup and the setup is of the .vhd format that is Virtual PC hard disk. So [...]]]></description> <content:encoded><![CDATA[<p>Hi Guys, Microsoft released Visual Studio 2010 CTP in October. You&#8217;ll be amazed with the download size its near about 7 GB. You can download it from <a href="http://www.microsoft.com/downloads/details.aspx?familyid=922b4655-93d0-4476-bda4-94cf5f8d4814&amp;displaylang=en" target="_blank">here</a>.</p><p>After you download you&#8217;ll run the .exe file to extract the setup and the setup is of the .vhd format that is Virtual PC hard disk. So you&#8217;ll need Virtual PC to run Visual Studio 2010.</p><p>But, but, but guys please check out the minimum requirement for this CTP to run. Hard disk space required is 75 GB, yes, its not 7.5 but 75 GB. Well that&#8217;s not true you can have this CTP run if you have upto 25 GB on one drive.</p><p>When you extract the .exe file the .vhd file extracted is of size 23 GB.  Also when you bind the .vhd file to the virtual pc, you need minimum 1GB ram allocated to the Virtual PC disk.</p><p>When I ran the Visual Studio for the first time the screen took around 10 mins to load and I just shut down the CTP and got back to work.</p><p>The reason for the extracted file to be of 23 GB is because that VHD when you map to Virtual PC will have Visual Studio 2010, Visual Studio 2008,  SQL  Server 2008, SQL Server 2005 + many more software installed.</p><p>When you execute the Virtual PC which is mapped to VHD, Virtual PC will load Windows Server 2008 and it takes lots of  burden it killed my laptop. Although I have fair enough configuration. My processor is Core 2 Duo, 1.83 GHZ and with 1 GB ram. Yet it just killed my PC performance.</p><p>I even tried to extract the file on an External Hard Disk and Even on my IPod classic. But I was able to extract only first rar file. I googled the reason and found it was because the External Hard Disk is of FAT32 format and they do not support data transfer of more than 4GB. So I had to clean up my Hard Disk and extract 23 GB .vhd file there.</p><p>I really did not understood why Microsoft shipped Visual Studio 2010 this way. With 7GB download size and 23 GB extracted file. I was really disappointed with such strategy. Microsoft must have shipped Visual Studio 2010 as a single file. What could be the reason for adopting this process?</p><p>Here is my Virtual PC screen shot with Visual Studio 2010</p><p style="text-align:center;"><img class="aligncenter size-full wp-image-616" title="vs2010" src="http://ajaymatharu.files.wordpress.com/2008/12/vs2010.jpg" alt="vs2010" width="650" height="406" /></p> ]]></content:encoded> <wfw:commentRss>http://www.ajaymatharu.com/visual-studio-2010-my-review/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Numeric Format Strings</title><link>http://www.ajaymatharu.com/numeric-format-strings/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=numeric-format-strings</link> <comments>http://www.ajaymatharu.com/numeric-format-strings/#comments</comments> <pubDate>Sat, 25 Jul 2009 06:03:29 +0000</pubDate> <dc:creator>Ajay Matharu</dc:creator> <category><![CDATA[.Net]]></category> <category><![CDATA[Visual Studio]]></category> <category><![CDATA[ASP.Net]]></category> <category><![CDATA[C#.Net]]></category> <category><![CDATA[format specifier]]></category> <category><![CDATA[format string]]></category> <category><![CDATA[numeric Format]]></category> <category><![CDATA[numeric format strings]]></category> <category><![CDATA[numeric types]]></category> <category><![CDATA[Objects]]></category> <category><![CDATA[vs.net]]></category><guid isPermaLink="false">http://www.ajaymatharu.com/?p=1276</guid> <description><![CDATA[Standard numeric format strings are used to return string equivalents of numeric types in predefined patterns. When used with ToString, a standard numeric format string parameter takes the form. object.ToString ( "Fn" ); where F is a single alphabetic character called the format specifier, and n can be one or more digits called the precision [...]]]></description> <content:encoded><![CDATA[<p>Standard numeric format strings are used to return string equivalents of numeric types in predefined patterns. When used with ToString, a standard numeric format string parameter takes the form.</p><pre class="c-sharp">object.ToString ( "Fn" );</pre><p>where F is a single alphabetic character called the format specifier, and n can be one or more digits called the precision specifier.</p><p>The following table describes the standard numeric format strings. Note that the patterns produced by these format specifiers are influenced by the settings in the Regional Options control panel. Computers using different cultures or different currency settings will display different patterns.</p><table class="data" border="0" cellspacing="1" width="95%" align="center"><col width="20%"></col><col width="25%"></col><col width="55%"></col><tbody><tr><th>Format specifier</th><th>Name</th><th>Description</th></tr><tr><td>C or c</td><td>Currency</td><td>The number is converted to a string that represents a currency amount. The conversion is controlled by the currency format information of the <a href="http://www.ajaymatharu.com/aspxtreme/sys/Globalization/NumberFormatInfoClass.aspx">NumberFormatInfo</a> object used to format the number. The precision specifier indicates the desired number of decimal places. If the precision specifier is omitted, the default currency precision given by the <strong>NumberFormatInfo</strong> is used.</td></tr><tr><td>D or d</td><td>Decimal</td><td>This format is supported for integral types only. The number is converted to a string of decimal digits ( 0-9 ), prefixed by a minus sign if the number is negative. The precision specifier indicates the minimum number of digits desired in the resulting string. If required, the number is padded with zeros to its left to produce the number of digits given by the precision specifier.</td></tr><tr><td>E or e</td><td>Scientific ( exponential )</td><td>The number is converted to a string of the form &#8220;-d.ddd�E+ddd&#8221; or &#8220;-d.ddd�e+ddd&#8221;, where each &#8216;d&#8217; indicates a digit ( 0-9 ). The string starts with a minus sign if the number is negative. One digit always precedes the decimal point. The precision specifier indicates the desired number of digits after the decimal point. If the precision specifier is omitted, a default of six digits after the decimal point is used. The case of the format specifier indicates whether to prefix the exponent with an &#8216;E&#8217; or an &#8216;e&#8217;. The exponent always consists of a plus or minus sign and a minimum of three digits. The exponent is padded with zeros to meet this minimum, if required.</td></tr><tr><td>F or f</td><td>Fixed-point</td><td>The number is converted to a string of the form &#8220;-ddd.ddd�&#8221; where each &#8216;d&#8217; indicates a digit ( 0-9 ). The string starts with a minus sign if the number is negative. The precision specifier indicates the desired number of decimal places. If the precision specifier is omitted, the default numeric precision given by the <strong>NumberFormatInfo</strong> is used.</td></tr><tr><td>G or g</td><td>General</td><td>The number is converted to the most compact decimal form, using fixed or scientific notation. The precision specifier determines the number of significant digits in the resulting string. If the precision specifier is omitted, the number of significant digits is determined by the type of number being converted:</p><ul><li><strong>Int16</strong> or <strong>UInt16</strong>: 5 digits</li><li><strong>Int32</strong> or <strong>UInt32</strong>: 10 digits</li><li><strong>Int64</strong> or <strong>UInt64</strong>: 19 digits</li><li><strong>Single</strong>: 7 digits</li><li><strong>Double</strong>: 15 digits</li><li><strong>Decimal</strong>: 29 digits</li></ul><p>Trailing zeros after the decimal point are removed, and the resulting string contains a decimal point only if required.</p><p>The resulting string uses fixed-point format if the exponent of the number ( as produced by the &#8216;E&#8217; format ) is less than the number of significant digits, and greater than or equal to –4. Otherwise, the resulting string uses scientific format, and the case of the format specifier controls whether the format is prefixed with an &#8216;E&#8217; or an &#8216;e&#8217;.</td></tr><tr><td>N or n</td><td>Number</td><td>The number is converted to a string of the form &#8220;-d,ddd,ddd.ddd�&#8221;, where each &#8216;d&#8217; indicates a digit ( 0-9 ). The string starts with a minus sign if the number is negative. Thousand separators are inserted between each group of three digits to the left of the decimal point. The precision specifier indicates the desired number of decimal places. If the precision specifier is omitted, the default numeric precision given by the <strong>NumberFormatInfo</strong> is used.</td></tr><tr><td>P or p</td><td>Percent</td><td>The number is converted to a string that represents a percent as defined by the <a href="http://www.ajaymatharu.com/aspxtreme/sys/Globalization/NumberFormatInfoClassPercentNegativePattern.aspx">NumberFormatInfo.PercentNegativePattern</a> property or the <a href="http://www.ajaymatharu.com/aspxtreme/sys/Globalization/NumberFormatInfoClassPercentPositivePattern.aspx">NumberFormatInfo.PercentPositivePattern</a> property. If the number is negative, the string produced is defined by the <strong>PercentNegativePattern</strong> and starts with a minus sign. The converted number is multiplied by 100 in order to be presented as a percentage. The precision specifier indicates the desired number of decimal places. If the precision specifier is omitted, the default numeric precision given by <strong>NumberFormatInfo</strong> is used.</td></tr><tr><td>R or r</td><td>Round-trip</td><td>The round-trip specifier guarantees that a numeric value converted to a string will be parsed back into the same numeric value. When a numeric value is formatted using this specifier, it is first tested using the general format, with 15 spaces of precision for a <strong>Double</strong> and 7 spaces of precision for a <strong>Single</strong>. If the value is successfully parsed back to the same numeric value, then it is formatted using the general format specifer. However, if the value is not successfully parsed back to the same numeric value, then the value is formatted using 17 digits of precision for a <strong>Double</strong> and 9 digits of precision for a <strong>Single</strong>. Although a precision specifier can be appended to the round-trip format specifier, it is ignored. Round trips are given precedence over precision when using this specifier. This format is supported by floating-point types only.</td></tr><tr><td>X or x</td><td>Hexadecimal</td><td>The number is converted to a string of hexadecimal digits. The case of the format specifier indicates whether to use uppercase or lowercase characters for the hexadecimal digits greater than 9. For example, use &#8216;X&#8217; to produce &#8216;ABCDEF&#8217;, and &#8216;x&#8217; to produce &#8216;abcdef&#8217;. The precision specifier indicates the minimum number of digits desired in the resulting string. If required, the number is padded with zeros to its left to produce the number of digits given by the precision specifier. This format is supported for integral types only.</td></tr></tbody></table> ]]></content:encoded> <wfw:commentRss>http://www.ajaymatharu.com/numeric-format-strings/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Text Template Transformation Toolkit (T4) &#8211; T4 Template</title><link>http://www.ajaymatharu.com/text-template-transformation-toolkit-t4-t4-template/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=text-template-transformation-toolkit-t4-t4-template</link> <comments>http://www.ajaymatharu.com/text-template-transformation-toolkit-t4-t4-template/#comments</comments> <pubDate>Fri, 24 Jul 2009 03:34:45 +0000</pubDate> <dc:creator>Ajay Matharu</dc:creator> <category><![CDATA[.Net]]></category> <category><![CDATA[ASP.Net]]></category> <category><![CDATA[Development]]></category> <category><![CDATA[Visual Studio]]></category> <category><![CDATA[AutoCode]]></category> <category><![CDATA[Code Generator]]></category> <category><![CDATA[T4 Template]]></category> <category><![CDATA[Text Template Transformation Toolkit]]></category> <category><![CDATA[Visual Studio Code Generator]]></category> <category><![CDATA[Visual Studio Template]]></category> <category><![CDATA[vs.net]]></category><guid isPermaLink="false">http://ajaymatharu.wordpress.com/?p=481</guid> <description><![CDATA[Text Template Transformation Toolkit (T4) is a template-based code generation engine. This is one of the best things I found out today, so just thought of sharing with you guys. This is awesome code generator template. This template is best used to generate your business logic code that will communicate with the database. You can [...]]]></description> <content:encoded><![CDATA[<p><span style="color:#bb6f02;">Text Template Transformation Toolkit</span> (T4) is a template-based code generation engine. This is one of the best things I found out today, so just thought of sharing with you guys.</p><p>This is awesome code generator template. This template is best used to generate your business logic code that will communicate with the database.</p><p>You can create a code page that will have all your database tables as Classes and their fields as its variables. So you will have your database tables as class and its columns as variables. You will have everything object oriented.</p><p>This template has an extension &#8220;.tt&#8221; and you can write code in any language C# or Vb and have the code file generated in any of these language you want. All you have to do is write the code in &#8220;.tt&#8221; file and its corresponding &#8220;.cs&#8221; or &#8220;.vb&#8221; file will be generated once you save your &#8220;.tt&#8221; file.</p><p>Its truly AMAZING!!!</p><p>Check this out.</p><p>[googlevideo=http://video.google.com/videoplay?docid=-3383108526856631845&amp;hl=en]</p> ]]></content:encoded> <wfw:commentRss>http://www.ajaymatharu.com/text-template-transformation-toolkit-t4-t4-template/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>control does not exists in current context</title><link>http://www.ajaymatharu.com/control-does-not-exists-in-current-context/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=control-does-not-exists-in-current-context</link> <comments>http://www.ajaymatharu.com/control-does-not-exists-in-current-context/#comments</comments> <pubDate>Wed, 22 Jul 2009 17:24:49 +0000</pubDate> <dc:creator>Ajay Matharu</dc:creator> <category><![CDATA[.Net]]></category> <category><![CDATA[ASP.Net]]></category> <category><![CDATA[Visual Studio]]></category> <category><![CDATA[.net controls]]></category> <category><![CDATA[C#]]></category> <category><![CDATA[C#.Net]]></category> <category><![CDATA[context]]></category> <category><![CDATA[Dot Net]]></category> <category><![CDATA[VB]]></category> <category><![CDATA[vb.net]]></category> <category><![CDATA[visual studio.net]]></category> <category><![CDATA[vs.net]]></category><guid isPermaLink="false">http://ajaymatharu.wordpress.com/?p=665</guid> <description><![CDATA[Another one of those problems that can stump you for a while. I often make backups of files as I progress and sometimes leave them in the website folder, this was fine with classic ASP but as I have found with ASP.Net can cause all sorts of problems.One issue I was having was trying to [...]]]></description> <content:encoded><![CDATA[<p><span style="font-size:85%;">Another one of those problems that can stump you for a while. I often make backups of files as I progress and sometimes leave them in the website folder, this was fine with classic ASP but as I have found with ASP.Net can cause all sorts of problems.</span><span style="font-size:85%;">One issue I was having was trying to reference a component in my aspx page from the codebehind page and seeing the following error when trying to reference a label control:</span></p><blockquote><p><span style="font-size:85%;">“Label2 does not exist in the current context”</span></p></blockquote><p><span style="font-size:85%;">So I found that the problem was even though I renamed one of my old files it still contained the class that my codebehind was referencing (i.e. the class names were still the same) &#8211; and therefore was not seeing the newly added Label control to my new code.</span><span style="font-size:85%;">Shame the compiler doesn’t realise the duplication and give some indication.</span></p><p>Lesson: Remove any backed up files from the web folder and/or build directory to avoid pain <img class="wp-smiley" src="http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif" alt=")" /></p> ]]></content:encoded> <wfw:commentRss>http://www.ajaymatharu.com/control-does-not-exists-in-current-context/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Zipping in asp.net</title><link>http://www.ajaymatharu.com/zipping-in-asp-net/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=zipping-in-asp-net</link> <comments>http://www.ajaymatharu.com/zipping-in-asp-net/#comments</comments> <pubDate>Sat, 20 Jun 2009 07:42:44 +0000</pubDate> <dc:creator>Ajay Matharu</dc:creator> <category><![CDATA[.Net]]></category> <category><![CDATA[ASP.Net]]></category> <category><![CDATA[Tip of Week]]></category> <category><![CDATA[Visual Studio]]></category> <category><![CDATA[Technology]]></category> <category><![CDATA[vs.net]]></category><guid isPermaLink="false">http://www.ajaymatharu.com/?p=1363</guid> <description><![CDATA[Zipping was never so easy in .Net. Check out this project on codeplex, http://dotnetzip.codeplex.com/ Here are the features of the DotNetZip Library, DotNetZip works on PCs with the full .NET Framework, and also runs on mobile devices that use the .NET Compact Framework. Create and read zip files in VB, C#, or any .NET language, [...]]]></description> <content:encoded><![CDATA[<p>Zipping was never so easy in .Net. Check out this project on codeplex, http://dotnetzip.codeplex.com/</p><p>Here are the features of the DotNetZip Library,<br /> DotNetZip works on PCs with the full .NET Framework, and also runs on mobile devices that use the .NET Compact Framework. Create and read zip files in VB, C#, or any .NET language, or any scripting environment. DotNetZip supports these scenarios:<br /> - an ASP.NET app that dynamically creates ZIP files and allows a browser to download them<br /> - a Windows Service that periodically zips up a directory for backup and archival purposes<br /> - a WPF program that modifyies an existing archive &#8211; renaming entries, removing entries from an archive, or adding new entries to an archive<br /> - a Windows Forms app that creates AES-encrypted zip archives for privacy of archived content.<br /> - An administrative script in PowerShell or VBScript that performs backup and archival.<br /> - a WCF service that receives a zip file as an attachment, and dynamically unpacks the zip to a stream for analysis<br /> - creating zip files from stream content, saving to a stream, extracting to a stream, reading from a stream<br /> - creation of self-extracting archives.</p><p>Njoy coding <img src='http://www.ajaymatharu.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p> ]]></content:encoded> <wfw:commentRss>http://www.ajaymatharu.com/zipping-in-asp-net/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>MD5 Encryption in .Net and PHP</title><link>http://www.ajaymatharu.com/md5-encryption-in-net-and-php/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=md5-encryption-in-net-and-php</link> <comments>http://www.ajaymatharu.com/md5-encryption-in-net-and-php/#comments</comments> <pubDate>Fri, 12 Jun 2009 04:32:32 +0000</pubDate> <dc:creator>Ajay Matharu</dc:creator> <category><![CDATA[.Net]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[Visual Studio]]></category> <category><![CDATA[ASP.Net]]></category> <category><![CDATA[C#.Net]]></category> <category><![CDATA[Development]]></category> <category><![CDATA[Encryption]]></category> <category><![CDATA[MD5]]></category> <category><![CDATA[vs.net]]></category><guid isPermaLink="false">http://www.ajaymatharu.com/?p=1273</guid> <description><![CDATA[To get MD5 hash in C# use this method. It returns same value AS MD5() function in PHP public string GetMD5Hash(string input) { System.Security.Cryptography.MD5CryptoServiceProvider x = new System.Security.Cryptography.MD5CryptoServiceProvider(); byte[] bs = System.Text.Encoding.UTF8.GetBytes(input); bs = x.ComputeHash(bs); System.Text.StringBuilder s = new System.Text.StringBuilder(); foreach (byte b in bs) { s.Append(b.ToString("x2").ToLower()); } string password = s.ToString(); return password; } [...]]]></description> <content:encoded><![CDATA[<p>To get MD5 hash in C#  use this method. It returns same value AS MD5() function in PHP</p><pre name="code" clas="c-sharp">
        public string GetMD5Hash(string input)
        {
            System.Security.Cryptography.MD5CryptoServiceProvider x = new System.Security.Cryptography.MD5CryptoServiceProvider();
            byte[] bs = System.Text.Encoding.UTF8.GetBytes(input);
            bs = x.ComputeHash(bs);
            System.Text.StringBuilder s = new System.Text.StringBuilder();
            foreach (byte b in bs)
            {
                s.Append(b.ToString("x2").ToLower());
            }
            string password = s.ToString();
            return password;
        }
</pre><p>And this one is in PHP</p><pre name="code" class="php">
<?php
echo md5("pathfinder");
?>
</pre><p>These both will return the same value</p> ]]></content:encoded> <wfw:commentRss>http://www.ajaymatharu.com/md5-encryption-in-net-and-php/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
