<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Ketone Cops</title>
	<atom:link href="http://delroger.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://delroger.wordpress.com</link>
	<description>Programming and the ketogenic diet</description>
	<lastBuildDate>Mon, 08 Aug 2011 22:21:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='delroger.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Ketone Cops</title>
		<link>http://delroger.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://delroger.wordpress.com/osd.xml" title="Ketone Cops" />
	<atom:link rel='hub' href='http://delroger.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Modal Popup with Progress</title>
		<link>http://delroger.wordpress.com/2009/08/21/modal-popup-with-progress/</link>
		<comments>http://delroger.wordpress.com/2009/08/21/modal-popup-with-progress/#comments</comments>
		<pubDate>Fri, 21 Aug 2009 12:42:08 +0000</pubDate>
		<dc:creator>delroger</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[ASP.NET 2.0]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://delroger.wordpress.com/?p=37</guid>
		<description><![CDATA[I was interested in using a Modal Popup to prevent trigger-happy clicking by impatient users when my web app was doing a processing job for a few seconds.  I came across Matt Berseth&#8217;s excellent work here http://mattberseth.com/blog/2007/07/modalpopup_as_an_ajax_progress.html and decided that it would be useful to make a class file for Sample 3 on that page.  [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=delroger.wordpress.com&amp;blog=2773214&amp;post=37&amp;subd=delroger&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I was interested in using a Modal Popup to prevent trigger-happy clicking by impatient users when my web app was doing a processing job for a few seconds.  I came across Matt Berseth&#8217;s excellent work here <a title="http://mattberseth.com/blog/2007/07/modalpopup_as_an_ajax_progress.html" href="http://mattberseth.com/blog/2007/07/modalpopup_as_an_ajax_progress.html">http://mattberseth.com/blog/2007/07/modalpopup_as_an_ajax_progress.html</a> and decided that it would be useful to make a class file for Sample 3 on that page.  So here it is&#8230;</p>
<p>This assumes that you have a modal popup extender and a panel on your page that will display the animated gif.  This is the code for mine (almost identical to Matt Berseth&#8217;s):</p>
<p>&lt;ajaxToolKit:ModalPopupExtender<br />
ID=&#8221;mdlPopup&#8221; runat=&#8221;server&#8221; TargetControlID=&#8221;pnlPopup&#8221;<br />
PopupControlID=&#8221;pnlPopup&#8221; BackgroundCssClass=&#8221;modalBackground&#8221;  /&gt;<br />
&lt;asp:Panel ID=&#8221;pnlPopup&#8221; runat=&#8221;server&#8221; CssClass=&#8221;updateProgress&#8221; style=&#8221;display:none&#8221;&gt;<br />
&lt;div align=&#8221;center&#8221; style=&#8221;margin-top:13px;&#8221;&gt;<br />
&lt;img src=&#8221;Images/ajax-loader.gif&#8221; /&gt;<br />
&lt;span&gt;Processing&#8230;&lt;/span&gt;<br />
&lt;/div&gt;<br />
&lt;/asp:Panel&gt;</p>
<p>The class file then looks like the code below. It contains one Sub that takes the name of your modal popup and the delay before displaying it (in milliseconds) as parameters, injecting the necessary javascript into your page for displaying the modal popup/progress when processing is occurring.</p>
<p>Public Class clsModalProgress<br />
Public Shared Sub DoModalProgress(ByVal mdl As AjaxControlToolkit.ModalPopupExtender, ByVal delay As Integer)<br />
Dim pg As Page = HttpContext.Current.Handler<br />
If Not pg Is Nothing Then<br />
If Not pg.ClientScript.IsStartupScriptRegistered(&#8220;progressScript&#8221;) Then<br />
Dim t As Type<br />
t = pg.GetType()<br />
pg.ClientScript.RegisterStartupScript(t, &#8220;progressScript&#8221;, _<br />
&#8220;Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(beginRequest);&#8221; &amp; Environment.NewLine &amp; _<br />
&#8220;Sys.WebForms.PageRequestManager.getInstance().add_endRequest(endRequest);&#8221; &amp; Environment.NewLine &amp; _<br />
&#8220;var count;&#8221; &amp; Environment.NewLine &amp; _<br />
&#8220;function beginRequest(sender, args){&#8221; &amp; Environment.NewLine &amp; _<br />
&#8220;  count = setTimeout(&#8220;&#8221;showProgress()&#8221;", &#8221; &amp; delay &amp; &#8220;);&#8221; &amp; Environment.NewLine &amp; _<br />
&#8220;}&#8221; &amp; Environment.NewLine &amp; _<br />
&#8220;function showProgress(){&#8221; &amp; Environment.NewLine &amp; _<br />
&#8220;  $find(&#8216;&#8221; &amp; mdl.ClientID &amp; &#8220;&#8216;).show();&#8221; &amp; Environment.NewLine &amp; _<br />
&#8220;}&#8221; &amp; Environment.NewLine &amp; _<br />
&#8220;function endRequest(sender, args) {&#8221; &amp; Environment.NewLine &amp; _<br />
&#8220;  clearTimeout(count);&#8221; &amp; Environment.NewLine &amp; _<br />
&#8220;  $find(&#8216;&#8221; &amp; mdl.ClientID &amp; &#8220;&#8216;).hide();&#8221; &amp; Environment.NewLine &amp; _<br />
&#8220;}&#8221;, True)<br />
End If<br />
End If<br />
End Sub<br />
End Class</p>
<p>You can simply call it in the Page_Load or Page_Prerender subs like this:</p>
<p>clsModalProgress.DoModalProgress(mdlPopup, 100)</p>
<p>In this case, the modal popup will display if processing take longer than one-tenth of a second.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/delroger.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/delroger.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/delroger.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/delroger.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/delroger.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/delroger.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/delroger.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/delroger.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/delroger.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/delroger.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/delroger.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/delroger.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/delroger.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/delroger.wordpress.com/37/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=delroger.wordpress.com&amp;blog=2773214&amp;post=37&amp;subd=delroger&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://delroger.wordpress.com/2009/08/21/modal-popup-with-progress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">delroger</media:title>
		</media:content>
	</item>
		<item>
		<title>Programmatically open and close Accordion Panes</title>
		<link>http://delroger.wordpress.com/2009/02/10/programmatically-open-and-close-accordion-panes/</link>
		<comments>http://delroger.wordpress.com/2009/02/10/programmatically-open-and-close-accordion-panes/#comments</comments>
		<pubDate>Tue, 10 Feb 2009 13:47:19 +0000</pubDate>
		<dc:creator>delroger</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[ASP.NET 2.0]]></category>

		<guid isPermaLink="false">http://delroger.wordpress.com/?p=33</guid>
		<description><![CDATA[If you have an AJAX page in ASP.NET that contains an Accordion control, you may find you want to open and close the different panes from events other than clicking on the header. You can set the SelectedIndex property of the Accordion in your code-behind, but this does not use smooth transitions. However, you can [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=delroger.wordpress.com&amp;blog=2773214&amp;post=33&amp;subd=delroger&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you have an AJAX page in ASP.NET that contains an Accordion control, you may find you want to open and close the different panes from events other than clicking on the header. You can set the SelectedIndex property of the Accordion in your code-behind, but this does not use smooth transitions. However, you can use javascript to invoke the set_SelectedIndex method, which will contract the currently-expanded pane and expand the new one. Tip 3 on this page&#8230;</p>
<p><a title="http://www.dotnetcurry.com/ShowArticle.aspx?ID=215" href="http://www.dotnetcurry.com/ShowArticle.aspx?ID=215">http://www.dotnetcurry.com/ShowArticle.aspx?ID=215</a></p>
<p>&#8230;shows you how to do that.</p>
<p>However, if you are using Master pages, the ID of the Accordion control will be different and so you will need to set this programmatically in code. Create a Sub like this&#8230;</p>
<p>Private Sub AccordionTransition()<br />
If Not Page.ClientScript.IsClientScriptBlockRegistered(&#8220;changeSelectedScript&#8221;) Then<br />
Dim t As Type<br />
t = Me.GetType() &#8216;type of page<br />
Page.ClientScript.RegisterClientScriptBlock(t, &#8220;changeSelectedScript&#8221;, _<br />
&#8220;  function changeSelected(idx) {&#8221; &amp; Environment.NewLine &amp; _<br />
&#8220;   $find(&#8216;&#8221; &amp; Me.MyAccordion.ClientID &amp; &#8220;_AccordionExtender&#8217;).set_SelectedIndex(idx);&#8221; &amp; Environment.NewLine &amp; _<br />
&#8220;}&#8221;, True)<br />
End If<br />
End Sub</p>
<p>&#8230; and then call this sub in your Page_Load. Note that my Accordion control is called &#8216;MyAccordion&#8217; and will need to be changed, or you can make this sub more generic and pass the control ID in like this:</p>
<p>Private Sub AccordionTransition(ByVal ctlAccordion As WebControl)<br />
If Not Page.ClientScript.IsClientScriptBlockRegistered(&#8220;changeSelectedScript&#8221;) Then<br />
Dim t As Type<br />
t = Me.GetType() &#8216;type of page<br />
Page.ClientScript.RegisterClientScriptBlock(t, &#8220;changeSelectedScript&#8221;, _<br />
&#8220;  function changeSelected(idx) {&#8221; &amp; Environment.NewLine &amp; _<br />
&#8220;   $find(&#8216;&#8221; &amp; ctlAccordion.ClientID &amp; &#8220;_AccordionExtender&#8217;).set_SelectedIndex(idx);&#8221; &amp; Environment.NewLine &amp; _<br />
&#8220;}&#8221;, True)<br />
End If<br />
End Sub</p>
<p>Finally, to use this on your webpage, you will need to add an OnClientClick event to whichever control(s) you want to invoke the Accordion expension/contraction. So for instance, with a button you would need:</p>
<p>&lt;asp:Button ID=&#8221;Button1&#8243; runat=&#8221;server&#8221; Text=&#8221;Accordion Change&#8221; OnClientClick=&#8221;changeSelected(1); &#8221; /&gt;</p>
<p>The number that is passed into the changeSelected function is the index of the accordion pane you wish to expand. The selected pane expands and any further processing you have set up for that button will continue in the code-behind. If you did not want anything else to occur in the code-behind, you would return a false event value in the click event as well:</p>
<p>&lt;asp:Button ID=&#8221;Button2&#8243; runat=&#8221;server&#8221; Text=&#8221;Accordion Change&#8221; OnClientClick=&#8221;changeSelected(1); event.returnValue=false; return false;&#8221; /&gt;</p>
<p>Finally, you can also set up the click event in the code behind by adding attributes to the control at Page_Load, such as:</p>
<p>Button2.Attributes.Add(&#8220;onclick&#8221;, &#8220;javascript: changeSelected(1);&#8221;)</p>
<p>This could give you more control, for instance if you were using a gridview and wanted to set particular actions for each row.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/delroger.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/delroger.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/delroger.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/delroger.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/delroger.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/delroger.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/delroger.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/delroger.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/delroger.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/delroger.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/delroger.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/delroger.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/delroger.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/delroger.wordpress.com/33/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=delroger.wordpress.com&amp;blog=2773214&amp;post=33&amp;subd=delroger&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://delroger.wordpress.com/2009/02/10/programmatically-open-and-close-accordion-panes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">delroger</media:title>
		</media:content>
	</item>
		<item>
		<title>Invalid character in a Base-64 string (ASP.NET)</title>
		<link>http://delroger.wordpress.com/2008/08/19/invalid-character-in-a-base-64-string-aspnet/</link>
		<comments>http://delroger.wordpress.com/2008/08/19/invalid-character-in-a-base-64-string-aspnet/#comments</comments>
		<pubDate>Tue, 19 Aug 2008 11:16:56 +0000</pubDate>
		<dc:creator>delroger</dc:creator>
				<category><![CDATA[ASP.NET 2.0]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://delroger.wordpress.com/?p=26</guid>
		<description><![CDATA[Just came across a very peculiar problem with a website I&#8217;m developing. Some visitors to the website hit an error every time they click one of the controls on a particular page; the page loads fine the first time, but any sort of postback triggers the error. The message is: Invalid character in a Base-64 string [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=delroger.wordpress.com&amp;blog=2773214&amp;post=26&amp;subd=delroger&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Just came across a very peculiar problem with a website I&#8217;m developing. Some visitors to the website hit an error every time they click one of the controls on a particular page; the page loads fine the first time, but any sort of postback triggers the error. The message is:</p>
<p>Invalid character in a Base-64 string</p>
<p>and the stack trace is:</p>
<p>at System.Convert.FromBase64String(String s) at System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) at System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter.Deserialize(String serializedState) at System.Web.UI.Util.DeserializeWithAssert(IStateFormatter formatter, String serializedState) at System.Web.UI.HiddenFieldPageStatePersister.Load()</p>
<p>The problem seems to be with the ViewState. The ViewState is encrypted, and when an attempt is made to decrypt it on postback, the error is triggered.  The solution is actually quite simple: in the web.config file, set the ViewState not to be encrypted, like this:</p>
<div><span style="font-size:x-small;color:#0000ff;">&lt;system.web&gt;<br />
 &lt;pages viewStateEncryptionMode=&#8221;Never&#8221;&gt;<br />
 &lt;/pages&gt;<br />
&lt;/system.web&gt;</span></div>
<p><span style="font-size:x-small;color:#0000ff;"><span style="font-size:x-small;color:#0000ff;"> </span></p>
<p></span></p>
<p>OK, the error is no longer produced, but why is it there in the first place?  The page works perfectly well for some visitors, but not others &#8211; and that&#8217;s when the setup is exactly the same (Windows XP, IE 7) and the same requests are going to the server.  So what&#8217;s in the ViewState for different users that is creating the problem?  Still trying to find out&#8230;</p>
<p>As an addendum to this post one week on, I did work out why the encryption of the ViewState was a problem.  There was quite a lot of data being stored in the ViewState: above a certain length the ViewState decryption cuts off, and therefore the string doesn&#8217;t appear like a valid one for decryption.  You can solve this by splitting the ViewState into several sections using the MaxPageStateFieldLength in the pages tag in web.config &#8211; see this post for instance:</p>
<p><a href="http://weblogs.asp.net/lduveau/archive/2007/04/17/viewstate-chunking-in-asp-net-2-0-maxpagestatefieldlength.aspx">http://weblogs.asp.net/lduveau/archive/2007/04/17/viewstate-chunking-in-asp-net-2-0-maxpagestatefieldlength.aspx</a></p>
<p>Therefore, if you want to maintain encryption on your ViewState, that&#8217;s a slightly better solution for you. Personally, I&#8217;m not convinced it matters greatly since if someone wants to decrypt your ViewState, it is trivial enough to do anyhow (see here <a href="http://www.pluralsight.com/community/media/p/51688.aspx">http://www.pluralsight.com/community/media/p/51688.aspx</a> for instance).</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/delroger.wordpress.com/26/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/delroger.wordpress.com/26/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/delroger.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/delroger.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/delroger.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/delroger.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/delroger.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/delroger.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/delroger.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/delroger.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/delroger.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/delroger.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/delroger.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/delroger.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/delroger.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/delroger.wordpress.com/26/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=delroger.wordpress.com&amp;blog=2773214&amp;post=26&amp;subd=delroger&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://delroger.wordpress.com/2008/08/19/invalid-character-in-a-base-64-string-aspnet/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">delroger</media:title>
		</media:content>
	</item>
		<item>
		<title>Creating javascript alerts in ASP.NET with UpdatePanel (or without)</title>
		<link>http://delroger.wordpress.com/2008/08/06/creating-javascript-alerts-in-aspnet-with-updatepanel-or-without/</link>
		<comments>http://delroger.wordpress.com/2008/08/06/creating-javascript-alerts-in-aspnet-with-updatepanel-or-without/#comments</comments>
		<pubDate>Wed, 06 Aug 2008 20:33:33 +0000</pubDate>
		<dc:creator>delroger</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[ASP.NET 2.0]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[UpdatePanel]]></category>

		<guid isPermaLink="false">http://delroger.wordpress.com/?p=15</guid>
		<description><![CDATA[Just thought I&#8217;d share a couple of simple methods for creating javascript alert messages from an ASP.NET webpage, both when you are using AJAX (and an update panel) or just from a standard page. In a standard page, you can easily create an alert message in the code-behind like this:  ClientScript.RegisterClientScriptBlock(Me.GetType(), &#8220;yourkeyname&#8221;, &#8220;alert(&#8216;hello&#8217;);&#8221;, True) The parameters [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=delroger.wordpress.com&amp;blog=2773214&amp;post=15&amp;subd=delroger&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Just thought I&#8217;d share a couple of simple methods for creating javascript alert messages from an ASP.NET webpage, both when you are using AJAX (and an update panel) or just from a standard page.</p>
<p>In a standard page, you can easily create an alert message in the code-behind like this: </p>
<div><span style="font-size:x-small;">ClientScript.RegisterClientScriptBlock(Me.GetType(), &#8220;yourkeyname&#8221;, &#8220;alert(&#8216;hello&#8217;);&#8221;, True)</span></div>
<p>The parameters that are passed in are the System.Type (the Page type in this case), an arbitrary name for your script &#8216;key&#8217;, the javascript itself as a string, and a boolean indicating whether to add the script tags - i.e., &lt;script type=&#8221;javascript&#8221;&gt;&lt;/script&gt; - which you might as well use since it shortens the script itself.</p>
<p>Likewise, creating an alert when you are using an UpdatePanel is slightly different, but simpler than you might think &#8211; you just need to make sure the System.Type is the UpdatePanel type, and use the ScriptManager rather than the ClientScript like so:</p>
<p><span style="font-size:x-small;">ScriptManager.RegisterStartupScript(Me.UpdatePanel1, Me.UpdatePanel1.GetType(), &#8220;yourkeyname&#8221;, &#8220;alert(&#8216;hello&#8217;);&#8221;, True)</span></p>
<p>This is much the same as before except you are passing in the ID of your UpdatePanel along with the other parameters.</p>
<p>Now, since this is code that you are likely to want to re-use throughout an application, it makes sense to create a Class file for it with a couple of generic methods, like this:</p>
<p><span style="font-size:x-small;">Imports Microsoft.VisualBasic<br />
Imports System.Web<br />
Imports System.Web.UI<br />
Public Class Messages<br />
    Public Shared Sub CreateMessageAlertInUpdatePanel(ByVal up As UpdatePanel, ByVal strMessage As String)<br />
        Dim strScript As String = &#8220;alert(&#8216;&#8221; &amp; strMessage &amp; &#8220;&#8216;);&#8221;<br />
        Dim guidKey As Guid = Guid.NewGuid()<br />
        ScriptManager.RegisterStartupScript(up, up.GetType(), guidKey.ToString(), strScript, True)<br />
    End Sub<br />
    Public Shared Sub CreateMessageAlert(ByVal strMessage As String)<br />
        Dim guidKey As Guid = Guid.NewGuid()<br />
        Dim pg As Page = HttpContext.Current.Handler<br />
        Dim strScript As String = &#8220;alert(&#8216;&#8221; &amp; strMessage &amp; &#8220;&#8216;);&#8221;<br />
        pg.ClientScript.RegisterStartupScript(pg.GetType(), guidKey.ToString(), strScript, True)<br />
    End Sub<br />
End Class</span></p>
<p>(We&#8217;re just using the Guid for the script key to ensure a new key each time we create an alert)</p>
<p>And that&#8217;s it! You can now create alert messages from any of your webpages simply by using:</p>
<div><span style="font-size:x-small;">CreateMessageAlertInUpdatePanel(Me.UpdatePanel1, &#8220;hello&#8221;)</span></div>
<div>or</div>
<p><span style="font-size:x-small;">CreateMessageAlert(&#8220;hi&#8221;)</span></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/delroger.wordpress.com/15/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/delroger.wordpress.com/15/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/delroger.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/delroger.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/delroger.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/delroger.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/delroger.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/delroger.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/delroger.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/delroger.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/delroger.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/delroger.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/delroger.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/delroger.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/delroger.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/delroger.wordpress.com/15/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=delroger.wordpress.com&amp;blog=2773214&amp;post=15&amp;subd=delroger&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://delroger.wordpress.com/2008/08/06/creating-javascript-alerts-in-aspnet-with-updatepanel-or-without/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">delroger</media:title>
		</media:content>
	</item>
		<item>
		<title>Using the Clipboard to copy and paste files in ASP.NET</title>
		<link>http://delroger.wordpress.com/2008/07/31/using-the-clipboard-to-copy-and-paste-files-in-aspnet/</link>
		<comments>http://delroger.wordpress.com/2008/07/31/using-the-clipboard-to-copy-and-paste-files-in-aspnet/#comments</comments>
		<pubDate>Thu, 31 Jul 2008 21:27:21 +0000</pubDate>
		<dc:creator>delroger</dc:creator>
				<category><![CDATA[ASP.NET 2.0]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://delroger.wordpress.com/?p=13</guid>
		<description><![CDATA[Before I start, I must admit I&#8217;m not entirely convinced this is a particularly useful thing to try and do, since you can accomplish the same results using System.IO and the various File methods, but anyway&#8230; I guess I was trying to see if this was possible or not in a webpage, rather than in a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=delroger.wordpress.com&amp;blog=2773214&amp;post=13&amp;subd=delroger&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Before I start, I must admit I&#8217;m not entirely convinced this is a particularly useful thing to try and do, since you can accomplish the same results using System.IO and the various File methods, but anyway&#8230;</p>
<p>I guess I was trying to see if this was possible or not in a webpage, rather than in a Windows form &#8211; to copy a file (or files) to the server clipboard and then paste them in another location. So here&#8217;s how it&#8217;s done:</p>
<p>Let&#8217;s assume you have a Gridview where you have a list of files that the user can access, and they want to move them from one directory to another. They can tick a checkbox in each gridview row for the file, then click a button to &#8216;Copy Files&#8217; and another button to &#8216;Paste Files&#8217; to another directory.</p>
<p>In the code-behind, we have a Property set up called ClipboardFiles which uses a string array as its value, like this:</p>
<p>Property ClipboardFiles() As String()<br />
        Get<br />
            Dim o As Object = ViewState(&#8220;ClipboardFiles&#8221;)<br />
            If o Is Nothing Then<br />
                Return Nothing<br />
            Else<br />
                Return o<br />
            End If<br />
        End Get<br />
        Set(ByVal value As String())<br />
            ViewState(&#8220;ClipboardFiles&#8221;) = value<br />
        End Set<br />
    End Property</p>
<p>Now when the user clicks the button to Copy Files, all selected files are added to ClipboardFiles. Of course there are lots of ways you might get the names and paths of the files; in this case, I had a function that was returning an ArrayList (named &#8216;al&#8217; here) of the complete path and name of the files. I then cast the ArrayList to a string array and set the ClipboardFiles property like this:</p>
<p>Dim strFiles As String() = CType(al.ToArray(GetType(String)), String()) <br />
ClipboardFiles = strFiles</p>
<p>Here&#8217;s the tricky bit: when the user clicks the button to Paste Files, we have to use Threading and set the Apartment State of the thread. There is a sub called PasteFiles, which we will reference in the button click, like this:</p>
<p>(note: needs Imports System.Threading)</p>
<p>Protected Sub imgPasteFile_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles imgPasteFile.Click<br />
        Dim pasteThread As Thread = New Thread(New ThreadStart(AddressOf PasteFiles))<br />
        pasteThread.SetApartmentState(Threading.ApartmentState.STA)<br />
        pasteThread.Start()<br />
        pasteThread.Join()<br />
    End Sub</p>
<p>Finally, the PasteFiles sub looks like the code below. It copies the files listed in the ClipboardFiles to the Clipboard, then pastes them in a location of your choice (in this case &#8216;C:\Temp&#8217;, but you&#8217;d almost certainly set this programmatically).</p>
<p>(note: needs Imports System.Windows.Forms)</p>
<p>Private Sub PasteFiles()<br />
        &#8216;copy files to clipboard<br />
        If Not ClipboardFiles Is Nothing Then<br />
            Try<br />
                Clipboard.SetDataObject(New DataObject(DataFormats.FileDrop, ClipboardFiles))<br />
            Catch ex As Exception<br />
                &#8217;your error handler<br />
                Exit Sub<br />
            End Try<br />
        End If</p>
<p>        &#8216;paste to new location<br />
        Try<br />
            Dim iData As IDataObject = Clipboard.GetDataObject()<br />
            If iData.GetDataPresent(DataFormats.FileDrop) Then<br />
                Dim clipbrd As String() = DirectCast(iData.GetData(DataFormats.FileDrop), String())<br />
                For Each strFile As String In clipbrd<br />
                    System.IO.File.Copy(strFile, &#8220;C:\Temp\&#8221; &amp; System.IO.Path.GetFileName(strFile))<br />
                Next<br />
            End If<br />
        Catch ex As Exception<br />
            &#8216;your error handler<br />
        End Try<br />
       <br />
    End Sub</p>
<p>This code was put together from a few snippets I found here and there, including this:</p>
<p><a href="http://www.telerik.com/community/forums/thread/b311D-dcdga.aspx">http://www.telerik.com/community/forums/thread/b311D-dcdga.aspx</a></p>
<p>and this:</p>
<p><a href="http://bytes.com/forum/thread356140.html">http://bytes.com/forum/thread356140.html</a></p>
<p>Like I said, I&#8217;m not entirely sure how useful it really is, but it may give someone an idea about how to accomplish something similar using the Clipboard functionality. If so, glad to have helped&#8230;</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/delroger.wordpress.com/13/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/delroger.wordpress.com/13/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/delroger.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/delroger.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/delroger.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/delroger.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/delroger.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/delroger.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/delroger.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/delroger.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/delroger.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/delroger.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/delroger.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/delroger.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/delroger.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/delroger.wordpress.com/13/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=delroger.wordpress.com&amp;blog=2773214&amp;post=13&amp;subd=delroger&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://delroger.wordpress.com/2008/07/31/using-the-clipboard-to-copy-and-paste-files-in-aspnet/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">delroger</media:title>
		</media:content>
	</item>
		<item>
		<title>Postback occurring after Cancel clicked</title>
		<link>http://delroger.wordpress.com/2008/07/30/postback-occurring-after-cancel-clicked/</link>
		<comments>http://delroger.wordpress.com/2008/07/30/postback-occurring-after-cancel-clicked/#comments</comments>
		<pubDate>Wed, 30 Jul 2008 22:06:16 +0000</pubDate>
		<dc:creator>delroger</dc:creator>
				<category><![CDATA[ASP.NET 2.0]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://delroger.wordpress.com/?p=10</guid>
		<description><![CDATA[It&#8217;s quite common to use a Javascript function when you want a website user to confirm that they want to delete a file (for instance) or a database record. In ASP.NET, you would add code to OnClientClick for a button (for example), along the lines of: return confirm(&#8216;Are you sure?&#8217;); This can also be done in the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=delroger.wordpress.com&amp;blog=2773214&amp;post=10&amp;subd=delroger&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s quite common to use a Javascript function when you want a website user to confirm that they want to delete a file (for instance) or a database record. In ASP.NET, you would add code to OnClientClick for a button (for example), along the lines of:</p>
<p>return confirm(&#8216;Are you sure?&#8217;);</p>
<p>This can also be done in the code-behind under Page_Load or Page_PreRender as buttonname.Attributes.Add(&#8220;onclick&#8221;,&#8221;return confirm(&#8216;Are you sure?&#8217;)&#8221;)</p>
<p>Similarly, you can also call a javascript function that does much the same thing, such as:</p>
<p>function confirm_delete()<br />
    {<br />
        if (confirm(&#8220;Are you sure?&#8221;)==true)<br />
            return true;<br />
        else<br />
            return false;<br />
    }</p>
<p>&#8230;and use:</p>
<p> return confirm_delete(); </p>
<p>for the onclick/onclientclick.</p>
<p>This would appear in the actual webpage as an OnClick event for the button. When the button is clicked, the user would see a javascript confirm window, with &#8216;Are you sure?&#8217; and an OK and a Cancel button. Clicking OK would continue to process any code for the button; clicking Cancel would stop further processing.</p>
<p>It&#8217;s also common to find a lot of people have problems with this not working, and in the majority of cases it is because a javascript function is called that returns true or false, but the &#8216;return&#8217; is missing. Using the example above, if you simply said</p>
<p>confirm(&#8216;Are you sure?&#8217;); or confirm_delete();</p>
<p>without the &#8216;return&#8217;, the page would still postback, whatever had been clicked.</p>
<p>Today, I found that even with the &#8216;return&#8217;, postback was still occurring on a webpage I had created; in this case, a file delete still took place even when I clicked the &#8216;Cancel&#8217; button and a value of false was being returned. </p>
<p>So, just in case anyone else finds the same thing, this may well be a bug in Internet Explorer 7 (though I have not yet had chance to check this). The solution is to add some extra code to the return confirm, like this:</p>
<p>if (confirm(&#8216;Are you sure?&#8217;) == false) {event.returnValue=false; return false; }else{ return true;};</p>
<p>It seems as though we have to specifically set the event.returnValue to be false to prevent further processing and postback.  This took me a few hours to work out, so hopefully this solution may save someone from wasting a similar amount of time, because it doesn&#8217;t seem to be very well documented so far.  And if it does help you, please leave a message and say &#8216;hi&#8217;!</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/delroger.wordpress.com/10/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/delroger.wordpress.com/10/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/delroger.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/delroger.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/delroger.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/delroger.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/delroger.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/delroger.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/delroger.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/delroger.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/delroger.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/delroger.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/delroger.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/delroger.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/delroger.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/delroger.wordpress.com/10/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=delroger.wordpress.com&amp;blog=2773214&amp;post=10&amp;subd=delroger&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://delroger.wordpress.com/2008/07/30/postback-occurring-after-cancel-clicked/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">delroger</media:title>
		</media:content>
	</item>
		<item>
		<title>Referencing page from Class file in App_Code</title>
		<link>http://delroger.wordpress.com/2008/07/07/referencing-page-from-class-file-in-app_code/</link>
		<comments>http://delroger.wordpress.com/2008/07/07/referencing-page-from-class-file-in-app_code/#comments</comments>
		<pubDate>Mon, 07 Jul 2008 13:02:00 +0000</pubDate>
		<dc:creator>delroger</dc:creator>
				<category><![CDATA[ASP.NET 2.0]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://delroger.wordpress.com/?p=9</guid>
		<description><![CDATA[If you need to reference the Page control from a Class file (for instance, for adding a ClientScript) without passing the Page instance as a parameter to a Function or Sub, you can use the following:  Dim pg As Page = HttpContext.Current.Handler  You can then use this instance just as you would in the code-behind of the page [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=delroger.wordpress.com&amp;blog=2773214&amp;post=9&amp;subd=delroger&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you need to reference the Page control from a Class file (for instance, for adding a ClientScript) without passing the Page instance as a parameter to a Function or Sub, you can use the following: </p>
<p><span style="font-size:x-small;color:#0000ff;"><span style="font-size:x-small;color:#0000ff;">Dim </span></span><span style="font-size:x-small;">pg </span><span style="font-size:x-small;color:#0000ff;">As </span><span style="font-size:x-small;">Page = HttpContext.Current.Handler</span> </p>
<p><span style="font-size:x-small;">You can then use this instance just as you would in the code-behind of the page itself.</span></p>
<p><span style="font-size:x-small;">For instance, I use this code to create Javascript alerts on my webpages:</span></p>
<p>Public Shared Sub CreateMessageAlert(ByRef clientScript As System.Web.UI.ClientScriptManager, ByVal strMessage As String, ByVal strKey As String)<br />
 Dim context As HttpContext = HttpContext.Current<br />
 Dim strScript As String = &#8220;&#8221;<br />
 If (Not clientScript.IsStartupScriptRegistered(strKey)) Then<br />
clientScript.RegisterStartupScript(context.GetType(), strKey, strScript)<br />
 End If<br />
End Sub</p>
<p>(This code was based on some found elsewhere &#8211; apologies for not referencing exactly where, since there are a few examples floating around and I don&#8217;t remember where I first saw it!)</p>
<p>From a Class file in the App_Code folder, this could then be called like so:</p>
<p>Dim newGuid As Guid = Guid.NewGuid()<br />
Dim pg As Page = HttpContext.Current.Handler<br />
CreateMessageAlert(pg.ClientScript, &#8220;Your message here&#8221;, newGuid.ToString())</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/delroger.wordpress.com/9/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/delroger.wordpress.com/9/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/delroger.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/delroger.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/delroger.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/delroger.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/delroger.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/delroger.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/delroger.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/delroger.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/delroger.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/delroger.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/delroger.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/delroger.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/delroger.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/delroger.wordpress.com/9/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=delroger.wordpress.com&amp;blog=2773214&amp;post=9&amp;subd=delroger&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://delroger.wordpress.com/2008/07/07/referencing-page-from-class-file-in-app_code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">delroger</media:title>
		</media:content>
	</item>
		<item>
		<title>Button event firing twice in ASP.NET</title>
		<link>http://delroger.wordpress.com/2008/07/07/button-event-firing-twice-in-aspnet/</link>
		<comments>http://delroger.wordpress.com/2008/07/07/button-event-firing-twice-in-aspnet/#comments</comments>
		<pubDate>Mon, 07 Jul 2008 12:42:32 +0000</pubDate>
		<dc:creator>delroger</dc:creator>
				<category><![CDATA[ASP.NET 2.0]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://delroger.wordpress.com/?p=8</guid>
		<description><![CDATA[I&#8217;d got a File Upload control on one of my webpages which was causing a strange problem: when a user clicked the button to upload a file, the button&#8217;s click event was firing twice, so the file uploaded twice and a database insert query happened twice. I&#8217;d initially thought that the Page_Load event was occurring twice, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=delroger.wordpress.com&amp;blog=2773214&amp;post=8&amp;subd=delroger&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;d got a File Upload control on one of my webpages which was causing a strange problem: when a user clicked the button to upload a file, the button&#8217;s click event was firing twice, so the file uploaded twice and a database insert query happened twice.</p>
<p>I&#8217;d initially thought that the Page_Load event was occurring twice, since this is quite well documented if, for instance, you have &lt;img src=&#8221;#&#8221;&gt;.  Debugging the code demonstrated that this was not happening; the Page_Load only fired once, while the <span style="font-size:x-small;">btnUpload_Click fired twice.</span></p>
<p><span style="font-size:x-small;">The problem turned out to be that the code for my button was as follows:</span></p>
<p><span style="font-size:x-small;"><span style="font-size:x-small;color:#0000ff;"><span style="font-size:x-small;color:#0000ff;">&lt;</span></span><span style="font-size:x-small;color:#a31515;">asp</span><span style="font-size:x-small;color:#0000ff;">:</span><span style="font-size:x-small;color:#a31515;">Button</span><span style="font-size:x-small;"> </span><span style="font-size:x-small;color:#ff0000;">ID</span><span style="font-size:x-small;color:#0000ff;">=&#8221;btnUpload&#8221;</span><span style="font-size:x-small;"> </span><span style="font-size:x-small;color:#ff0000;">runat</span><span style="font-size:x-small;color:#0000ff;">=&#8221;server&#8221;</span><span style="font-size:x-small;"> </span><span style="font-size:x-small;color:#ff0000;">OnClick</span><span style="font-size:x-small;color:#0000ff;">=&#8221;btnUpload_Click&#8221;</span><span style="font-size:x-small;"> </span><span style="font-size:x-small;color:#ff0000;">Text</span><span style="font-size:x-small;color:#0000ff;">=&#8221;Upload File&#8221;</span><span style="font-size:x-small;"> </span><span style="font-size:x-small;color:#0000ff;">/&gt;</span><br />
</span></p>
<p> There are essentially two events for the button: both runat=&#8221;server&#8221; and OnClick fire the same event, hence everything happening twice.  The solution is simply to remove the OnClick command. </p>
<p>But why was this happening in the first place? I think it is because I originally had an AJAX UpdatePanel on the page and the control had been part of that initially: the OnClick was created when the File Upload control was dragged into the UpdatePanel; after removing the UpdatePanel, the OnClick still remained.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/delroger.wordpress.com/8/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/delroger.wordpress.com/8/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/delroger.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/delroger.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/delroger.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/delroger.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/delroger.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/delroger.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/delroger.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/delroger.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/delroger.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/delroger.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/delroger.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/delroger.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/delroger.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/delroger.wordpress.com/8/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=delroger.wordpress.com&amp;blog=2773214&amp;post=8&amp;subd=delroger&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://delroger.wordpress.com/2008/07/07/button-event-firing-twice-in-aspnet/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">delroger</media:title>
		</media:content>
	</item>
		<item>
		<title>Ajax, an update panel and opening a new window</title>
		<link>http://delroger.wordpress.com/2008/03/26/ajax-an-update-panel-and-opening-a-new-window/</link>
		<comments>http://delroger.wordpress.com/2008/03/26/ajax-an-update-panel-and-opening-a-new-window/#comments</comments>
		<pubDate>Wed, 26 Mar 2008 13:51:07 +0000</pubDate>
		<dc:creator>delroger</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[ASP.NET 2.0]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[UpdatePanel]]></category>

		<guid isPermaLink="false">http://delroger.wordpress.com/?p=6</guid>
		<description><![CDATA[Since this post is getting quite a few views, just thought I&#8217;d add a quick summary of this article if you don&#8217;t want to read it all. So here you go: if you want to open a new window from the code-behind page when your function or sub is being called from an AJAX Update [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=delroger.wordpress.com&amp;blog=2773214&amp;post=6&amp;subd=delroger&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Since this post is getting quite a few views, just thought I&#8217;d add a quick summary of this article if you don&#8217;t want to read it all. So here you go: if you want to open a new window from the code-behind page when your function or sub is being called from an AJAX Update Panel, you can do it like this (here your Update Panel is called UpdatePanel1 and you&#8217;re opening a PDF)&#8230;</p>
<p><code>ScriptManager.RegisterClientScriptBlock(Me.UpdatePanel1, Me.UpdatePanel1.GetType(), "AnyScriptNameYouLike", "window.open('http://www.yourwebsite.com/YourFolder/YourDocumentOrWebpage.pdf');", True)</code></p>
<p>And here&#8217;s the rest of the original post&#8230;</p>
<p>I recently found a problem when using an Ajax Update Panel when I wanted to open a PDF document from the code-behind page.  Without the Ajax, I could simply have added a Response.Write with a javascript window.open function, or I could have used a Literal and written the javascript in much the same way, like this:</p>
<p><code>Response.Write("&lt;script language='javascript'&gt; window.open('http://website/folder/newdocument.pdf'); &lt;/script&gt;")</code></p>
<p>or this (assuming a Literal control called ltlOpenPdf):</p>
<p><code>ltlOpenPdf.Text = "&lt;script language=""javascript""&gt;window.open('http://website/folder/newdocument.pdf');&lt;/script&gt;"</code></p>
<p>However, the Response.Write is forbidden in Ajax and produces an error, while the Literal apparently did nothing at all.</p>
<p>Finally I worked out that I could open the new document by using a RegisterClientScriptBlock, most importantly passing the Update Panel as the first parameter where the Page is expected, and the Update Panel&#8217;s type as the second parameter, as you will see below.</p>
<p>The Update Panel is called UpdatePanel1. A new PDF has been created and saved to a folder called &#8216;pdffolder&#8217; and the name of the PDF is dynamically created. The root of the website is also being added dynamically so that it will work equally on the development and the production server. (In reality, the name of the folder that contains the PDFs is also dynamically set, captured from the web.config file using System.Configuration.ConfigurationManager.AppSettings)</p>
<p><code>Dim docGuid As String = Guid.NewGuid().ToString()</code><br />
<code>'Do pdf creation stuff here...</code><br />
<code>Dim sb As StringBuilder = New StringBuilder("")</code><br />
<code>Dim strRoot As String</code><br />
<code>strRoot = Request.Url.GetLeftPart(UriPartial.Authority)</code><br />
<code>sb.Append("window.open('" + strRoot + "/pdffolder/" + docGuid + ".pdf" + "');")</code><br />
<code>ScriptManager.RegisterClientScriptBlock(Me.UpdatePanel1, Me.UpdatePanel1.GetType(), "NewClientScript", sb.ToString(), True)</code></p>
<p>The only thing to watch out for with this is that it may be classified as a popup by some blockers and prevented from opening, but then that&#8217;s almost inevitable with a window created in code.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/delroger.wordpress.com/6/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/delroger.wordpress.com/6/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/delroger.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/delroger.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/delroger.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/delroger.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/delroger.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/delroger.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/delroger.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/delroger.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/delroger.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/delroger.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/delroger.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/delroger.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/delroger.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/delroger.wordpress.com/6/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=delroger.wordpress.com&amp;blog=2773214&amp;post=6&amp;subd=delroger&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://delroger.wordpress.com/2008/03/26/ajax-an-update-panel-and-opening-a-new-window/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">delroger</media:title>
		</media:content>
	</item>
		<item>
		<title>Monitor mandatory text fields in ASP.NET 2.0</title>
		<link>http://delroger.wordpress.com/2008/02/06/hello-world/</link>
		<comments>http://delroger.wordpress.com/2008/02/06/hello-world/#comments</comments>
		<pubDate>Wed, 06 Feb 2008 13:19:21 +0000</pubDate>
		<dc:creator>delroger</dc:creator>
				<category><![CDATA[ASP.NET 2.0]]></category>
		<category><![CDATA[.NET 2.0]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[I wanted to create an easy way to programmatically monitor textfields in a webpage form and highlight them if they were empty, not to force input or disallow saves and updates, but just to highlight for the website user that the field needed to be filled in eventually. First, an acknowledgement: I&#8217;d been using the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=delroger.wordpress.com&amp;blog=2773214&amp;post=1&amp;subd=delroger&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I wanted to create an easy way to programmatically monitor textfields in a webpage form and highlight them if they were empty, not to force input or disallow saves and updates, but just to highlight for the website user that the field needed to be filled in eventually.</p>
<p>First, an acknowledgement: I&#8217;d been using the &#8216;ClientSidePage&#8217; method for checking &#8216;dirty&#8217; data from <a href="http://aspnet.4guysfromrolla.com/articles/101304-1.aspx">here</a> and decided to use similar techniques.</p>
<p>The ClientSidePage inherits from the System.Web.UI.Page base class; your webpages then need to inherit from the ClientSidePage class.</p>
<p>The class has two protected strings, which set the colours for highlighting textfields or reverting to the normal background colour. In this case, I&#8217;m using a lovely pinkish colour for highlighting, reverting to white if text is entered in the textbox.</p>
<p><code>Protected HighlightedColour As String = "#f8e0e0"</code><br />
<code>Protected NormalColour As String = "white"</code></p>
<p>The class contains a Public Sub called WatchForEmpties that takes a web control as a parameter and adds attributes for onkeyup and onfocus. Both onkeyup and onfocus invoke a javascript called HighlightIfEmpty, which passes the control as a parameter.</p>
<p>The control is added to an array of all the controls on the page that are being monitored. Finally, javascripts are registered for highlighting the empty textboxes and for setting the initial colours for all textboxes that are part of the array of controls.</p>
<p>The class file now looks like this:</p>
<p><code>Imports Microsoft.VisualBasic<br />
</code><br />
<code>Public Class MonitoringPage</code><br />
<code>Inherits System.Web.UI.Page</code><br />
<code>Protected HighlightedColour As String = "#f8e0e0"</code><br />
<code>Protected NormalColour As String = "white"</code></p>
<p><code>Public Sub WatchForEmpties(ByVal wc As WebControl)</code><br />
<code>  If wc Is Nothing Then Exit Sub</code><br />
<code>  Dim strFocus As String = wc.Attributes("onfocus")</code><br />
<code>  If Not strFocus Is Nothing Then</code><br />
<code>    wc.Attributes("onfocus") = strFocus &amp; "HighlightIfEmpty(this);"</code><br />
<code>  Else</code><br />
<code>    wc.Attributes("onfocus") = "javascript:HighlightIfEmpty(this);"</code><br />
<code>  End If</code><br />
<code>  Dim strKeyup As String = wc.Attributes("onkeyup")</code><br />
<code>  If Not strKeyup Is Nothing Then</code><br />
<code>    wc.Attributes("onkeyup") = strKeyup &amp; "HighlightIfEmpty(this);"</code><br />
<code>  Else</code><br />
<code>    wc.Attributes("onkeyup") = "javascript:HighlightIfEmpty(this);"</code><br />
<code>  End If</code><br />
<code>  Page.ClientScript.RegisterArrayDeclaration("WatchForEmptiesIDs", """" &amp; wc.ClientID &amp; """")</code><br />
<code>  WatchForEmptiesOnPageLoad()</code><br />
<code>End Sub</code></p>
<p><code>Private Sub WatchForEmptiesOnPageLoad()</code><br />
<code>  If Not Page.ClientScript.IsStartupScriptRegistered("HighlightIfEmptyScript") Then</code><br />
<code>  Dim t As Type</code><br />
<code>  t = Me.GetType()</code><br />
<code>  Page.ClientScript.RegisterStartupScript(t, "HighlightIfEmptyScript", _</code><br />
<code>  "&lt;script language=""JavaScript""&gt;" &amp; Environment.NewLine &amp; _</code><br />
<code>  " HighlightIfEmpty(Object);" &amp; Environment.NewLine &amp; _</code><br />
<code>  "&lt;/script&gt;")</code></p>
<p><code>  Page.ClientScript.RegisterClientScriptBlock(t, "HighlightIfEmptyFunction", _</code><br />
<code>  "&lt;script language=""JavaScript"""&gt;" &amp; Environment.NewLine &amp; _</code><br />
<code>  " function HighlightIfEmpty(Object) " &amp; Environment.NewLine &amp; _</code><br />
<code>  "   { " &amp; Environment.NewLine &amp; _</code><br />
<code>  "     if (Object) " &amp; Environment.NewLine &amp; _</code><br />
<code>  "     { " &amp; Environment.NewLine &amp; _</code><br />
<code>  "       var re = /\s/g; " &amp; Environment.NewLine &amp; _</code><br />
<code>  "       RegExp.multiline = true; " &amp; Environment.NewLine &amp; _</code><br />
<code>  "       var str;" &amp; Environment.NewLine &amp; _</code><br />
<code>  "       if (Object.value == null) " &amp; Environment.NewLine &amp; _</code><br />
<code>  "       { " &amp; Environment.NewLine &amp; _</code><br />
<code>  "       } " &amp; Environment.NewLine &amp; _</code><br />
<code>  "       else " &amp; Environment.NewLine &amp; _</code><br />
<code>  "       { " &amp; Environment.NewLine &amp; _</code><br />
<code>  "         if (Object.value.length &gt; 0) " &amp; Environment.NewLine &amp; _</code><br />
<code>  "         { " &amp; Environment.NewLine &amp; _</code><br />
<code>  "           str = Object.value.replace(re, '');" &amp; Environment.NewLine &amp; _</code><br />
<code>  "         } " &amp; Environment.NewLine &amp; _</code><br />
<code>  "         else " &amp; Environment.NewLine &amp; _</code><br />
<code>  "         { " &amp; Environment.NewLine &amp; _</code><br />
<code>  "           str = '';" &amp; Environment.NewLine &amp; _</code><br />
<code>  "         } " &amp; Environment.NewLine &amp; _</code><br />
<code>  "         if (str.length &gt; 0) " &amp; Environment.NewLine &amp; _</code><br />
<code>  "         { " &amp; Environment.NewLine &amp; _</code><br />
<code>  "           return Object.style.backgroundColor = '" &amp; NormalColour &amp; "'; " &amp; Environment.NewLine &amp; _</code><br />
<code>  "         } " &amp; Environment.NewLine &amp; _</code><br />
<code>  "         else " &amp; Environment.NewLine &amp; _</code><br />
<code>  "         { " &amp; Environment.NewLine &amp; _</code><br />
<code>  "           return Object.style.backgroundColor = '" &amp; HighlightedColour &amp; "'; " &amp; Environment.NewLine &amp; _</code><br />
<code>  "         } " &amp; Environment.NewLine &amp; _</code><br />
<code>  "       } " &amp; Environment.NewLine &amp; _</code><br />
<code>  "     } " &amp; Environment.NewLine &amp; _</code><br />
<code>  "   } " &amp; Environment.NewLine &amp; _</code><br />
<code>  "&lt;/script&gt;")</code><br />
<code>  End If</code></p>
<p><code>  If Not Page.ClientScript.IsStartupScriptRegistered("WatchForEmptiesAssignment") Then</code><br />
<code>    Dim t As Type</code><br />
<code>    t = Me.GetType() '? typeOf(Page)</code><br />
<code>    Page.ClientScript.RegisterStartupScript(t, "WatchForEmptiesAssignment", _</code><br />
<code>    "  &lt;script language=""JavaScript""&gt;" &amp; Environment.NewLine &amp; _</code><br />
<code>    "   SetColoursForEmptyBoxes();" &amp; Environment.NewLine &amp; _</code><br />
<code>    "  &lt;/script&gt;")</code></p>
<p><code>    Page.ClientScript.RegisterClientScriptBlock(t, "WatchForEmptiesAssignmentFunction", _</code><br />
<code>    "  &lt;script language=""JavaScript""&gt;" &amp; Environment.NewLine &amp; _</code><br />
<code>    "   function SetColoursForEmptyBoxes() { " &amp; Environment.NewLine &amp; _</code><br />
<code>    "     for (var i = 0; i &lt; WatchForEmptiesIDs.length; i++) {" &amp; Environment.NewLine &amp; _</code><br />
<code>    "     var elem = document.getElementById(WatchForEmptiesIDs[i]);" &amp; Environment.NewLine &amp; _</code><br />
<code>    "     HighlightIfEmpty(elem); " &amp; Environment.NewLine &amp; _</code><br />
<code>    "     }" &amp; Environment.NewLine &amp; _</code><br />
<code>    "   }" &amp; Environment.NewLine &amp; _</code><br />
<code>    "&lt;/script&gt;")</code><br />
<code>  End If</code><br />
<code>End Sub</code></p>
<p><code>End Class</code></p>
<p>If you want to use the monitoring functions in your webpages, they need to inherit this class rather than System.Web.UI.Page</p>
<p>So, in your code-behind page, instead of:</p>
<p><code>Partial Class Default</code><br />
<code>  Inherits System.Web.UI.Page</code><br />
<code>...</code><br />
<code>End Class</code></p>
<p>you should have:</p>
<p><code>Partial Class Default</code><br />
<code>  Inherits MonitoringPage</code><br />
<code>...</code><br />
<code>End Class</code></p>
<p>To then monitor a textbox that needs to have input, you just need to have a page prerender sub that calls WatchForEmpties, passing in the name of the textbox, like this:</p>
<p><code>Protected Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender</code><br />
<code>  WatchForEmpties(Me.Textbox1)</code><br />
<code>End Sub</code></p>
<p>When the box has an empty string or no text, it will be highlighted. If any text is present, the box will revert back to a white background.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/delroger.wordpress.com/1/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/delroger.wordpress.com/1/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/delroger.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/delroger.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/delroger.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/delroger.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/delroger.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/delroger.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/delroger.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/delroger.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/delroger.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/delroger.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/delroger.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/delroger.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/delroger.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/delroger.wordpress.com/1/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=delroger.wordpress.com&amp;blog=2773214&amp;post=1&amp;subd=delroger&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://delroger.wordpress.com/2008/02/06/hello-world/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">delroger</media:title>
		</media:content>
	</item>
	</channel>
</rss>
