<?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>FlexiCoder Blog &#187; .Net</title>
	<atom:link href="http://www.flexicoder.com/blog/index.php/category/net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.flexicoder.com/blog</link>
	<description></description>
	<lastBuildDate>Wed, 28 Jul 2010 15:11:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>SQL Server 2008 &#8211; Table Valued Parameters</title>
		<link>http://www.flexicoder.com/blog/index.php/2010/06/sql-server-2008-table-valued-parameters/</link>
		<comments>http://www.flexicoder.com/blog/index.php/2010/06/sql-server-2008-table-valued-parameters/#comments</comments>
		<pubDate>Wed, 16 Jun 2010 19:39:54 +0000</pubDate>
		<dc:creator>flexicoder</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[.Net security]]></category>
		<category><![CDATA[query syntax]]></category>

		<guid isPermaLink="false">http://www.flexicoder.com/blog/?p=329</guid>
		<description><![CDATA[Here is a great article that explains how to use TVP&#8217;s via .Net and a stored procedure
Social Bookmarking]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.sommarskog.se/arrays-in-sql-2008.html">Here</a> is a great article that explains how to use TVP&#8217;s via .Net and a stored procedure</p>
<br/><a href="http://www.socialmarker.com/?link=http://www.flexicoder.com/blog/index.php/2010/06/sql-server-2008-table-valued-parameters/&title=SQL+Server+2008+%26%238211%3B+Table+Valued+Parameters&text=Here+is+a+great+article+that+explains+how+to+use+TVP%26%238217%3Bs+via+.Net+and+a+stored+procedure...&tags=" target="_blank"><img src= "http://www.socialmarker.com/bookmark.gif" border="0" /></a><noscript><a href="http://www.socialmarker.com" >Social Bookmarking</a></noscript>]]></content:encoded>
			<wfw:commentRss>http://www.flexicoder.com/blog/index.php/2010/06/sql-server-2008-table-valued-parameters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XSL/T Transform from String to String</title>
		<link>http://www.flexicoder.com/blog/index.php/2009/07/xslt-transform-from-string-to-string/</link>
		<comments>http://www.flexicoder.com/blog/index.php/2009/07/xslt-transform-from-string-to-string/#comments</comments>
		<pubDate>Wed, 22 Jul 2009 09:01:19 +0000</pubDate>
		<dc:creator>flexicoder</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[C# 3.5]]></category>
		<category><![CDATA[.Net code]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[XSL/T]]></category>

		<guid isPermaLink="false">http://www.flexicoder.com/blog/?p=185</guid>
		<description><![CDATA[The following example transforms the supplied xml string, using XSL/T and outputs to another string


using (StringReader rdr = new StringReader(selectedLine.AdditionalInformation))
{
    XPathDocument doc = new XPathDocument(rdr);

    using (StringWriter writer = new StringWriter())
    {

        transformer.Transform(doc, null, writer);
     [...]]]></description>
			<content:encoded><![CDATA[<p>The following example transforms the supplied xml string, using XSL/T and outputs to another string<br />
<code></p>
<pre class="brush:c#">
using (StringReader rdr = new StringReader(selectedLine.AdditionalInformation))
{
    XPathDocument doc = new XPathDocument(rdr);

    using (StringWriter writer = new StringWriter())
    {

        transformer.Transform(doc, null, writer);
        titleLabel.Attributes.Add("onmouseover", string.Format(@"showDiv(""{0}"")", writer.ToString()));
    }
}
</pre>
<p></code><br />
The XSL/T loaded into the <em>transformer</em> variable is as follows<br />
<code>
<pre class="brush:xml">
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"
>
    <xsl:output method="text" indent="no" omit-xml-declaration="yes"/>

        <xsl:template match="/">
<xsl:text>&lt;table class='panelTable'&gt;</xsl:text><xsl:apply-templates select="//Order"></xsl:apply-templates><xsl:text>&lt;/table&gt;</xsl:text>
        </xsl:template>
        <xsl:template match="Order">
<xsl:text>&lt;tr&gt;&lt;td colspan='2' class='TitlePanelHeader'&gt;</xsl:text><xsl:value-of select="@title"></xsl:value-of><xsl:text>&lt;/td&gt;&lt;/tr&gt;</xsl:text><xsl:apply-templates select="Info"></xsl:apply-templates>
        </xsl:template>
        <xsl:template match="Info">
<xsl:text>&lt;tr&gt;&lt;td&gt;</xsl:text><xsl:value-of select="@label"/><xsl:text>&lt;/td&gt;&lt;td&gt;</xsl:text><xsl:value-of select="@value"/><xsl:text>&lt;/td&gt;&lt;/tr&gt;</xsl:text>
        </xsl:template>
</xsl:stylesheet></pre>
<p></code><br />
And a sample xml string is as follows:<br />
<code>
<pre class="brush:xml">
<?xml version="1.0" encoding="utf-8"?>
<Order title='Body Rides'>
	<Info label='Additional answer code' value='' />
	<Info label='Additional answer date' value='' />
	<Info label='Answer code' value='' />
	<Info label='TOS' value=''/>
	<Info label='Answer date' value ='' />
	<Info label='Author' value='Richard Laymon'/>
	<Info label='Delivery to' value='Company Name, Address Line 1, AddressLine 2' />
	<Info label='Expected delivery' value='09/08/2009' />
	<Info label='Held orders' value=''/>
	<Info label='Ordered on' value='20/07/2009'/>
	<Info label='Print runs' value='' />
</Order>
</pre>
<p></code><br />
The result from the transformation is as follows:<br />
<code>
<pre class="brush:xml">
<table class="panelTable">
<tr>
<td colspan="2" class="TitlePanelHeader">Body Rides</td>
</tr>
<tr>
<td>Additional answer code</td>
<td/></tr>
<tr>
<td>Additional answer date</td>
<td/></tr>
<tr>
<td>Answer code</td>
<td/></tr>
<tr>
<td>TOS</td>
<td/></tr>
<tr>
<td>Answer date</td>
<td/></tr>
<tr>
<td>Author</td>
<td>Richard Laymon</td>
</tr>
<tr>
<td>Delivery to</td>
<td>Company Name, Address Line 1, AddressLine 2</td>
</tr>
<tr>
<td>Expected delivery</td>
<td>09/08/2009</td>
</tr>
<tr>
<td>Held orders</td>
<td/></tr>
<tr>
<td>Ordered on</td>
<td>20/07/2009</td>
</tr>
<tr>
<td>Print runs</td>
<td/></tr>
</table>
</pre>
<p></code><br />
The code to build up the xml within the object is below, note that the values are HtmlEncoded to ensure that there are no problems in the web page.<br />
<code>
<pre class="brush:c#">
public string AdditionalInformation
{
    get
    {
        StringBuilder builder = new StringBuilder();
        builder.Append(string.Format(CultureInfo.CurrentCulture,
                                        @"<Order title=""{0}"">",
                                        HttpUtility.HtmlEncode(this.Title)));
        AddLabelValue(builder, "Account number", ParentPurchaseOrder.AccountNumber);
        AddLabelValue(builder, "Additional answer code", this.AdditionalAnswerCode);
        AddLabelValue(builder, "Additional answer date",
            this.AdditionalAnswerDate.Year != 1 ? this.AdditionalAnswerDate.ToShortDateString() : "" );
        AddLabelValue(builder, "Answer code", this.AnswerCode);
        AddLabelValue(builder, "Answer date",
            this.AnswerDate.Year != 1 ? this.AnswerDate.ToShortDateString() : "");
        AddLabelValue(builder,"Author", this.Author);
        AddLabelValue(builder, "Delivery to",
            ParentPurchaseOrder.DeliveryName + ", " + ParentPurchaseOrder.Address1 + ", " +
                          ParentPurchaseOrder.Address2 + ", " +
                          ParentPurchaseOrder.Address3 + ", " +
                          ParentPurchaseOrder.Address4 + ", " +
                          ParentPurchaseOrder.Address5 + ", " +
                          ParentPurchaseOrder.Postcode);

        AddLabelValue(builder, "Expected delivery",
ParentPurchaseOrder.ExpectedDeliveryDate.ToShortDateString());
        AddLabelValue(builder, "Held orders", this.HeldOrders);
        AddLabelValue(builder, "Ordered on", ParentPurchaseOrder.OrderedOn.ToShortDateString());
        AddLabelValue(builder, "Print runs", this.PrintRuns);
                builder.Append("</Order>");

        return builder.ToString();

    }
}

private void AddLabelValue(StringBuilder builder, string label, string value)
{
      builder.Append(string.Format(CultureInfo.CurrentCulture,
                        @"<Info label=""{0}"" value=""{1}"" />",
                         label, HttpUtility.HtmlEncode(value)));
}
</pre>
<p></code></p>
<br/><a href="http://www.socialmarker.com/?link=http://www.flexicoder.com/blog/index.php/2009/07/xslt-transform-from-string-to-string/&title=XSL%2FT+Transform+from+String+to+String&text=The+following+example+transforms+the+supplied+xml+string%2C+using+XSL%2FT+and+outputs+to+another+string+++using+%28StringReader+rdr+%3D+new+StringReader%28selectedLine.AdditionalInformation%29%29+%7B++++...&tags=addlabelvalue+builder%2C+builder+append%2C+builder%2C+addlabelvalue%2C+parentpurchaseorder%2C+string%2C+answer" target="_blank"><img src= "http://www.socialmarker.com/bookmark.gif" border="0" /></a><noscript><a href="http://www.socialmarker.com" >Social Bookmarking</a></noscript>]]></content:encoded>
			<wfw:commentRss>http://www.flexicoder.com/blog/index.php/2009/07/xslt-transform-from-string-to-string/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Iterate a Dictionary</title>
		<link>http://www.flexicoder.com/blog/index.php/2009/05/iterate-a-dictionary/</link>
		<comments>http://www.flexicoder.com/blog/index.php/2009/05/iterate-a-dictionary/#comments</comments>
		<pubDate>Sat, 09 May 2009 12:56:00 +0000</pubDate>
		<dc:creator>flexicoder</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[.Net code]]></category>

		<guid isPermaLink="false">http://www.flexicoder.com/blog/?p=42</guid>
		<description><![CDATA[Following code iterates through each entry in a dictory


For Each keyPair As KeyValuePair(Of String, Int32) In aDepot.PostcodeCounters
    builder.Append("&#60;tr&#62;&#60;td&#62;")
    builder.Append(keyPair.Key)
    builder.Append("&#60;/td&#62;&#60;td align=""right""&#62;")
    builder.Append(keyPair.Value)
    builder.Append("&#60;/td&#62;&#60;/tr&#62;")
Next

Social Bookmarking]]></description>
			<content:encoded><![CDATA[<p>Following code iterates through each entry in a dictory</p>
<p><code>
<pre class="brush: vb" >
For Each keyPair As KeyValuePair(Of String, Int32) In aDepot.PostcodeCounters
    builder.Append("&lt;tr&gt;&lt;td&gt;")
    builder.Append(keyPair.Key)
    builder.Append("&lt;/td&gt;&lt;td align=""right""&gt;")
    builder.Append(keyPair.Value)
    builder.Append("&lt;/td&gt;&lt;/tr&gt;")
Next</pre>
<p></code></p>
<br/><a href="http://www.socialmarker.com/?link=http://www.flexicoder.com/blog/index.php/2009/05/iterate-a-dictionary/&title=Iterate+a+Dictionary&text=Following+code+iterates+through+each+entry+in+a+dictory+++For+Each+keyPair+As+KeyValuePair%28Of+String%2C+Int32%29+In+aDepot.PostcodeCounters+++++builder.Append%28%22%26lt%3Btr%26gt%3B%26lt%3Btd%26gt%3B%22%29++++...&tags=builder+append%2C+append%2C+builder" target="_blank"><img src= "http://www.socialmarker.com/bookmark.gif" border="0" /></a><noscript><a href="http://www.socialmarker.com" >Social Bookmarking</a></noscript>]]></content:encoded>
			<wfw:commentRss>http://www.flexicoder.com/blog/index.php/2009/05/iterate-a-dictionary/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating Event Handler Signatures</title>
		<link>http://www.flexicoder.com/blog/index.php/2009/04/creating-event-handler-signatures/</link>
		<comments>http://www.flexicoder.com/blog/index.php/2009/04/creating-event-handler-signatures/#comments</comments>
		<pubDate>Tue, 21 Apr 2009 10:43:00 +0000</pubDate>
		<dc:creator>flexicoder</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[C# 3.5]]></category>
		<category><![CDATA[useful links]]></category>
		<category><![CDATA[.Net code]]></category>

		<guid isPermaLink="false">http://www.flexicoder.com/blog/?p=40</guid>
		<description><![CDATA[In Visual Studio 2008 you&#8217;ve lost the abillity to click on the drop down in the code behind and see all the event signatures that are available but haven&#8217;t handled yet. To get the signature you are after without using the properites in the desinger you can type&#8230;

this.

As you hit the . all methods and [...]]]></description>
			<content:encoded><![CDATA[<p>In Visual Studio 2008 you&#8217;ve lost the abillity to click on the drop down in the code behind and see all the event signatures that are available but haven&#8217;t handled yet. To get the signature you are after without using the properites in the desinger you can type&#8230;</p>
<p><code><br />
this.<br />
</code></p>
<p>As you hit the . all methods and events should appear, pick the event you after e.g. Load</p>
<p>Then add type <code>+=</code> after the event name and press TAB TAB, the event is automatically generated. ASP.Net auto wires the events with the correct name and signature so you should be able to delete the line of code that binds the event.</p>
<p>Check out <a href="http://www.keithelder.net/blog/archive/2008/07/07/Creating-Event-Handlers-in-C-The-Definitive-Guide.aspx">this article</a> for more info.</p>
<br/><a href="http://www.socialmarker.com/?link=http://www.flexicoder.com/blog/index.php/2009/04/creating-event-handler-signatures/&title=Creating+Event+Handler+Signatures&text=In+Visual+Studio+2008+you%26%238217%3Bve+lost+the+abillity+to+click+on+the+drop+down+in+the+code+behind+and+see+all+the+event+signatures+that+are+available+but+haven%26%238217%3Bt+handled+yet.&tags=the+event%2C+event" target="_blank"><img src= "http://www.socialmarker.com/bookmark.gif" border="0" /></a><noscript><a href="http://www.socialmarker.com" >Social Bookmarking</a></noscript>]]></content:encoded>
			<wfw:commentRss>http://www.flexicoder.com/blog/index.php/2009/04/creating-event-handler-signatures/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VB.Net &#8211; ControlChars</title>
		<link>http://www.flexicoder.com/blog/index.php/2009/01/vbnet-controlchars/</link>
		<comments>http://www.flexicoder.com/blog/index.php/2009/01/vbnet-controlchars/#comments</comments>
		<pubDate>Fri, 02 Jan 2009 19:14:00 +0000</pubDate>
		<dc:creator>flexicoder</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[VB.Net]]></category>
		<category><![CDATA[useful links]]></category>
		<category><![CDATA[.Net code]]></category>

		<guid isPermaLink="false">http://www.flexicoder.com/blog/?p=20</guid>
		<description><![CDATA[If you need special characters in your VB.Net use the ControlChars class, it has definitions for Lf, Crlf, etc.
See MSDN for more details
Social Bookmarking]]></description>
			<content:encoded><![CDATA[<p>If you need special characters in your VB.Net use the ControlChars class, it has definitions for Lf, Crlf, etc.</p>
<p>See <a href="http://msdn.microsoft.com/en-us/library/microsoft.visualbasic.controlchars_members.aspx">MSDN</a> for more details</p>
<br/><a href="http://www.socialmarker.com/?link=http://www.flexicoder.com/blog/index.php/2009/01/vbnet-controlchars/&title=VB.Net+%26%238211%3B+ControlChars&text=If+you+need+special+characters+in+your+VB.Net+use+the+ControlChars+class%2C+it+has+definitions+for+Lf%2C+Crlf%2C+etc.&tags=" target="_blank"><img src= "http://www.socialmarker.com/bookmark.gif" border="0" /></a><noscript><a href="http://www.socialmarker.com" >Social Bookmarking</a></noscript>]]></content:encoded>
			<wfw:commentRss>http://www.flexicoder.com/blog/index.php/2009/01/vbnet-controlchars/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DateDiff &#8211; Subtract</title>
		<link>http://www.flexicoder.com/blog/index.php/2009/01/datediff-subtract/</link>
		<comments>http://www.flexicoder.com/blog/index.php/2009/01/datediff-subtract/#comments</comments>
		<pubDate>Fri, 02 Jan 2009 11:57:00 +0000</pubDate>
		<dc:creator>flexicoder</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[.Net code]]></category>

		<guid isPermaLink="false">http://www.flexicoder.com/blog/?p=19</guid>
		<description><![CDATA[In my VB.Net code I&#8217;ve always used the DateDiff function to determine the number of days between 2 dates. Today I was playing around working out which order to put dates in and discovered that the Date object as a method called Subtract. This returns a TimeSpan then its just a case of using the [...]]]></description>
			<content:encoded><![CDATA[<p>In my VB.Net code I&#8217;ve always used the <em>DateDiff </em>function to determine the number of days between 2 dates. Today I was playing around working out which order to put dates in and discovered that the <em>Date</em> object as a method called <em>Subtract</em>. This returns a <em>TimeSpan</em> then its just a case of using the <em>Days</em> property</p>
<p><code>
<pre class="brush: vb">startDate.Subtract(now).Days</pre>
<p></code></p>
<p>Note that if startDate is before todays date this will return a negative value</p>
<p><code>
<pre class="brush:vb">
&gt;? now.subtract(cdate("1 Jan 2009")).days
1
&gt;? cdate("1 Jan 2009").subtract(now).days
-1
&gt;? now.subtract(cdate("1 Jan 2008")).days
367</pre>
<p></code></p>
<br/><a href="http://www.socialmarker.com/?link=http://www.flexicoder.com/blog/index.php/2009/01/datediff-subtract/&title=DateDiff+%26%238211%3B+Subtract&text=In+my+VB.Net+code+I%26%238217%3Bve+always+used+the+DateDiff+function+to+determine+the+number+of+days+between+2+dates.&tags=subtract" target="_blank"><img src= "http://www.socialmarker.com/bookmark.gif" border="0" /></a><noscript><a href="http://www.socialmarker.com" >Social Bookmarking</a></noscript>]]></content:encoded>
			<wfw:commentRss>http://www.flexicoder.com/blog/index.php/2009/01/datediff-subtract/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Forcing Data Types on literal constants</title>
		<link>http://www.flexicoder.com/blog/index.php/2008/12/forcing-data-types-on-literal-constants/</link>
		<comments>http://www.flexicoder.com/blog/index.php/2008/12/forcing-data-types-on-literal-constants/#comments</comments>
		<pubDate>Wed, 31 Dec 2008 14:39:00 +0000</pubDate>
		<dc:creator>flexicoder</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[useful links]]></category>
		<category><![CDATA[.Net code]]></category>

		<guid isPermaLink="false">http://www.flexicoder.com/blog/?p=18</guid>
		<description><![CDATA[The following type characters can be used to force a literal value to be a certain data type
"a"c          'Char#1/1/1900#    'Date0D            'Decimal0@            [...]]]></description>
			<content:encoded><![CDATA[<p>The following type characters can be used to force a literal value to be a certain data type</p>
<p><code><br />"a"c          'Char<br />#1/1/1900#    'Date<br />0D            'Decimal<br />0@            'Decimal<br />0.0R          'Double<br />0.0#          'Double<br />0I            'Integer<br />0%            'Integer<br />0L            'Long<br />0&#038;            'Long<br />0S            'Short<br />0.0F          'Single<br />0.0!          'Single<br /></code></p>
<p>See <a href="http://msdn.microsoft.com/en-us/library/dzy06xhf.aspx">MSDN</a> for more details</p>
<br/><a href="http://www.socialmarker.com/?link=http://www.flexicoder.com/blog/index.php/2008/12/forcing-data-types-on-literal-constants/&title=Forcing+Data+Types+on+literal+constants&text=The+following+type+characters+can+be+used+to+force+a+literal+value+to+be+a+certain+data+type+%22a%22c++++++++++%27Char%231%2F1%2F1900%23++++%27Date0D++++++++++++%27Decimal0%40++++++++++++%27Decimal0.0R+++++++++...&tags=" target="_blank"><img src= "http://www.socialmarker.com/bookmark.gif" border="0" /></a><noscript><a href="http://www.socialmarker.com" >Social Bookmarking</a></noscript>]]></content:encoded>
			<wfw:commentRss>http://www.flexicoder.com/blog/index.php/2008/12/forcing-data-types-on-literal-constants/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TryCast &#8211; better than DirectCast?</title>
		<link>http://www.flexicoder.com/blog/index.php/2008/12/trycast-better-than-directcast/</link>
		<comments>http://www.flexicoder.com/blog/index.php/2008/12/trycast-better-than-directcast/#comments</comments>
		<pubDate>Sun, 07 Dec 2008 17:09:00 +0000</pubDate>
		<dc:creator>flexicoder</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[VB.Net]]></category>
		<category><![CDATA[useful links]]></category>
		<category><![CDATA[.Net code]]></category>

		<guid isPermaLink="false">http://www.flexicoder.com/blog/?p=9</guid>
		<description><![CDATA[In VB.Net Framework V2.0 a new command was introduced called TryCast It works the same as DirectCast but if the cast fails instead of throwing an exception the object is set to Nothing
Take a look at MSDN for more details.
Social Bookmarking]]></description>
			<content:encoded><![CDATA[<p>In VB.Net Framework V2.0 a new command was introduced called <em>TryCast</em> It works the same as <em>DirectCast</em> but if the cast fails instead of throwing an exception the object is set to <em>Nothing</em></p>
<p>Take a look at <a href="http://msdn.microsoft.com/en-us/library/zyy863x8.aspx">MSDN</a> for more details.</p>
<br/><a href="http://www.socialmarker.com/?link=http://www.flexicoder.com/blog/index.php/2008/12/trycast-better-than-directcast/&title=TryCast+%26%238211%3B+better+than+DirectCast%3F&text=In+VB.Net+Framework+V2.0+a+new+command+was+introduced+called+TryCast+It+works+the+same+as+DirectCast+but+if+the+cast+fails+instead+of+throwing+an+exception+the+object+is+set+to+Nothing+Take+a+look+at...&tags=" target="_blank"><img src= "http://www.socialmarker.com/bookmark.gif" border="0" /></a><noscript><a href="http://www.socialmarker.com" >Social Bookmarking</a></noscript>]]></content:encoded>
			<wfw:commentRss>http://www.flexicoder.com/blog/index.php/2008/12/trycast-better-than-directcast/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PrintPreviewDialog &#8211; PrintDialog</title>
		<link>http://www.flexicoder.com/blog/index.php/2008/12/printpreviewdialog-printdialog/</link>
		<comments>http://www.flexicoder.com/blog/index.php/2008/12/printpreviewdialog-printdialog/#comments</comments>
		<pubDate>Sun, 07 Dec 2008 15:59:00 +0000</pubDate>
		<dc:creator>flexicoder</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[VB.Net]]></category>
		<category><![CDATA[.Net code]]></category>

		<guid isPermaLink="false">http://www.flexicoder.com/blog/?p=8</guid>
		<description><![CDATA[Ok so this might be an obvious one but it got me stuck for a little while so thought I should post it. When you use the PrintPreviewDialog the documents Print method is automatically called when the dialog is shown. But using the PrintDialog the Print method of the associated PrintDocument is not called when [...]]]></description>
			<content:encoded><![CDATA[<p>Ok so this might be an obvious one but it got me stuck for a little while so thought I should post it. When you use the <em>PrintPreviewDialog</em> the documents <em>Print</em> method is automatically called when the dialog is shown. But using the <em>PrintDialog</em> the <em>Print</em> method of the associated <em>PrintDocument</em> is not called when the user clicks the <em>Print</em> button on the dialog, you have to check that OK was returned as the dialogs result!</p>
<br/><a href="http://www.socialmarker.com/?link=http://www.flexicoder.com/blog/index.php/2008/12/printpreviewdialog-printdialog/&title=PrintPreviewDialog+%26%238211%3B+PrintDialog&text=Ok+so+this+might+be+an+obvious+one+but+it+got+me+stuck+for+a+little+while+so+thought+I+should+post+it.&tags=" target="_blank"><img src= "http://www.socialmarker.com/bookmark.gif" border="0" /></a><noscript><a href="http://www.socialmarker.com" >Social Bookmarking</a></noscript>]]></content:encoded>
			<wfw:commentRss>http://www.flexicoder.com/blog/index.php/2008/12/printpreviewdialog-printdialog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
