<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments for Chad Scharf&#039;s Weblog</title>
	<atom:link href="http://www.chadscharf.com/index.php/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.chadscharf.com</link>
	<description>It&#039;s always time to upgrade!</description>
	<lastBuildDate>Thu, 15 Jul 2010 04:53:03 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>Comment on Creating a Page method (ScriptMethod) within an ASCX user control using AJAX, JSON, base classes and reflection by Peter A</title>
		<link>http://www.chadscharf.com/index.php/2009/11/creating-a-page-method-scriptmethod-within-an-ascx-user-control-using-ajax-json-base-classes-and-reflection/comment-page-1/#comment-1354</link>
		<dc:creator>Peter A</dc:creator>
		<pubDate>Thu, 15 Jul 2010 04:53:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.chadscharf.com/?p=51#comment-1354</guid>
		<description>I would just like to say Thankyou!
I was looking for exactly this kind of solution wondering why it wasn&#039;t default behavior.
Thanks again!</description>
		<content:encoded><![CDATA[<p>I would just like to say Thankyou!<br />
I was looking for exactly this kind of solution wondering why it wasn&#8217;t default behavior.<br />
Thanks again!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on 3-State CheckBox using Microsoft AJAX by Chad</title>
		<link>http://www.chadscharf.com/index.php/2008/10/3-state-checkbox-using-microsoft-ajax/comment-page-1/#comment-1170</link>
		<dc:creator>Chad</dc:creator>
		<pubDate>Thu, 01 Jul 2010 14:26:41 +0000</pubDate>
		<guid isPermaLink="false">http://chadscharf.com/post.aspx?id=565b0d14-08af-4b2d-8677-11163000d088#comment-1170</guid>
		<description>[DefaultValue(CheckedState.Blank)]
[Bindable(true, BindingDirection.TwoWay)]
[Themeable(false)]
public bool? IsChecked
{
	#region IsChecked

	get
	{
		switch (Checked)
		{
			case CheckedState.Checked: return true;
			case CheckedState.Unchecked: return false;
			case CheckedState.Blank:
			default: return null;
		}
	}
	set
	{
		Checked = value == null ? CheckedState.Blank : value.Value ? CheckedState.Checked : CheckedState.Unchecked;
	}

	#endregion
}</description>
		<content:encoded><![CDATA[<p>[DefaultValue(CheckedState.Blank)]<br />
[Bindable(true, BindingDirection.TwoWay)]<br />
[Themeable(false)]<br />
public bool? IsChecked<br />
{<br />
	#region IsChecked</p>
<p>	get<br />
	{<br />
		switch (Checked)<br />
		{<br />
			case CheckedState.Checked: return true;<br />
			case CheckedState.Unchecked: return false;<br />
			case CheckedState.Blank:<br />
			default: return null;<br />
		}<br />
	}<br />
	set<br />
	{<br />
		Checked = value == null ? CheckedState.Blank : value.Value ? CheckedState.Checked : CheckedState.Unchecked;<br />
	}</p>
<p>	#endregion<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on 3-State CheckBox using Microsoft AJAX by Chad</title>
		<link>http://www.chadscharf.com/index.php/2008/10/3-state-checkbox-using-microsoft-ajax/comment-page-1/#comment-1159</link>
		<dc:creator>Chad</dc:creator>
		<pubDate>Thu, 01 Jul 2010 01:42:19 +0000</pubDate>
		<guid isPermaLink="false">http://chadscharf.com/post.aspx?id=565b0d14-08af-4b2d-8677-11163000d088#comment-1159</guid>
		<description>You could easily add a Text property to the control, sure. I would add a Label control positioned relative to the image button, setting the target control Id = the image button&#039;s ID. This way the lable will act like a true form label, similar to how ASP.NET renders a true asp:CheckBox control.

As far as setting the 3-way state using a nullable boolean value, that should be easy as well. Something like this should suffice; (where myBitField is a nullable boolean, (bool? myBitField)):

myCheckBox.Checked = myBitField == null ? CheckedState.Blank : myBitField.Value ? CheckedState.Checked : CheckedState.Unchecked;

And then just reversing that the other way to get the value back out. You could also scrap the enumeration and simply use a Nullable property instead, blank = null, checked = true, unchecked = false. It should be fairly simple to switch the binding from the enumeration with the hidden field (which can have a blank string as its value anyway).

Thanks,
Chad</description>
		<content:encoded><![CDATA[<p>You could easily add a Text property to the control, sure. I would add a Label control positioned relative to the image button, setting the target control Id = the image button&#8217;s ID. This way the lable will act like a true form label, similar to how ASP.NET renders a true asp:CheckBox control.</p>
<p>As far as setting the 3-way state using a nullable boolean value, that should be easy as well. Something like this should suffice; (where myBitField is a nullable boolean, (bool? myBitField)):</p>
<p>myCheckBox.Checked = myBitField == null ? CheckedState.Blank : myBitField.Value ? CheckedState.Checked : CheckedState.Unchecked;</p>
<p>And then just reversing that the other way to get the value back out. You could also scrap the enumeration and simply use a Nullable property instead, blank = null, checked = true, unchecked = false. It should be fairly simple to switch the binding from the enumeration with the hidden field (which can have a blank string as its value anyway).</p>
<p>Thanks,<br />
Chad</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on 3-State CheckBox using Microsoft AJAX by George</title>
		<link>http://www.chadscharf.com/index.php/2008/10/3-state-checkbox-using-microsoft-ajax/comment-page-1/#comment-1045</link>
		<dc:creator>George</dc:creator>
		<pubDate>Mon, 21 Jun 2010 04:33:59 +0000</pubDate>
		<guid isPermaLink="false">http://chadscharf.com/post.aspx?id=565b0d14-08af-4b2d-8677-11163000d088#comment-1045</guid>
		<description>I like your control, but I&#039;m missing the &quot;Text&quot; property. Also I need to bind to a nullable boolean database field (sql &#039;bit&#039; type, actually). Expected behavior would be to bind NULL to the third, &#039;Blank&#039; state. Is it easy task?

rgds, George</description>
		<content:encoded><![CDATA[<p>I like your control, but I&#8217;m missing the &#8220;Text&#8221; property. Also I need to bind to a nullable boolean database field (sql &#8216;bit&#8217; type, actually). Expected behavior would be to bind NULL to the third, &#8216;Blank&#8217; state. Is it easy task?</p>
<p>rgds, George</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Readability, Sub-Queries in LINQ by Steve</title>
		<link>http://www.chadscharf.com/index.php/2008/03/readability-sub-queries-in-linq/comment-page-1/#comment-848</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Fri, 28 May 2010 11:44:44 +0000</pubDate>
		<guid isPermaLink="false">http://chadscharf.com/post.aspx?id=142938bb-425a-4c87-996e-eff575e58117#comment-848</guid>
		<description>Me Like! 

Thanks for the writeup.   Linq2Sql is quite flexible. Didn&#039;t think about doing it in the &quot;select new{}&quot; way. Good idea.

I was thinking about doing an &quot;in&quot; or &quot;contains&quot; style operator for seeing if a record contains information from another related table.. but this was good info to know.</description>
		<content:encoded><![CDATA[<p>Me Like! </p>
<p>Thanks for the writeup.   Linq2Sql is quite flexible. Didn&#8217;t think about doing it in the &#8220;select new{}&#8221; way. Good idea.</p>
<p>I was thinking about doing an &#8220;in&#8221; or &#8220;contains&#8221; style operator for seeing if a record contains information from another related table.. but this was good info to know.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Readability, Sub-Queries in LINQ by Bruce</title>
		<link>http://www.chadscharf.com/index.php/2008/03/readability-sub-queries-in-linq/comment-page-1/#comment-775</link>
		<dc:creator>Bruce</dc:creator>
		<pubDate>Wed, 19 May 2010 20:35:09 +0000</pubDate>
		<guid isPermaLink="false">http://chadscharf.com/post.aspx?id=142938bb-425a-4c87-996e-eff575e58117#comment-775</guid>
		<description>Me Like! 

Thanks for the writeup.   Linq2Sql is quite flexible. Didn&#039;t think about doing it in the &quot;select new{}&quot; way. Good idea.

I was thinking about doing an &quot;in&quot; or &quot;contains&quot; style operator for seeing if a record contains information from another related table.. but this was good info to know.</description>
		<content:encoded><![CDATA[<p>Me Like! </p>
<p>Thanks for the writeup.   Linq2Sql is quite flexible. Didn&#8217;t think about doing it in the &#8220;select new{}&#8221; way. Good idea.</p>
<p>I was thinking about doing an &#8220;in&#8221; or &#8220;contains&#8221; style operator for seeing if a record contains information from another related table.. but this was good info to know.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Creating a Page method (ScriptMethod) within an ASCX user control using AJAX, JSON, base classes and reflection by Manpreet Padam</title>
		<link>http://www.chadscharf.com/index.php/2009/11/creating-a-page-method-scriptmethod-within-an-ascx-user-control-using-ajax-json-base-classes-and-reflection/comment-page-1/#comment-580</link>
		<dc:creator>Manpreet Padam</dc:creator>
		<pubDate>Fri, 23 Apr 2010 18:59:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.chadscharf.com/?p=51#comment-580</guid>
		<description>Hi,

I was trying webmethods in a similar scenario that you explained it and I tumbled upon your neat solution. Works like a charm.

Thanks</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I was trying webmethods in a similar scenario that you explained it and I tumbled upon your neat solution. Works like a charm.</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Protecting PDF files in IIS 6 using Forms Authentication by Taliesin</title>
		<link>http://www.chadscharf.com/index.php/2008/04/protecting-pdf-files-in-iis-6-using-forms-authentication/comment-page-1/#comment-489</link>
		<dc:creator>Taliesin</dc:creator>
		<pubDate>Fri, 19 Mar 2010 09:46:00 +0000</pubDate>
		<guid isPermaLink="false">http://chadscharf.com/post.aspx?id=cb52d8b4-d442-418d-a5d3-d94c4ece3c86#comment-489</guid>
		<description>If you want to apply authorization, for pdf files. 

Check out this handler:
http://code.google.com/p/talifun-web/wiki/RegexUrlAuthorizationModule

It provides authorization on all urls that match a regular expression. It also allows you to apply any authorization that is supported by .net web.config files.

Serving content from an http handler can be a tricky business, especially pdf files. Adobe Reader in &quot;Allow fast web view&quot; mode starts downloading a pdf and soon as it has enough bytes to display the first page it aborts the connection to the web server, and displays the first page. Then it makes a &quot;multipart/byteranges&quot; request to retrieve the rest of the document. This is what causes most download scripts to fail when serving pdf content. 

If you are looking for an http handler that will serve static files in a cached, compressed and resumable manner.

Check out
http://code.google.com/p/talifun-web/wiki/StaticFileHandler</description>
		<content:encoded><![CDATA[<p>If you want to apply authorization, for pdf files. </p>
<p>Check out this handler:<br />
<a href="http://code.google.com/p/talifun-web/wiki/RegexUrlAuthorizationModule" rel="nofollow">http://code.google.com/p/talifun-web/wiki/RegexUrlAuthorizationModule</a></p>
<p>It provides authorization on all urls that match a regular expression. It also allows you to apply any authorization that is supported by .net web.config files.</p>
<p>Serving content from an http handler can be a tricky business, especially pdf files. Adobe Reader in &#8220;Allow fast web view&#8221; mode starts downloading a pdf and soon as it has enough bytes to display the first page it aborts the connection to the web server, and displays the first page. Then it makes a &#8220;multipart/byteranges&#8221; request to retrieve the rest of the document. This is what causes most download scripts to fail when serving pdf content. </p>
<p>If you are looking for an http handler that will serve static files in a cached, compressed and resumable manner.</p>
<p>Check out<br />
<a href="http://code.google.com/p/talifun-web/wiki/StaticFileHandler" rel="nofollow">http://code.google.com/p/talifun-web/wiki/StaticFileHandler</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on 3-State CheckBox using Microsoft AJAX by Chad</title>
		<link>http://www.chadscharf.com/index.php/2008/10/3-state-checkbox-using-microsoft-ajax/comment-page-1/#comment-479</link>
		<dc:creator>Chad</dc:creator>
		<pubDate>Sun, 14 Mar 2010 14:44:18 +0000</pubDate>
		<guid isPermaLink="false">http://chadscharf.com/post.aspx?id=565b0d14-08af-4b2d-8677-11163000d088#comment-479</guid>
		<description>Were you wanting to use an UpdatePanel for your partial post-back or client-side page call-back? If you want to force a post-back, and the control is within an UpdatePanel, this is pretty simple, there are several great suggestions on this forum post in reply to a similar question: http://forums.asp.net/t/1034652.aspx.</description>
		<content:encoded><![CDATA[<p>Were you wanting to use an UpdatePanel for your partial post-back or client-side page call-back? If you want to force a post-back, and the control is within an UpdatePanel, this is pretty simple, there are several great suggestions on this forum post in reply to a similar question: <a href="http://forums.asp.net/t/1034652.aspx" rel="nofollow">http://forums.asp.net/t/1034652.aspx</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on 3-State CheckBox using Microsoft AJAX by Josh</title>
		<link>http://www.chadscharf.com/index.php/2008/10/3-state-checkbox-using-microsoft-ajax/comment-page-1/#comment-421</link>
		<dc:creator>Josh</dc:creator>
		<pubDate>Fri, 05 Feb 2010 15:29:52 +0000</pubDate>
		<guid isPermaLink="false">http://chadscharf.com/post.aspx?id=565b0d14-08af-4b2d-8677-11163000d088#comment-421</guid>
		<description>Nice work Chad. I have implemented this as-is and it works great. One question though. I would like to use a partial page post-back when the state changes on the client. How do I go about wiring the client-side events and capturing them on the server-side?

Thanks for a great control!

josh</description>
		<content:encoded><![CDATA[<p>Nice work Chad. I have implemented this as-is and it works great. One question though. I would like to use a partial page post-back when the state changes on the client. How do I go about wiring the client-side events and capturing them on the server-side?</p>
<p>Thanks for a great control!</p>
<p>josh</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- www.000webhost.com Analytics Code -->
<script type="text/javascript" src="http://analytics.hosting24.com/count.php"></script>
<noscript><a href="http://www.hosting24.com/"><img src="http://analytics.hosting24.com/count.php" alt="web hosting" /></a></noscript>
<!-- End Of Analytics Code -->
