<?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>Stephen Lacy &#187; Programming</title>
	<atom:link href="http://www.lacy.ie/category/programming/feed" rel="self" type="application/rss+xml" />
	<link>http://www.lacy.ie</link>
	<description>Impressions as an ASP.Net Developer</description>
	<lastBuildDate>Mon, 05 Jul 2010 09:26:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Changing the cursor using javascript in chrome without the mouse moving</title>
		<link>http://www.lacy.ie/changing-the-cursor-using-javascript-in-chrome-without-the-mouse-moving</link>
		<comments>http://www.lacy.ie/changing-the-cursor-using-javascript-in-chrome-without-the-mouse-moving#comments</comments>
		<pubDate>Fri, 21 May 2010 10:52:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.lacy.ie/?p=290</guid>
		<description><![CDATA[I had a DIV html element absolute positioned, transparent and with an astronomical z-index. Whenever I want to show that the web page is contacting the server and that the user should be patient I would change the css display value to the default and the cursor to progress. This stopped the user from causing [...]


Related posts:<ol><li><a href='http://www.lacy.ie/cant-register-javascript-for-invisible-control' rel='bookmark' title='Permanent Link: Can&#039;t Register Javascript for Invisible Control'>Can&#039;t Register Javascript for Invisible Control</a> <small>I was writing an ASP.Net Dialog Control and I overwrote...</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>I had a DIV html element absolute positioned, transparent and with an astronomical z-index.</p>
<p>Whenever I want to show that the web page is contacting the server and that the user should be patient I would change the css display value to the default and the cursor to progress. This stopped the user from causing other server requests like clicking on the same button multiple times while also giving them a sense that the application is working.</p>
<p>However in while in IE and firefox once I set display to none and the cursor back to the default the progress cursor would disappear, in chrome the progress cursor would remain until the cursor was moved by the user. This meant that the user might not be aware that the webpage request was complete and possibly eventually think that the application had crashed.</p>
<p>The solution was simple, change the z-index to -1 when the request was complete and chrome would behave as the other browsers had done previously.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.lacy.ie%2Fchanging-the-cursor-using-javascript-in-chrome-without-the-mouse-moving&amp;linkname=Changing%20the%20cursor%20using%20javascript%20in%20chrome%20without%20the%20mouse%20moving"><img src="http://www.lacy.ie/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>

<p>Related posts:<ol><li><a href='http://www.lacy.ie/cant-register-javascript-for-invisible-control' rel='bookmark' title='Permanent Link: Can&#039;t Register Javascript for Invisible Control'>Can&#039;t Register Javascript for Invisible Control</a> <small>I was writing an ASP.Net Dialog Control and I overwrote...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.lacy.ie/changing-the-cursor-using-javascript-in-chrome-without-the-mouse-moving/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery Context Menu appears off screen issue</title>
		<link>http://www.lacy.ie/jquery-context-menu-appears-off-screen-issue</link>
		<comments>http://www.lacy.ie/jquery-context-menu-appears-off-screen-issue#comments</comments>
		<pubDate>Tue, 18 May 2010 10:41:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[JQuery]]></category>

		<guid isPermaLink="false">http://www.lacy.ie/?p=286</guid>
		<description><![CDATA[jQuery Context Menu is available here: http://abeautifulsite.net/2008/09/jquery-context-menu-plugin/ It&#8217;s a fantastic jQuery plugin that replicates most of the features that you&#8217;ll expect from any windows context menu. A feature that I noticed was missing was what happens when you right click on the right and bottom edges of the screen. On windows the context menu appears [...]


Related posts:<ol><li><a href='http://www.lacy.ie/handling-relative-paths-and-debug-mode-with-jquery-in-asp-net-web-forms' rel='bookmark' title='Permanent Link: Handling Relative Paths and debug mode with Jquery in ASP.Net Web Forms'>Handling Relative Paths and debug mode with Jquery in ASP.Net Web Forms</a> <small>I had a problem where I wanted to use the...</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>jQuery Context Menu is available here: <a href="http://abeautifulsite.net/2008/09/jquery-context-menu-plugin/">http://abeautifulsite.net/2008/09/jquery-context-menu-plugin/</a></p>
<p>It&#8217;s a fantastic jQuery plugin that replicates most of the features that you&#8217;ll expect from any windows context menu.</p>
<p>A feature that I noticed was missing was what happens when you right click on the right and bottom edges of the screen. On windows the context menu appears to the left or above your cursor respectively, with the jQuery context menu plugin it appears off screen. Not exactly a big deal but here is the solution:</p>
<p><span id="more-286"></span></p>
<p>Open jquery.contextMenu.js  and after</p>
<blockquote>
<div id="_mcePaste">(e.pageX) ? x = e.pageX : x = e.clientX + d.scrollLeft;</div>
<div id="_mcePaste">(e.pageY) ? y = e.pageY : <strong>y</strong> = e.clientY + d.scrollTop;</div>
</blockquote>
<p>copy and paste in the following</p>
<blockquote>
<div id="_mcePaste">
<div id="_mcePaste">if (y + $(menu).outerHeight() &gt; d.pageYOffset + $(document.body).innerHeight()) {</div>
<div id="_mcePaste">y = y &#8211; $(menu).outerHeight()</div>
<div id="_mcePaste">}</div>
<div id="_mcePaste">if (x + $(menu).outerWidth() &gt; d.pageXOffset + $(document.body).innerWidth()) {</div>
<div id="_mcePaste">x = x &#8211; $(menu).outerWidth()</div>
<div id="_mcePaste">}</div>
</div>
</blockquote>
<p>And that&#8217;s it, you&#8217;re done.</p>
<p>In your version you may have an &#8216;x&#8217; where I have a &#8216;y&#8217; in bold. It may be worth replacing that. I haven&#8217;t investigated it fully but it makes more sense that way.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.lacy.ie%2Fjquery-context-menu-appears-off-screen-issue&amp;linkname=jQuery%20Context%20Menu%20appears%20off%20screen%20issue"><img src="http://www.lacy.ie/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>

<p>Related posts:<ol><li><a href='http://www.lacy.ie/handling-relative-paths-and-debug-mode-with-jquery-in-asp-net-web-forms' rel='bookmark' title='Permanent Link: Handling Relative Paths and debug mode with Jquery in ASP.Net Web Forms'>Handling Relative Paths and debug mode with Jquery in ASP.Net Web Forms</a> <small>I had a problem where I wanted to use the...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.lacy.ie/jquery-context-menu-appears-off-screen-issue/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Default Button in asp.net forms</title>
		<link>http://www.lacy.ie/default-button-in-asp-net-forms</link>
		<comments>http://www.lacy.ie/default-button-in-asp-net-forms#comments</comments>
		<pubDate>Mon, 17 May 2010 12:47:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[ASP.Net Webforms]]></category>

		<guid isPermaLink="false">http://www.lacy.ie/?p=284</guid>
		<description><![CDATA[Taken from http://www.metabuilders.com/Tools/DefaultButtons.aspx Often in asp.net WebForms you have multiple buttons with a number of textboxes and other form controls making it difficult for the web browser to determine what should happen when a user clicks enter. Thankfully in asp.net 2 the panel and form controls have a default button property making it so that [...]


Related posts:<ol><li><a href='http://www.lacy.ie/official-jqgrid-asp-net-web-forms-control-alpha-demo' rel='bookmark' title='Permanent Link: Official JqGrid ASP.Net Web Forms Control Alpha Demo'>Official JqGrid ASP.Net Web Forms Control Alpha Demo</a> <small>First look at the official JqGrid ASP.Net Web Forms control...</small></li>
<li><a href='http://www.lacy.ie/updating-designer-cs-asp-web-application' rel='bookmark' title='Permanent Link: Updating designer.cs in an ASP.Net Web Application'>Updating designer.cs in an ASP.Net Web Application</a> <small>If the controls on your designer.cs are out of sync...</small></li>
<li><a href='http://www.lacy.ie/jquery-grid-plugin-jqgrid-with-asp-net-web-forms' rel='bookmark' title='Permanent Link: jQuery Grid Plugin (JqGrid) with ASP.Net Web Forms'>jQuery Grid Plugin (JqGrid) with ASP.Net Web Forms</a> <small>Get JqGrid here: http://www.trirand.com/blog/ So far I&#8217;ve seen two implementations...</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Taken from <a href="http://www.metabuilders.com/Tools/DefaultButtons.aspx">http://www.metabuilders.com/Tools/DefaultButtons.aspx</a></p>
<p>Often in asp.net WebForms you have multiple buttons with a number of textboxes and other form controls making it difficult for the web browser to determine what should happen when a user clicks enter.</p>
<p>Thankfully in asp.net 2 the panel and form controls have a default button property making it so that the enter key for all form controls contained within the panel or form control triggers the default button specified.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.lacy.ie%2Fdefault-button-in-asp-net-forms&amp;linkname=Default%20Button%20in%20asp.net%20forms"><img src="http://www.lacy.ie/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>

<p>Related posts:<ol><li><a href='http://www.lacy.ie/official-jqgrid-asp-net-web-forms-control-alpha-demo' rel='bookmark' title='Permanent Link: Official JqGrid ASP.Net Web Forms Control Alpha Demo'>Official JqGrid ASP.Net Web Forms Control Alpha Demo</a> <small>First look at the official JqGrid ASP.Net Web Forms control...</small></li>
<li><a href='http://www.lacy.ie/updating-designer-cs-asp-web-application' rel='bookmark' title='Permanent Link: Updating designer.cs in an ASP.Net Web Application'>Updating designer.cs in an ASP.Net Web Application</a> <small>If the controls on your designer.cs are out of sync...</small></li>
<li><a href='http://www.lacy.ie/jquery-grid-plugin-jqgrid-with-asp-net-web-forms' rel='bookmark' title='Permanent Link: jQuery Grid Plugin (JqGrid) with ASP.Net Web Forms'>jQuery Grid Plugin (JqGrid) with ASP.Net Web Forms</a> <small>Get JqGrid here: http://www.trirand.com/blog/ So far I&#8217;ve seen two implementations...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.lacy.ie/default-button-in-asp-net-forms/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Updating Redirection using Strong Types to .Net 4</title>
		<link>http://www.lacy.ie/updating-redirection-using-strong-types-to-net-4</link>
		<comments>http://www.lacy.ie/updating-redirection-using-strong-types-to-net-4#comments</comments>
		<pubDate>Sat, 17 Apr 2010 19:40:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[ASP.Net 4]]></category>
		<category><![CDATA[ASP.Net Webforms]]></category>

		<guid isPermaLink="false">http://www.lacy.ie/?p=276</guid>
		<description><![CDATA[I wrote previously how to handle redirecting to other pages in an asp.net Web Forms application using the page&#8217;s type which allows you to move pages around in your site without having to worry about dead links as long as you use some sort of refactoring tool like resharper from jetbrains. Here is a link [...]


Related posts:<ol><li><a href='http://www.lacy.ie/redirecting-using-strong-types-in-an-asp-net-web-application-project' rel='bookmark' title='Permanent Link: Redirecting using strong types in an asp.net web application project'>Redirecting using strong types in an asp.net web application project</a> <small>Update, I recommend also reading the following post after you...</small></li>
<li><a href='http://www.lacy.ie/updating-designer-cs-asp-web-application' rel='bookmark' title='Permanent Link: Updating designer.cs in an ASP.Net Web Application'>Updating designer.cs in an ASP.Net Web Application</a> <small>If the controls on your designer.cs are out of sync...</small></li>
<li><a href='http://www.lacy.ie/how-to-mock-the-httpcontext-in-asp-net' rel='bookmark' title='Permanent Link: How to Mock the HttpContext in asp.net'>How to Mock the HttpContext in asp.net</a> <small>I find mocking the http context rather difficult, you can&#8217;t...</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>I wrote previously how to handle redirecting to other pages in an asp.net Web Forms application using the page&#8217;s type which allows you to move pages around in your site without having to worry about dead links as long as you use some sort of refactoring tool like resharper from jetbrains. Here is a link to the original post: <a href="http://www.lacy.ie/redirecting-using-strong-types-in-an-asp-net-web-application-project">http://www.lacy.ie/redirecting-using-strong-types-in-an-asp-net-web-application-project</a></p>
<p>In .Net 4 you are now able to have functions with optional parameters and name parameters in function calls, see <a href="http://weblogs.asp.net/paulomorgado/archive/2010/04/16/c-4-0-named-and-optional-arguments.aspx">http://weblogs.asp.net/paulomorgado/archive/2010/04/16/c-4-0-named-and-optional-arguments.aspx</a> for more details on that.</p>
<p>So what this means for Redirecting using Strong Type is that where before you couldn&#8217;t specify which parameter you were referring to if two of the optional parameters were integers, now you can make both parameters optional and in your calls name the parameter you want to pass.</p>
<p><span id="more-276"></span></p>
<p>So what you would have had before is</p>
<blockquote><p>public static void Redirect(int age, object randomParamToDistuinguish)<br />
{</p>
<p>HttpContext.Current.Response.Redirect(GetUrl(id,null);</p>
<p>}</p>
<p>public static void Redirect(int groupId)<br />
{</p>
<p>HttpContext.Current.Response.Redirect(GetUrl(id,null);</p>
<p>}</p>
<p>UserList.Redirect(1,null);</p>
<p>OR</p>
<p>UserDetails.Redirect(1);</p></blockquote>
<p>Now you have</p>
<blockquote><p>public static void Redirect(int age = -1, int groupId = -1)<br />
{</p>
<p>HttpContext.Current.Response.Redirect(GetUrl(age,groupId);</p>
<p>}</p>
<p>UserList.Redirect(age: 17, groupId: 4)</p>
<p>OR</p>
<p>UserList.Redirect(age: 9);</p>
<p>OR</p>
<p>UserList.Redirect(groupId: 14);</p></blockquote>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.lacy.ie%2Fupdating-redirection-using-strong-types-to-net-4&amp;linkname=Updating%20Redirection%20using%20Strong%20Types%20to%20.Net%204"><img src="http://www.lacy.ie/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>

<p>Related posts:<ol><li><a href='http://www.lacy.ie/redirecting-using-strong-types-in-an-asp-net-web-application-project' rel='bookmark' title='Permanent Link: Redirecting using strong types in an asp.net web application project'>Redirecting using strong types in an asp.net web application project</a> <small>Update, I recommend also reading the following post after you...</small></li>
<li><a href='http://www.lacy.ie/updating-designer-cs-asp-web-application' rel='bookmark' title='Permanent Link: Updating designer.cs in an ASP.Net Web Application'>Updating designer.cs in an ASP.Net Web Application</a> <small>If the controls on your designer.cs are out of sync...</small></li>
<li><a href='http://www.lacy.ie/how-to-mock-the-httpcontext-in-asp-net' rel='bookmark' title='Permanent Link: How to Mock the HttpContext in asp.net'>How to Mock the HttpContext in asp.net</a> <small>I find mocking the http context rather difficult, you can&#8217;t...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.lacy.ie/updating-redirection-using-strong-types-to-net-4/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Build VS2010 Solutions Using TFS2008 Team Build</title>
		<link>http://www.lacy.ie/how-to-build-vs2010-solutions-using-tfs2008-team-build</link>
		<comments>http://www.lacy.ie/how-to-build-vs2010-solutions-using-tfs2008-team-build#comments</comments>
		<pubDate>Wed, 14 Apr 2010 10:11:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[ASP.Net 4]]></category>
		<category><![CDATA[MSBuild]]></category>
		<category><![CDATA[Team Foundation Server]]></category>
		<category><![CDATA[Visual Studio 2010]]></category>

		<guid isPermaLink="false">http://www.lacy.ie/?p=271</guid>
		<description><![CDATA[This will work with .Net 4 RTM. It will also build previous versions of .Net Projects. Step 1: Install the .Net 4.0 Framework Beta 2 on your build server (or just put VS2010 beta 2 on it) Step 2: Change the Team Build config as follows Stop the Team Build service Go to C:\Program Files\Microsoft Visual Studio [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>This will work with .Net 4 RTM. It will also build previous versions of .Net Projects.</p>
<blockquote><p>Step 1: Install the <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=ded875c8-fe5e-4cc9-b973-2171b61fe982&amp;displaylang=en" target="_blank">.Net 4.0 Framework Beta 2</a> on your build server (or just put VS2010 beta 2 on it)</p>
<p>Step 2: Change the Team Build config as follows</p>
<ul>
<li>Stop the Team Build service</li>
<li>Go to <em>C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies</em> and open up <em>TfsBuildService.exe.config</em> in the text editor of your choice.</li>
<li>Find the MSBuildPath setting and set the value as follows<br />
&lt;add key=&#8221;MSBuildPath&#8221; value=&#8221;c:\windows\microsoft.net\Framework\v4.0.21006\&#8221; /&gt;</li>
<li>Restart the Team Build service and check that your builds work.</li>
</ul>
<ul>Step 3: You’re done.  Go and ask your boss for a pay rise for being so efficient.</ul>
</blockquote>
<p>Taken from: <a href="http://richardsbraindump.blogspot.com/2009/11/how-to-build-vs2010-solutions-using.html">http://richardsbraindump.blogspot.com/2009/11/how-to-build-vs2010-solutions-using.html</a></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.lacy.ie%2Fhow-to-build-vs2010-solutions-using-tfs2008-team-build&amp;linkname=How%20To%20Build%20VS2010%20Solutions%20Using%20TFS2008%20Team%20Build"><img src="http://www.lacy.ie/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>

<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.lacy.ie/how-to-build-vs2010-solutions-using-tfs2008-team-build/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Updating designer.cs in an ASP.Net Web Application</title>
		<link>http://www.lacy.ie/updating-designer-cs-asp-web-application</link>
		<comments>http://www.lacy.ie/updating-designer-cs-asp-web-application#comments</comments>
		<pubDate>Tue, 13 Apr 2010 16:40:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[ASP.Net Webforms]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://www.lacy.ie/?p=269</guid>
		<description><![CDATA[If the controls on your designer.cs are out of sync with your aspx page you may want to try the following to resync them. Put your page in design view and right click / refresh. It will sync the controls with the designer.cs. Make sure designer.cs is close before doing this. Taken from the following [...]


Related posts:<ol><li><a href='http://www.lacy.ie/redirecting-using-strong-types-in-an-asp-net-web-application-project' rel='bookmark' title='Permanent Link: Redirecting using strong types in an asp.net web application project'>Redirecting using strong types in an asp.net web application project</a> <small>Update, I recommend also reading the following post after you...</small></li>
<li><a href='http://www.lacy.ie/jquery-grid-plugin-jqgrid-with-asp-net-web-forms' rel='bookmark' title='Permanent Link: jQuery Grid Plugin (JqGrid) with ASP.Net Web Forms'>jQuery Grid Plugin (JqGrid) with ASP.Net Web Forms</a> <small>Get JqGrid here: http://www.trirand.com/blog/ So far I&#8217;ve seen two implementations...</small></li>
<li><a href='http://www.lacy.ie/official-jqgrid-asp-net-web-forms-control-alpha-demo' rel='bookmark' title='Permanent Link: Official JqGrid ASP.Net Web Forms Control Alpha Demo'>Official JqGrid ASP.Net Web Forms Control Alpha Demo</a> <small>First look at the official JqGrid ASP.Net Web Forms control...</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>If the controls on your designer.cs are out of sync with your aspx page you may want to try the following to resync them.</p>
<blockquote><p>Put your page in design view and right click / refresh. It will sync the controls with the designer.cs. Make sure designer.cs is close before doing this.</p></blockquote>
<p>Taken from the following link: <a href="http://forums.asp.net/t/1233688.aspx">http://forums.asp.net/t/1233688.aspx</a></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.lacy.ie%2Fupdating-designer-cs-asp-web-application&amp;linkname=Updating%20designer.cs%20in%20an%20ASP.Net%20Web%20Application"><img src="http://www.lacy.ie/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>

<p>Related posts:<ol><li><a href='http://www.lacy.ie/redirecting-using-strong-types-in-an-asp-net-web-application-project' rel='bookmark' title='Permanent Link: Redirecting using strong types in an asp.net web application project'>Redirecting using strong types in an asp.net web application project</a> <small>Update, I recommend also reading the following post after you...</small></li>
<li><a href='http://www.lacy.ie/jquery-grid-plugin-jqgrid-with-asp-net-web-forms' rel='bookmark' title='Permanent Link: jQuery Grid Plugin (JqGrid) with ASP.Net Web Forms'>jQuery Grid Plugin (JqGrid) with ASP.Net Web Forms</a> <small>Get JqGrid here: http://www.trirand.com/blog/ So far I&#8217;ve seen two implementations...</small></li>
<li><a href='http://www.lacy.ie/official-jqgrid-asp-net-web-forms-control-alpha-demo' rel='bookmark' title='Permanent Link: Official JqGrid ASP.Net Web Forms Control Alpha Demo'>Official JqGrid ASP.Net Web Forms Control Alpha Demo</a> <small>First look at the official JqGrid ASP.Net Web Forms control...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.lacy.ie/updating-designer-cs-asp-web-application/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to stop a javascript event from bubbling</title>
		<link>http://www.lacy.ie/how-to-stop-a-javascript-event-from-bubbling</link>
		<comments>http://www.lacy.ie/how-to-stop-a-javascript-event-from-bubbling#comments</comments>
		<pubDate>Thu, 25 Feb 2010 14:41:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.lacy.ie/?p=266</guid>
		<description><![CDATA[Events on any html document bubble from child up to parent calling the handlers on each element until it reaches the Body. In order to stop this from happening you can cancel the bubble by setting the cancelBubble property on the event to true &#60;INPUT TYPE=&#8221;TEXT&#8221; NAME=&#8221;TEXT1&#8243; onclick=&#8221;alert(&#8216;TEXT1&#8242;);event.cancelBubble=true;&#8221;&#62;Name Taken from http://webdevelopersjournal.com/articles/jsevents2/jsevents2.html Related posts:Can&#039;t Register Javascript [...]


Related posts:<ol><li><a href='http://www.lacy.ie/cant-register-javascript-for-invisible-control' rel='bookmark' title='Permanent Link: Can&#039;t Register Javascript for Invisible Control'>Can&#039;t Register Javascript for Invisible Control</a> <small>I was writing an ASP.Net Dialog Control and I overwrote...</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Events on any html document bubble from child up to parent calling the handlers on each element until it reaches the Body.</p>
<p>In order to stop this from happening you can cancel the bubble by setting the cancelBubble property on the event to true</p>
<blockquote><p>&lt;INPUT TYPE=&#8221;TEXT&#8221; NAME=&#8221;TEXT1&#8243; onclick=&#8221;alert(&#8216;TEXT1&#8242;);event.cancelBubble=true;&#8221;&gt;Name</p></blockquote>
<p>Taken from <a href="http://webdevelopersjournal.com/articles/jsevents2/jsevents2.html">http://webdevelopersjournal.com/articles/jsevents2/jsevents2.html</a></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.lacy.ie%2Fhow-to-stop-a-javascript-event-from-bubbling&amp;linkname=How%20to%20stop%20a%20javascript%20event%20from%20bubbling"><img src="http://www.lacy.ie/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>

<p>Related posts:<ol><li><a href='http://www.lacy.ie/cant-register-javascript-for-invisible-control' rel='bookmark' title='Permanent Link: Can&#039;t Register Javascript for Invisible Control'>Can&#039;t Register Javascript for Invisible Control</a> <small>I was writing an ASP.Net Dialog Control and I overwrote...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.lacy.ie/how-to-stop-a-javascript-event-from-bubbling/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reducing the size of your ViewState in asp.net web forms</title>
		<link>http://www.lacy.ie/reducing-the-size-of-your-viewstate-in-asp-net-web-forms</link>
		<comments>http://www.lacy.ie/reducing-the-size-of-your-viewstate-in-asp-net-web-forms#comments</comments>
		<pubDate>Mon, 22 Feb 2010 16:13:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[ASP.Net Webforms]]></category>

		<guid isPermaLink="false">http://www.lacy.ie/?p=264</guid>
		<description><![CDATA[Very useful article on how to reduce your ViewState size. Also very simple to implement. http://szokelizer.blogsome.com/2006/11/09/how-to-put-controlstate-into-viewstate-and-how-to-put-viewstate-into-session/ Related posts:Official JqGrid ASP.Net Web Forms Control Alpha Demo First look at the official JqGrid ASP.Net Web Forms control... jQuery Grid Plugin (JqGrid) with ASP.Net Web Forms Get JqGrid here: http://www.trirand.com/blog/ So far I&#8217;ve seen two implementations... Default Button [...]


Related posts:<ol><li><a href='http://www.lacy.ie/official-jqgrid-asp-net-web-forms-control-alpha-demo' rel='bookmark' title='Permanent Link: Official JqGrid ASP.Net Web Forms Control Alpha Demo'>Official JqGrid ASP.Net Web Forms Control Alpha Demo</a> <small>First look at the official JqGrid ASP.Net Web Forms control...</small></li>
<li><a href='http://www.lacy.ie/jquery-grid-plugin-jqgrid-with-asp-net-web-forms' rel='bookmark' title='Permanent Link: jQuery Grid Plugin (JqGrid) with ASP.Net Web Forms'>jQuery Grid Plugin (JqGrid) with ASP.Net Web Forms</a> <small>Get JqGrid here: http://www.trirand.com/blog/ So far I&#8217;ve seen two implementations...</small></li>
<li><a href='http://www.lacy.ie/default-button-in-asp-net-forms' rel='bookmark' title='Permanent Link: Default Button in asp.net forms'>Default Button in asp.net forms</a> <small>Taken from http://www.metabuilders.com/Tools/DefaultButtons.aspx Often in asp.net WebForms you have multiple...</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Very useful article on how to reduce your ViewState size. Also very simple to implement.</p>
<p><a href="http://szokelizer.blogsome.com/2006/11/09/how-to-put-controlstate-into-viewstate-and-how-to-put-viewstate-into-session/">http://szokelizer.blogsome.com/2006/11/09/how-to-put-controlstate-into-viewstate-and-how-to-put-viewstate-into-session/</a></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.lacy.ie%2Freducing-the-size-of-your-viewstate-in-asp-net-web-forms&amp;linkname=Reducing%20the%20size%20of%20your%20ViewState%20in%20asp.net%20web%20forms"><img src="http://www.lacy.ie/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>

<p>Related posts:<ol><li><a href='http://www.lacy.ie/official-jqgrid-asp-net-web-forms-control-alpha-demo' rel='bookmark' title='Permanent Link: Official JqGrid ASP.Net Web Forms Control Alpha Demo'>Official JqGrid ASP.Net Web Forms Control Alpha Demo</a> <small>First look at the official JqGrid ASP.Net Web Forms control...</small></li>
<li><a href='http://www.lacy.ie/jquery-grid-plugin-jqgrid-with-asp-net-web-forms' rel='bookmark' title='Permanent Link: jQuery Grid Plugin (JqGrid) with ASP.Net Web Forms'>jQuery Grid Plugin (JqGrid) with ASP.Net Web Forms</a> <small>Get JqGrid here: http://www.trirand.com/blog/ So far I&#8217;ve seen two implementations...</small></li>
<li><a href='http://www.lacy.ie/default-button-in-asp-net-forms' rel='bookmark' title='Permanent Link: Default Button in asp.net forms'>Default Button in asp.net forms</a> <small>Taken from http://www.metabuilders.com/Tools/DefaultButtons.aspx Often in asp.net WebForms you have multiple...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.lacy.ie/reducing-the-size-of-your-viewstate-in-asp-net-web-forms/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Redirecting using strong types in an asp.net web application project</title>
		<link>http://www.lacy.ie/redirecting-using-strong-types-in-an-asp-net-web-application-project</link>
		<comments>http://www.lacy.ie/redirecting-using-strong-types-in-an-asp-net-web-application-project#comments</comments>
		<pubDate>Wed, 13 Jan 2010 18:45:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[ASP.net]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Resharper]]></category>
		<category><![CDATA[Web Application Projects]]></category>
		<category><![CDATA[Web Forms]]></category>

		<guid isPermaLink="false">http://www.lacy.ie/?p=249</guid>
		<description><![CDATA[Update, I recommend also reading the following post after you read this one if you plan on using this within .Net 4: http://www.lacy.ie/updating-redirection-using-strong-types-to-net-4 It recently began to annoy me that every time I want to redirect to a page I have to use a string. Not a big deal I know but when you have broken [...]


Related posts:<ol><li><a href='http://www.lacy.ie/how-to-mock-the-httpcontext-in-asp-net' rel='bookmark' title='Permanent Link: How to Mock the HttpContext in asp.net'>How to Mock the HttpContext in asp.net</a> <small>I find mocking the http context rather difficult, you can&#8217;t...</small></li>
<li><a href='http://www.lacy.ie/jquery-grid-plugin-jqgrid-with-asp-net-web-forms' rel='bookmark' title='Permanent Link: jQuery Grid Plugin (JqGrid) with ASP.Net Web Forms'>jQuery Grid Plugin (JqGrid) with ASP.Net Web Forms</a> <small>Get JqGrid here: http://www.trirand.com/blog/ So far I&#8217;ve seen two implementations...</small></li>
<li><a href='http://www.lacy.ie/handling-relative-paths-and-debug-mode-with-jquery-in-asp-net-web-forms' rel='bookmark' title='Permanent Link: Handling Relative Paths and debug mode with Jquery in ASP.Net Web Forms'>Handling Relative Paths and debug mode with Jquery in ASP.Net Web Forms</a> <small>I had a problem where I wanted to use the...</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Update, I recommend also reading the following post after you read this one if you plan on using this within .Net 4: <a href="http://www.lacy.ie/updating-redirection-using-strong-types-to-net-4">http://www.lacy.ie/updating-redirection-using-strong-types-to-net-4</a></p>
<p>It recently began to annoy me that every time I want to redirect to a page I have to use a string. Not a big deal I know but when you have broken links it can reflect badly on you as a developer, so I began to look for some solution that would allow for the following.</p>
<ul>
<li>Refactoring: I need to be able to move a page around without having to find every string reference to it</li>
<li>No Reflection: It&#8217;s slow I don&#8217;t want to have to use it when redirects happen often.</li>
<li>Parameters: I want to be able to pass parameters to a function and make that become part of the get request, I want the logic for that to exist on the page being redirected to as that is where the parameters are being used, this will also help with refactoring, the plain ole redirect logic however would just exist on a base class, don&#8217;t want to have to rewrite for every page.</li>
</ul>
<p>I knew the ideal situation would be if I could somehow use the fact that web application projects use the folder hierarchy for its namespace convention and end up being able to redirect to the page ~/Users/UserDetails.aspx?UserId=14 with the following command Users.UserDetails.Redirect(14);</p>
<p>Here is how I did it:<span id="more-249"></span></p>
<p>I have a web application project, let&#8217;s call it MyProject.Web</p>
<p>I have two pages called UserDetails.aspx and UserList.aspx in the folder Users.</p>
<p>They both inherit from the following base class:</p>
<div id="_mcePaste">
<blockquote>
<div id="_mcePaste">namespace MyProject.UI</div>
<div id="_mcePaste">{</div>
<div id="_mcePaste">/// &lt;summary&gt;</div>
<div id="_mcePaste">/// Summary description for BasePage</div>
<div id="_mcePaste">/// &lt;/summary&gt;</div>
<div id="_mcePaste">public abstract class BasePage&lt;T&gt;:Page where T : Page</div>
<div id="_mcePaste">{</div>
<div id="_mcePaste">public static String GetUrl()</div>
<div id="_mcePaste">{</div>
<div id="_mcePaste">return &#8220;~/&#8221; + typeof(T).ToString().Replace(&#8220;MyProject.Web.&#8221;, &#8220;&#8221;).Replace(&#8216;.&#8217;, &#8216;/&#8217;) + &#8220;.aspx&#8221;;</div>
<div id="_mcePaste">}</div>
<div id="_mcePaste">public static String GetUrl(String parameters)</div>
<div id="_mcePaste">{</div>
<div id="_mcePaste">return GetUrl() + &#8220;?&#8221; + parameters;</div>
<div id="_mcePaste">}</div>
<div id="_mcePaste">public static void Redirect()</div>
<div id="_mcePaste">{</div>
<div id="_mcePaste">HttpContext.Current.Response.Redirect(GetUrl());</div>
<div id="_mcePaste">}</div>
<div id="_mcePaste">public static void Redirect(String parameters)</div>
<div id="_mcePaste">{</div>
<div id="_mcePaste">HttpContext.Current.Response.Redirect(GetUrl(parameters));</div>
<div id="_mcePaste">}</div>
<div id="_mcePaste">public static void Redirect(Boolean endResponse)</div>
<div id="_mcePaste">{</div>
<div id="_mcePaste">HttpContext.Current.Response.Redirect(GetUrl(),endResponse);</div>
<div id="_mcePaste">}</div>
<div id="_mcePaste">public static void Redirect(String parameters,Boolean endResponse)</div>
<div id="_mcePaste">{</div>
<div id="_mcePaste">HttpContext.Current.Response.Redirect(GetUrl(parameters), endResponse);</div>
<div id="_mcePaste">}</div>
<div id="_mcePaste">}</div>
<div id="_mcePaste">}</div>
</blockquote>
</div>
<p>They follow this pattern:</p>
<blockquote><p>namespace MyProject.Web.Users</p>
<p>{</p>
<p><span style="white-space: pre;"> </span>public partial class UserDetails: BasePage&lt;UserDetails&gt;</p>
<p><span style="white-space: pre;"> </span>{</p>
<p><span style="white-space: pre;"> </span>public static void Redirect(int userId)</p>
<p><span style="white-space: pre;"> </span>{</p>
<p><span style="white-space: pre;"> </span>Redirect(&#8220;UserId=&#8221; + userId.ToString());</p>
<p><span style="white-space: pre;"> </span>}</p>
<p><span style="white-space: pre;"> </span>}</p>
<p>}</p></blockquote>
<p>Now because UserDetails and UserList are in the same folder I can simply call UserDetails.Redirect(selectedUserId) on the UserList and UserList.Redirect() on the UserDetails.<br />
The only real disadvantage is that it could confuse people who discover a Redirect method on their current page that they can&#8217;t use to make it to another page.<br />
However it should be abundantly clear to everyone what you are doing when they see it already written.<br />
Also every time you move a class, remove or add a parameter, it will break on compile time not at run time.</p>
<p>Comments and feedback welcome.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.lacy.ie%2Fredirecting-using-strong-types-in-an-asp-net-web-application-project&amp;linkname=Redirecting%20using%20strong%20types%20in%20an%20asp.net%20web%20application%20project"><img src="http://www.lacy.ie/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>

<p>Related posts:<ol><li><a href='http://www.lacy.ie/how-to-mock-the-httpcontext-in-asp-net' rel='bookmark' title='Permanent Link: How to Mock the HttpContext in asp.net'>How to Mock the HttpContext in asp.net</a> <small>I find mocking the http context rather difficult, you can&#8217;t...</small></li>
<li><a href='http://www.lacy.ie/jquery-grid-plugin-jqgrid-with-asp-net-web-forms' rel='bookmark' title='Permanent Link: jQuery Grid Plugin (JqGrid) with ASP.Net Web Forms'>jQuery Grid Plugin (JqGrid) with ASP.Net Web Forms</a> <small>Get JqGrid here: http://www.trirand.com/blog/ So far I&#8217;ve seen two implementations...</small></li>
<li><a href='http://www.lacy.ie/handling-relative-paths-and-debug-mode-with-jquery-in-asp-net-web-forms' rel='bookmark' title='Permanent Link: Handling Relative Paths and debug mode with Jquery in ASP.Net Web Forms'>Handling Relative Paths and debug mode with Jquery in ASP.Net Web Forms</a> <small>I had a problem where I wanted to use the...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.lacy.ie/redirecting-using-strong-types-in-an-asp-net-web-application-project/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom Control won&#8217;t trigger Update Panel</title>
		<link>http://www.lacy.ie/custom-control-wont-trigger-update-panel</link>
		<comments>http://www.lacy.ie/custom-control-wont-trigger-update-panel#comments</comments>
		<pubDate>Tue, 24 Nov 2009 14:00:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[asp.net ajax.net javascript]]></category>

		<guid isPermaLink="false">http://www.lacy.ie/?p=241</guid>
		<description><![CDATA[I was using the __dopostback  function in asp.net to cause a postback that would trigger an update in an updatepanel where relevant. If you come across this problem make sure that your custom control implements the INamingContainer as well as the IPostBackEventHandler interfaces Also make sure that your first argument to the __dopostback function is [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>I was using the __dopostback  function in asp.net to cause a postback that would trigger an update in an updatepanel where relevant.</p>
<p>If you come across this problem make sure that your custom control implements the INamingContainer as well as the IPostBackEventHandler interfaces</p>
<p>Also make sure that your first argument to the __dopostback function is the unique id of your custom control (this.UniqueId)</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.lacy.ie%2Fcustom-control-wont-trigger-update-panel&amp;linkname=Custom%20Control%20won%26%238217%3Bt%20trigger%20Update%20Panel"><img src="http://www.lacy.ie/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>

<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.lacy.ie/custom-control-wont-trigger-update-panel/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->