<?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>Jigsaw Boys &#187; ASP.NET</title>
	<atom:link href="http://www.jigsawboys.com/category/development/aspnet/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jigsawboys.com</link>
	<description>Security, Network and Computer Tech Tip Database!</description>
	<lastBuildDate>Wed, 17 Aug 2011 22:59:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>How to fetch Last Record in Subsonic</title>
		<link>http://www.jigsawboys.com/2009/12/22/how-to-fetch-last-record-in-subsonic/</link>
		<comments>http://www.jigsawboys.com/2009/12/22/how-to-fetch-last-record-in-subsonic/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 06:18:22 +0000</pubDate>
		<dc:creator>Jamsi</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[activerecord]]></category>
		<category><![CDATA[linq]]></category>
		<category><![CDATA[subsonic]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.jigsawboys.com/?p=291</guid>
		<description><![CDATA[Is it just me or is Subsonic the topic of discussion right now? I had a need to retrieve the last ID that had been generated in a table; that being, the last &#8220;auto increment&#8221; ID of a table. The following example worked a charm using Subsonic and activerecord. As you can see, it creates [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>Is it just me or is Subsonic the topic of discussion right now? <img src='http://www.jigsawboys.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /><br />
I had a need to retrieve the last ID that had been generated in a table; that being, the last &#8220;auto increment&#8221; ID of a table.</p>
<p>The following example worked a charm using Subsonic and activerecord.</p>
<pre class="brush: csharp; title: ; notranslate">
var fetch_ref_id = contract.All().OrderByDescending(c =&gt; c.id).Take(1).ToList();
if (iRef_new_id != null)
{
     iRef_new_id = fetch_ref_id[0].id;
}
</pre>
<p>As you can see, it creates a new list (noted by the ToList()) by connecting to the table &#8220;category&#8221;, it then selects all results (All()) and then orders the list by Descending and finally, the take(1) simply takes the top record.</p>
<p>I then whack the result (if you have a column called id) into a integer.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.jigsawboys.com/2009/12/22/how-to-fetch-last-record-in-subsonic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Subsonic ordering &#8211; OrderByDescending</title>
		<link>http://www.jigsawboys.com/2009/12/22/subsonic-ordering-orderbydescending/</link>
		<comments>http://www.jigsawboys.com/2009/12/22/subsonic-ordering-orderbydescending/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 05:41:22 +0000</pubDate>
		<dc:creator>Jamsi</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[activerecord]]></category>
		<category><![CDATA[linq]]></category>
		<category><![CDATA[subsonic]]></category>

		<guid isPermaLink="false">http://www.jigsawboys.com/?p=288</guid>
		<description><![CDATA[So the subsonic documentation sucks. If you&#8217;re new to activerecord, linq and subsonic in general; you&#8217;ll find it fairly hard to construct basic queries. However once you&#8217;ve got it under control, it&#8217;s a piece of cake. To sort your table using activerecord, use the following examples; To sort ascending by a column called name To [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>So the subsonic documentation sucks. If you&#8217;re new to activerecord, linq and subsonic in general; you&#8217;ll find it fairly hard to construct basic queries. However once you&#8217;ve got it under control, it&#8217;s a piece of cake.</p>
<p>To sort your table using activerecord, use the following examples;</p>
<p><b>To sort ascending by a column called name</b></p>
<pre class="brush: csharp; title: ; notranslate">
var categories = category.All().OrderBy(c =&gt; c.name);
</pre>
<p><b>To sort descendingby a column called name</b></p>
<pre class="brush: csharp; title: ; notranslate">
var categories = category.All().OrderByDescending(c =&gt; c.name);
</pre>
<p>You can then just bind to your gridview/dropdown list or whatever you like.</p>
<pre class="brush: csharp; title: ; notranslate">
            if (categories != null)
            {
                drp.DataSource = categories ;
                drp.DataBind();
            }
</pre>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.jigsawboys.com/2009/12/22/subsonic-ordering-orderbydescending/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SubSonic 3.0 ActiveRecord Tutorial</title>
		<link>http://www.jigsawboys.com/2009/11/25/subsonic-3-0-activerecord-examples/</link>
		<comments>http://www.jigsawboys.com/2009/11/25/subsonic-3-0-activerecord-examples/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 07:42:58 +0000</pubDate>
		<dc:creator>Jamsi</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[subsonic]]></category>

		<guid isPermaLink="false">http://www.jigsawboys.com/?p=275</guid>
		<description><![CDATA[I wanted to demonstrate the complete and utter power of SubSonic Activerecord&#8217;s toolset. Pretty much, its an easy to use querying engine which automatically creates objects that you can use within your ASP.NET project. You can use LINQ querying if you like, or you can use the SubSonic preferred way as demonstrated below; Want to [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>I wanted to demonstrate the complete and utter power of SubSonic Activerecord&#8217;s toolset. Pretty much, its an easy to use querying engine which automatically creates objects that you can use within your ASP.NET project. You can use LINQ querying if you like, or you can use the SubSonic preferred way as demonstrated below;</p>
<p><strong>Want to bind a gridview?</strong></p>
<pre class="brush: csharp; title: ; notranslate">
var categories = category.All();
gvList.DataSource = categories;
gvList.DataBind();
</pre>
<p>Boom. Done.</p>
<pre class="brush: csharp; title: ; notranslate">
&lt;pre lang=&quot;csharp&quot; line=&quot;1&quot;&gt;
int iLineID = 1;
category delCat = category.SingleOrDefault(x =&gt; x.id == iLineID);
delCat.Delete();
</pre>
<p>Too easy right?</p>
<p><strong>What about adding a new record?</strong></p>
<pre class="brush: csharp; title: ; notranslate">
category newCat = new category();
newCat.name = &quot;Dummy category name&quot;;
newCat.Add();
</pre>
<p>How easy is that? Go <a href="http://subsonicproject.com/download">grab SubSonic now</a>!</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.jigsawboys.com/2009/11/25/subsonic-3-0-activerecord-examples/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ASP.NET &amp; AlternatingRowStyle &amp; IE8</title>
		<link>http://www.jigsawboys.com/2009/09/17/asp-net-alternatingrowstyle-ie8/</link>
		<comments>http://www.jigsawboys.com/2009/09/17/asp-net-alternatingrowstyle-ie8/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 04:17:36 +0000</pubDate>
		<dc:creator>Jamsi</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[IE8]]></category>

		<guid isPermaLink="false">http://www.jigsawboys.com/?p=252</guid>
		<description><![CDATA[If you&#8217;re a ASP.NET developer like myself, you may or may not have noticed a few changes to your sites when viewed in Internet Explorer 8. As an example I had a gridview which had a different background for alternating rows. And my CSS was something like The Solution The easy (and maybe a little [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re a ASP.NET developer like myself, you may or may not have noticed a few changes to your sites when viewed in Internet Explorer 8.</p>
<p>As an example I had a gridview which had a different background for alternating rows.</p>
<pre class="brush: csharp; title: ; notranslate">
&lt;AlternatingRowStyle CssClass=&quot;odd&quot; /&gt;&lt;/code&gt;
</pre>
<p>And my CSS was something like</p>
<pre class="brush: csharp; title: ; notranslate">
.odd { background-image: url(../graphics/tealbg.gif); }
</pre>
<h2>The Solution</h2>
<p>The easy (and maybe a little messy) way to solve this is to force the page to use IE7 compatibility. You can do this by adding the following to your <head> tag.</p>
<pre class="brush: plain; title: ; notranslate">
&lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=7&quot; /&gt;
</pre>
<p><b>Note:</b> The above meta tag MUST appear before any link tags (stylesheet includes for example)</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.jigsawboys.com/2009/09/17/asp-net-alternatingrowstyle-ie8/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ASP.NETs Forms Based Authentication</title>
		<link>http://www.jigsawboys.com/2008/10/31/aspnets-forms-based-authentication/</link>
		<comments>http://www.jigsawboys.com/2008/10/31/aspnets-forms-based-authentication/#comments</comments>
		<pubDate>Fri, 31 Oct 2008 08:23:06 +0000</pubDate>
		<dc:creator>Jamsi</dc:creator>
				<category><![CDATA[ASP.NET]]></category>

		<guid isPermaLink="false">http://www.jigsawboys.com/?p=185</guid>
		<description><![CDATA[Websites that offer membership based services often require their important files to be secured from non-members. For this purpose, they need to implement form based authentication that ensures that only members can access the files and even if a non-member copies the exact location of the file on the server, he/she is denied access to [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>Websites that offer membership based services often require their important files to be secured from non-members. For this purpose, they need to implement form based authentication that ensures that only members can access the files and even if a non-member copies the exact location of the file on the server, he/she is denied access to the file and redirected back to the login page. Let’s check it out.</p>
<p>1. If you are using an IDE then you need to create a new project and add a LoginPage.aspx page. Switch to html view and add the following code inside the tag of you LoginPage.aspx page.</p>
<pre class="brush: plain; title: ; notranslate">
&lt;h2&gt; &lt;font face=&quot;Times New Roman&quot;&gt;Login Credentials&lt;/font&gt; &lt;/h2&gt;
&lt;table&gt; &lt;tr&gt;
&lt;td&gt;User Name :&lt;/td&gt;
&lt;td&gt;&lt;input id=&quot;CUserName&quot; type=&quot;text&quot; runat=&quot;server&quot; NAME=&quot;CUserName&quot;&gt;&lt;/td&gt;
&lt;td&gt;&lt;ASP:RequiredFieldValidator ControlToValidate=&quot;CUserName&quot; Display=&quot;Static&quot; ErrorMessage=&quot;*&quot; runat=&quot;server&quot; ID=&quot;VUserName&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Password:&lt;/td&gt;
&lt;td&gt;&lt;input id=&quot;CUserPass&quot; type=&quot;password&quot; runat=&quot;server&quot; NAME=&quot;CUserPass&quot;&gt;&lt;/td&gt;
&lt;td&gt;&lt;ASP:RequiredFieldValidator ControlToValidate=&quot;CUserPass&quot; Display=&quot;Static&quot; ErrorMessage=&quot;*&quot; runat=&quot;server&quot; ID=&quot;VUserPass&quot; /&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;/table&gt;
&lt;input type=&quot;submit&quot; Value=&quot;Login&quot; runat=&quot;server&quot; ID=&quot;cmdLogin&quot; NAME=&quot;cmdLogin&quot;&gt;
&lt;/p&gt;
&lt;asp:Label id=&quot;lblMsg&quot; ForeColor=&quot;red&quot; FontName=&quot;Times New Roman&quot; FontSize=&quot;12&quot; runat=&quot;server&quot;/&gt;
</pre>
<p>2. Now, change the authentication in your web.config file to and modify the authentication parameters as given below:</p>
<pre class="brush: plain; title: ; notranslate">
&lt;authorization&gt;
&lt;allow users=&quot;*&quot; /&gt;
&lt;deny users=&quot;?&quot; /&gt;
&lt;/authorization&gt;
</pre>
<p>3. Now, browse the virtual directory in Internet Information Services (IIS), right click on it to access the properties. Move to security tab &#038; click on edit to check Anonymous access option.</p>
<p>4. On your IDE change the view mode to code view for the LoginPage.aspx page and add the following code to it. Refer to Point 4 of Code Event Handler at http://support.microsoft.com/kb/308157</p>
<p><strong>Provide your own coding for authenticating the username &#038; password</strong></p>
<pre class="brush: vb; title: ; notranslate">
if CUserName.Value = &quot;AAAAAAA&quot; and CUserPass.Value = &quot;BBBBBBBB&quot; Then
FormsAuthentication.RedirectFromLoginPage(CUserName.Value , True)
else
Response.Redirect(&quot;LoginPage.aspx&quot; , True)
End if
End Sub
</pre>
<p>5. Create a new page and name it as DefaultPage.aspx and add the following to the html view of the page.</p>
<pre class="brush: plain; title: ; notranslate">
&lt;table border=&quot;0&quot;&gt;
&lt;tr&gt;&lt;-td&gt;http://ServerName/FormsAuth/SecuredFolder/AnyFile.doc&lt;/td&gt;
&lt;td&gt;&lt;-asp:Button id=&quot;SendFile&quot; runat=&quot;server&quot; Text=&quot;Send File&quot;&gt;&lt;/asp:Button&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
</pre>
<p>Now, switch to code view for this page &#038; add the following lines</p>
<pre class="brush: vb; title: ; notranslate">
Private Sub Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button.Click FormsAuthentication.SignOut()
Response.Redirect(&quot;LoginPage.aspx&quot; , True)
End Sub
Private Sub SendFile_Click( ByVal sender As System.Object , ByVal e As System.EventArgs ) Handles SendFile.Click
Response.ContentType = &quot;application/msword&quot;
Response.Clear()
Response.TransmitFile(&quot;SecuredFolderAnyFile.doc&quot;) ‘Create a SecuredFolder in Virtual Directory &amp; add “AnyFile.doc” to it
Response.End()
End Sub
</pre>
<p>Why I used a button instead of a hyperlink is because in case of hyperlink the file will be cached and even if you change the contents of the file, the old file will be displayed. A button will prevent this.</p>
<p>6. Protect the SecuredFolder and ensure that you have granted the READ permission to the Network service or ASPNET. Run your project and try what happens when you try to paste the url of the file and then access it. You will notice a Login page instead of the file.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.jigsawboys.com/2008/10/31/aspnets-forms-based-authentication/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The GridView fired event PageIndexChanging which wasn&#8217;t handled</title>
		<link>http://www.jigsawboys.com/2008/10/22/the-gridview-fired-event-pageindexchanging-which-wasnt-handled/</link>
		<comments>http://www.jigsawboys.com/2008/10/22/the-gridview-fired-event-pageindexchanging-which-wasnt-handled/#comments</comments>
		<pubDate>Tue, 21 Oct 2008 23:49:41 +0000</pubDate>
		<dc:creator>Jamsi</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[gridview]]></category>

		<guid isPermaLink="false">http://www.jigsawboys.com/?p=179</guid>
		<description><![CDATA[If you've set a gridviews AllowPaging attribute to "true", you'll notice the following error;
The GridView fired event PageIndexChanging which wasn't handled


No related posts.]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve set a gridviews AllowPaging attribute to &#8220;true&#8221;, you&#8217;ll notice the following error;</p>
<blockquote><p>The GridView fired event PageIndexChanging which wasn&#8217;t handled</p></blockquote>
<p>To setup paging with Gridviews, you also need to set the page index property to the new page that you wish to view. Funny enough, this is extremely easy to do. See below for a code example written in C#.</p>
<p>The ASPX page</p>
<pre class="brush: plain; title: ; notranslate">
&lt;asp:GridView ID=&quot;gvList&quot; runat=&quot;server&quot; AutoGenerateColumns=&quot;true&quot; AllowPaging=&quot;true&quot; PageSize=&quot;10&quot; OnPageIndexChanging=&quot;gvList_PageIndexChanging&quot;&gt;
</pre>
<p>and the C# code</p>
<pre class="brush: csharp; title: ; notranslate">
    protected void gvList_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        bindGrid();

        gvList.PageIndex = e.NewPageIndex;
        gvList.DataBind();
    }
</pre>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.jigsawboys.com/2008/10/22/the-gridview-fired-event-pageindexchanging-which-wasnt-handled/feed/</wfw:commentRss>
		<slash:comments>31</slash:comments>
		</item>
		<item>
		<title>Hiding Details view after update</title>
		<link>http://www.jigsawboys.com/2008/03/28/hiding-details-view-after-update/</link>
		<comments>http://www.jigsawboys.com/2008/03/28/hiding-details-view-after-update/#comments</comments>
		<pubDate>Thu, 27 Mar 2008 23:37:15 +0000</pubDate>
		<dc:creator>Jamsi</dc:creator>
				<category><![CDATA[ASP.NET]]></category>

		<guid isPermaLink="false">http://www.jigsawboys.com/2008/03/28/hiding-details-view-after-update/</guid>
		<description><![CDATA[I had the need to hide a detailsview after an update. Forget using visible=false, this just hides it permanently!


No related posts.]]></description>
			<content:encoded><![CDATA[<p>I had the need to hide a detailsview after an update. Forget using visible=false, this just hides it permanently!</p>
<p>Try setting the datagrid selectedindex = -1</p>
<pre lang="csharp">
        protected void dvDetailsView_Updated(Object sender, System.Web.UI.WebControls.DetailsViewUpdatedEventArgs e)
        {
            gvGridview.SelectedIndex = -1;
        }
</pre>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.jigsawboys.com/2008/03/28/hiding-details-view-after-update/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Weird scrolling issue with Modalpopupextender</title>
		<link>http://www.jigsawboys.com/2008/01/21/weird-scrolling-issue-with-modalpopupextender-2/</link>
		<comments>http://www.jigsawboys.com/2008/01/21/weird-scrolling-issue-with-modalpopupextender-2/#comments</comments>
		<pubDate>Mon, 21 Jan 2008 04:17:23 +0000</pubDate>
		<dc:creator>Jamsi</dc:creator>
				<category><![CDATA[ASP.NET]]></category>

		<guid isPermaLink="false">http://www.jigsawboys.com/2008/01/21/weird-scrolling-issue-with-modalpopupextender-2/</guid>
		<description><![CDATA[Are you ripping your hair out over a issue with the AJAX modalpopupextender and a never-ending scrollbar?!? I had a panel with a style=absolute in the style= tag, causing the popup to show in the middle of the page. But for some reason, the page went wonky and I could scroll endlessly! Here&#8217;s the fix; [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>Are you ripping your hair out over a issue with the AJAX modalpopupextender and a never-ending scrollbar?!? I had a panel with a style=absolute in the style= tag, causing the popup to show in the middle of the page. But for some reason, the page went wonky and I could scroll endlessly!</p>
<p>Here&#8217;s the fix;</p>
<p>I changed this</p>
<pre class="brush: plain; title: ; notranslate">!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;</pre>
<p>to this</p>
<pre class="brush: plain; title: ; notranslate">
!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;
</pre>
<p>and my pain ended.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.jigsawboys.com/2008/01/21/weird-scrolling-issue-with-modalpopupextender-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Windows Authentication under IIS7 (ASP.NET)</title>
		<link>http://www.jigsawboys.com/2007/05/23/using-windows-authentication-under-iis7-aspnet/</link>
		<comments>http://www.jigsawboys.com/2007/05/23/using-windows-authentication-under-iis7-aspnet/#comments</comments>
		<pubDate>Wed, 23 May 2007 03:32:08 +0000</pubDate>
		<dc:creator>Jamsi</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Windows Vista]]></category>

		<guid isPermaLink="false">http://www.jigsawboys.com/2007/05/23/using-windows-authentication-under-iis7-aspnet/</guid>
		<description><![CDATA[Okay so I took me a few hours but I finally figured out how to turn on Windows Authentication under IIS7. For some reason, it&#8217;s turned off by default and in IIS7 under authentication you&#8217;ll only see anonymous. I have a ASP.NET 1.1 application that requires Windows Authentication and this was the error I was [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>Okay so I took me a few hours but I finally figured out how to turn on Windows Authentication under IIS7. For some reason, it&#8217;s turned off by default and in IIS7 under authentication you&#8217;ll only see anonymous.</p>
<p>I have a ASP.NET 1.1 application that requires Windows Authentication and this was the error I was receiving.</p>
<blockquote><p>&#8220;You do not have permission to view this directory or page using the credentials you supplied&#8221;</p></blockquote>
<ol>
<li>Whip open the control panel, and select programs and features</li>
<li>On the left select &#8220;Turn Windows Features on or off&#8221;</li>
<li>Drill down to &#8220;Internet Information Services&#8221; &#8211; &#8220;World Wide Web&#8221; services&#8221; &#8211; &#8220;Security&#8221; &#8211; &#8220;Windows Authentication&#8221;</li>
<li>Tick &#8220;Windows Authentication&#8221;</li>
</ol>
<p>My gosh, hidden away eh?<br />
I love Windows Vista.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.jigsawboys.com/2007/05/23/using-windows-authentication-under-iis7-aspnet/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Check all function for Datagrids</title>
		<link>http://www.jigsawboys.com/2006/12/01/check-all-function-for-a-datagrid/</link>
		<comments>http://www.jigsawboys.com/2006/12/01/check-all-function-for-a-datagrid/#comments</comments>
		<pubDate>Thu, 30 Nov 2006 23:37:28 +0000</pubDate>
		<dc:creator>Jamsi</dc:creator>
				<category><![CDATA[ASP.NET]]></category>

		<guid isPermaLink="false">http://www.jigsawboys.com/2006/12/01/check-all-function-for-a-datagrid/</guid>
		<description><![CDATA[I had the need to create a datagrid check all function, similar to those that you see in yahoo, gmail, hotmail etc. My Datagrid looked like this; With the datagrid code above, make sure you modify the jsSelectAll parameters! 1st var: The name of your datagrid (In my example, dgList) 2nd var: The name of [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>I had the need to create a datagrid <strong>check all</strong> function, similar to those that you see in yahoo, gmail, hotmail etc.</p>
<p><strong>My Datagrid looked like this;</strong></p>
<pre class="brush: csharp; title: ; notranslate">
&lt;asp:datagrid id=&quot;dgList&quot; Runat=&quot;server&quot; width=&quot;600px&quot; AutoGenerateColumns=&quot;False&quot;&gt;
&lt;Columns&gt;
	&lt;asp:TemplateColumn&gt;
		&lt;HeaderTemplate&gt;
			&lt;asp:CheckBox ID=&quot;chkAll&quot; onclick=&quot;javascript:jsSelectAll('dgList','dgList__ctl1_chkAll');&quot; runat=&quot;server&quot; ToolTip=&quot;Select/Deselect All&quot; AutoPostBack=&quot;false&quot; /&gt;
		&lt;/HeaderTemplate&gt;
		&lt;ItemTemplate&gt;
			&lt;asp:CheckBox ID=&quot;chkSelect&quot; Runat=&quot;server&quot;&gt;&lt;/asp:CheckBox&gt;
		&lt;/ItemTemplate&gt;
	&lt;/asp:TemplateColumn&gt;
	&lt;asp:BoundColumn DataField=&quot;col1&quot; HeaderText=&quot;col1&quot;&gt;&lt;/asp:BoundColumn&gt;
	&lt;asp:BoundColumn DataField=&quot;col2&quot; HeaderText=&quot;col2&quot;&gt;&lt;/asp:BoundColumn&gt;
&lt;/Columns&gt;
&lt;/asp:datagrid&gt;
</pre>
<p>With the datagrid code above, make sure you modify the jsSelectAll parameters!<br />
<strong>1st var:</strong> The name of your datagrid (In my example, dgList)<br />
<strong>2nd var:</strong> The name of your check all checkbox</p>
<p>I used a javascript function that loops through all the checkboxes within the datagrid and selects/de-selects.</p>
<pre class="brush: jscript; title: ; notranslate">
function jsSelectAll(datagridID, checkallID)
{
	var obj = document.getElementById(datagridID).all.tags(&quot;input&quot;);
	var blCheck = true;
	var chk = document.getElementById(checkallID);
	if (chk.checked == true)
		blCheck=true;
	else
		blCheck=false;
	for (var i=0; i&lt;obj.length; i++){
		if (obj[i].type == &quot;checkbox&quot;){
			obj[i].checked = blCheck;
		}
	}
}
</pre>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.jigsawboys.com/2006/12/01/check-all-function-for-a-datagrid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NullableTypes Access is denied</title>
		<link>http://www.jigsawboys.com/2006/02/15/nullabletypes-access-is-denied/</link>
		<comments>http://www.jigsawboys.com/2006/02/15/nullabletypes-access-is-denied/#comments</comments>
		<pubDate>Wed, 15 Feb 2006 08:27:45 +0000</pubDate>
		<dc:creator>Jamsi</dc:creator>
				<category><![CDATA[ASP.NET]]></category>

		<guid isPermaLink="false">http://www.jigsawboys.com/2006/02/15/nullabletypes-access-is-denied/</guid>
		<description><![CDATA[I came across a problem where everytime I recompiled my C# ASP.NET project and visited the website; it would report the following error. Exception Details: System.IO.FileLoadException: Access is denied: 'NullableTypes' I asked the developers for a fix and they came through with a quick and easy solution. First you must check that the ASPNET user [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>I came across a problem where everytime I recompiled my C# ASP.NET project and visited the website; it would report the following error.</p>
<pre class="code"><code>Exception Details: System.IO.FileLoadException: Access is denied: 'NullableTypes'</code></pre>
<p>I asked the developers for a fix and they came through with a quick and easy solution.</p>
<p>First you must check that the ASPNET user (most likely NETWORK SERVICE) has access to your project folder and also the &#8220;C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary&#8221; folder.</p>
<p>If that doesn&#8217;t work (like in my case), download the NullableTypes 1.3 beta and drag and drop the DLL into your C:/WINDOWS/Assemby folder. This did the trick for me!</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.jigsawboys.com/2006/02/15/nullabletypes-access-is-denied/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Adding sorting ability to a repeater control</title>
		<link>http://www.jigsawboys.com/2006/02/11/adding-sorting-ability-to-a-repeater-control/</link>
		<comments>http://www.jigsawboys.com/2006/02/11/adding-sorting-ability-to-a-repeater-control/#comments</comments>
		<pubDate>Sat, 11 Feb 2006 08:22:31 +0000</pubDate>
		<dc:creator>Jamsi</dc:creator>
				<category><![CDATA[ASP.NET]]></category>

		<guid isPermaLink="false">http://www.jigsawboys.com/2006/02/11/adding-sorting-ability-to-a-repeater-control/</guid>
		<description><![CDATA[This code snippet shows you how to sort a repeater web form control. This is handy when you are using scrollable repeater tables. DataView dv = ds.Tables[0].DefaultView; dv.Sort = "firstname asc"; rptUsers.DataSource = dv; No related posts.


No related posts.]]></description>
			<content:encoded><![CDATA[<p>This code snippet shows you how to sort a repeater web form control. This is handy when you are using scrollable repeater tables.</p>
<pre class="code"><code>
DataView dv = ds.Tables[0].DefaultView;
dv.Sort = "firstname asc";
rptUsers.DataSource = dv;
</code></pre>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.jigsawboys.com/2006/02/11/adding-sorting-ability-to-a-repeater-control/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

