<?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 code</title>
	<atom:link href="http://www.flexicoder.com/blog/index.php/tag/net-code/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>VS2005 ASP.Net not stopping on breakpoints</title>
		<link>http://www.flexicoder.com/blog/index.php/2010/02/vs2005-asp-net-not-stopping-on-breakpoints/</link>
		<comments>http://www.flexicoder.com/blog/index.php/2010/02/vs2005-asp-net-not-stopping-on-breakpoints/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 20:34:14 +0000</pubDate>
		<dc:creator>flexicoder</dc:creator>
				<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[useful links]]></category>
		<category><![CDATA[.Net code]]></category>

		<guid isPermaLink="false">http://www.flexicoder.com/blog/?p=280</guid>
		<description><![CDATA[If you have IE 8 installed and your ASP.Net project won&#8217;t stop on the breakpoints you&#8217;ve set they you probably need to read this article
You basically need to add an entry to your registry to stop process growth for tabs.
I&#8217;ve copied the steps required below
1)  Open RegEdit
2)  Browse to HKEY_LOCALMACHINE -> SOFTWARE -> [...]]]></description>
			<content:encoded><![CDATA[<p>If you have IE 8 installed and your ASP.Net project won&#8217;t stop on the breakpoints you&#8217;ve set they you probably need to read this <a href="http://weblogs.asp.net/abdullaabdelhaq/archive/2009/06/01/VS-Debug-Problem-with-IE8.aspx">article</a></p>
<p>You basically need to add an entry to your registry to stop process growth for tabs.</p>
<p>I&#8217;ve copied the steps required below</p>
<p>1)  Open RegEdit<br />
2)  Browse to HKEY_LOCALMACHINE -> SOFTWARE -> Microsoft -> Internet Explorer -> Main<br />
3)  Add a dword under this key called TabProcGrowth<br />
4)  Set TabProcGrowth to 0</p>
<br/><a href="http://www.socialmarker.com/?link=http://www.flexicoder.com/blog/index.php/2010/02/vs2005-asp-net-not-stopping-on-breakpoints/&title=VS2005+ASP.Net+not+stopping+on+breakpoints&text=If+you+have+IE+8+installed+and+your+ASP.Net+project+won%26%238217%3Bt+stop+on+the+breakpoints+you%26%238217%3Bve+set+they+you+probably+need+to+read+this+article+You+basically+need+to+add+an+entry+to+your...&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/02/vs2005-asp-net-not-stopping-on-breakpoints/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>Specify file name for file from handler</title>
		<link>http://www.flexicoder.com/blog/index.php/2009/06/specify-file-name-for-file-from-handler/</link>
		<comments>http://www.flexicoder.com/blog/index.php/2009/06/specify-file-name-for-file-from-handler/#comments</comments>
		<pubDate>Tue, 02 Jun 2009 14:24:00 +0000</pubDate>
		<dc:creator>flexicoder</dc:creator>
				<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[.Net code]]></category>

		<guid isPermaLink="false">http://www.flexicoder.com/blog/?p=45</guid>
		<description><![CDATA[When returning content to a user from a generic handler use the the AddHeader method to specify the filename


context.Response.ContentType = "text/comma-separated-values";
context.Response.AddHeader("content-disposition", "attachment; filename=PrinterDirect.CSV");

Social Bookmarking]]></description>
			<content:encoded><![CDATA[<p>When returning content to a user from a generic handler use the the AddHeader method to specify the filename</p>
<p><code>
<pre class="brush: c#">
context.Response.ContentType = "text/comma-separated-values";
context.Response.AddHeader("content-disposition", "attachment; filename=PrinterDirect.CSV");</pre>
<p></code></p>
<br/><a href="http://www.socialmarker.com/?link=http://www.flexicoder.com/blog/index.php/2009/06/specify-file-name-for-file-from-handler/&title=Specify+file+name+for+file+from+handler&text=When+returning+content+to+a+user+from+a+generic+handler+use+the+the+AddHeader+method+to+specify+the+filename+++context.Response.ContentType+%3D+%22text%2Fcomma-separated-values%22%3B...&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/06/specify-file-name-for-file-from-handler/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>?? Operator (C# Reference)</title>
		<link>http://www.flexicoder.com/blog/index.php/2009/05/operator-c-reference/</link>
		<comments>http://www.flexicoder.com/blog/index.php/2009/05/operator-c-reference/#comments</comments>
		<pubDate>Fri, 22 May 2009 10:30:00 +0000</pubDate>
		<dc:creator>flexicoder</dc:creator>
				<category><![CDATA[C# 3.5]]></category>
		<category><![CDATA[.Net code]]></category>
		<category><![CDATA[null]]></category>

		<guid isPermaLink="false">http://www.flexicoder.com/blog/?p=44</guid>
		<description><![CDATA[This operator allows you to supply an alternative value if the value being supplied is null. It only works on nullable datatypes but with a bit of googling came accross this article.


public int CurrentPage
{
    get
    {
        return (int)(ViewState["_CurrentPage"] ?? 0);
   [...]]]></description>
			<content:encoded><![CDATA[<p>This operator allows you to supply an alternative value if the value being supplied is null. It only works on nullable datatypes but with a bit of googling came accross this <a href="http://haacked.com/archive/2006/08/07/TinyTrickForViewStateBackedProperties.aspx">article</a>.</p>
<p><code>
<pre class="brush:c#">
public int CurrentPage
{
    get
    {
        return (int)(ViewState["_CurrentPage"] ?? 0);
    }
    set
    {
        this.ViewState["_CurrentPage"] = value;
    }
}</pre>
<p></code></p>
<p>The offical Microsoft <a href="http://msdn.microsoft.com/en-us/library/ms173224.aspx">article</a></p>
<br/><a href="http://www.socialmarker.com/?link=http://www.flexicoder.com/blog/index.php/2009/05/operator-c-reference/&title=%3F%3F+Operator+%28C%23+Reference%29&text=This+operator+allows+you+to+supply+an+alternative+value+if+the+value+being+supplied+is+null.+It+only+works+on+nullable+datatypes+but+with+a+bit+of+googling+came+accross+this+article.&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/05/operator-c-reference/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>Server Control Remove Span</title>
		<link>http://www.flexicoder.com/blog/index.php/2009/03/server-control-remove-span/</link>
		<comments>http://www.flexicoder.com/blog/index.php/2009/03/server-control-remove-span/#comments</comments>
		<pubDate>Wed, 11 Mar 2009 10:07:00 +0000</pubDate>
		<dc:creator>flexicoder</dc:creator>
				<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[.Net code]]></category>

		<guid isPermaLink="false">http://www.flexicoder.com/blog/?p=38</guid>
		<description><![CDATA[Normally when you write a server control, .Net automatically wraps the output with a span and the Id of the control. Depending on your CSS this can cause rendering issues. You can use the following technique to prevent the span from being rendered.


public override void RenderBeginTag(HtmlTextWriter writer)
{
    using (HtmlTextWriter blankOne = new [...]]]></description>
			<content:encoded><![CDATA[<p>Normally when you write a server control, .Net automatically wraps the output with a span and the Id of the control. Depending on your CSS this can cause rendering issues. You can use the following technique to prevent the span from being rendered.<br />
<code></p>
<pre class="brush: c#">
public override void RenderBeginTag(HtmlTextWriter writer)
{
    using (HtmlTextWriter blankOne = new HtmlTextWriter(new System.IO.StringWriter()))
    {
        base.RenderBeginTag(blankOne);
    }
}
public override void RenderEndTag(HtmlTextWriter writer)
{
}</pre>
<p></code></p>
<p>It basically writes out the open tag to a new HTML Writer and therefore is not part of the final rendered HTML</p>
<br/><a href="http://www.socialmarker.com/?link=http://www.flexicoder.com/blog/index.php/2009/03/server-control-remove-span/&title=Server+Control+Remove+Span&text=Normally+when+you+write+a+server+control%2C+.Net+automatically+wraps+the+output+with+a+span+and+the+Id+of+the+control.+Depending+on+your+CSS+this+can+cause+rendering+issues.&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/03/server-control-remove-span/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SessionId &#8211; keeping it the same</title>
		<link>http://www.flexicoder.com/blog/index.php/2009/02/sessionid-keeping-it-the-same/</link>
		<comments>http://www.flexicoder.com/blog/index.php/2009/02/sessionid-keeping-it-the-same/#comments</comments>
		<pubDate>Mon, 23 Feb 2009 10:31:00 +0000</pubDate>
		<dc:creator>flexicoder</dc:creator>
				<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[C# 3.5]]></category>
		<category><![CDATA[.Net code]]></category>

		<guid isPermaLink="false">http://www.flexicoder.com/blog/?p=36</guid>
		<description><![CDATA[If you don&#8217;t populate a value in the session of a page then the session Id will reset everytime the page is loaded.


protected void Page_PreInit(object sender, EventArgs e)
{
    //Need this line otherwise it resets the Session Id everytime!
    Session["keepme"] = "True";
}


Social Bookmarking]]></description>
			<content:encoded><![CDATA[<p>If you don&#8217;t populate a value in the session of a page then the session Id will reset everytime the page is loaded.<br />
<code></p>
<pre class="brush: c#">
protected void Page_PreInit(object sender, EventArgs e)
{
    //Need this line otherwise it resets the Session Id everytime!
    Session["keepme"] = "True";
}
</pre>
<p></code></p>
<br/><a href="http://www.socialmarker.com/?link=http://www.flexicoder.com/blog/index.php/2009/02/sessionid-keeping-it-the-same/&title=SessionId+%26%238211%3B+keeping+it+the+same&text=If+you+don%26%238217%3Bt+populate+a+value+in+the+session+of+a+page+then+the+session+Id+will+reset+everytime+the+page+is+loaded.&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/02/sessionid-keeping-it-the-same/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sort Collection</title>
		<link>http://www.flexicoder.com/blog/index.php/2009/02/sort-collectiont/</link>
		<comments>http://www.flexicoder.com/blog/index.php/2009/02/sort-collectiont/#comments</comments>
		<pubDate>Mon, 09 Feb 2009 14:16:00 +0000</pubDate>
		<dc:creator>flexicoder</dc:creator>
				<category><![CDATA[C# 3.5]]></category>
		<category><![CDATA[.Net code]]></category>

		<guid isPermaLink="false">http://www.flexicoder.com/blog/?p=34</guid>
		<description><![CDATA[Here is a simple solution based on this article to implement a sort of a generic collection.


public ContentCollection Sort()
{
    List items = (List)Items;
    items.Sort();
    return this;
}

The Content class needs to implement IComparable
Social Bookmarking]]></description>
			<content:encoded><![CDATA[<p>Here is a simple solution based on this <a href="http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/977ac532-afc9-46b7-bd73-a5cc41086b9c/">article</a> to implement a sort of a generic collection.</p>
<p><code></p>
<pre class="brush: c#">
public ContentCollection Sort()
{
    List<content> items = (List<content>)Items;
    items.Sort();
    return this;
}</pre>
<p></code></p>
<p>The Content class needs to implement IComparable</p>
<br/><a href="http://www.socialmarker.com/?link=http://www.flexicoder.com/blog/index.php/2009/02/sort-collectiont/&title=Sort+Collection%3CT%3E&text=Here+is+a+simple+solution+based+on+this+article+to+implement+a+sort+of+a+generic+collection.+++public+ContentCollection+Sort%28%29+%7B+++++List+items+%3D+%28List%29Items%3B+++++items.Sort%28%29%3B+++++return+this%3B+%7D+...&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/02/sort-collectiont/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>C# &#8211; IsNumeric</title>
		<link>http://www.flexicoder.com/blog/index.php/2009/01/c-isnumeric/</link>
		<comments>http://www.flexicoder.com/blog/index.php/2009/01/c-isnumeric/#comments</comments>
		<pubDate>Thu, 22 Jan 2009 09:35:00 +0000</pubDate>
		<dc:creator>flexicoder</dc:creator>
				<category><![CDATA[C# 3.5]]></category>
		<category><![CDATA[.Net code]]></category>

		<guid isPermaLink="false">http://www.flexicoder.com/blog/?p=30</guid>
		<description><![CDATA[Use the TryParse method to determine if a value is numeric


int retNum;
if (Int32.TryParse(BookId, System.Globalization.NumberStyles.Any, System.Globalization.NumberFormatInfo.InvariantInfo, out retNum))
{
    //Is numeric
}

Social Bookmarking]]></description>
			<content:encoded><![CDATA[<p>Use the TryParse method to determine if a value is numeric</p>
<p><code>
<pre class="brush: c#">
int retNum;
if (Int32.TryParse(BookId, System.Globalization.NumberStyles.Any, System.Globalization.NumberFormatInfo.InvariantInfo, out retNum))
{
    //Is numeric
}</pre>
<p></code></p>
<br/><a href="http://www.socialmarker.com/?link=http://www.flexicoder.com/blog/index.php/2009/01/c-isnumeric/&title=C%23+%26%238211%3B+IsNumeric&text=Use+the+TryParse+method+to+determine+if+a+value+is+numeric+++int+retNum%3B+if+%28Int32.TryParse%28BookId%2C+System.Globalization.NumberStyles.Any%2C+System.Globalization.NumberFormatInfo.InvariantInfo%2C+out...&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/c-isnumeric/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
