<?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>Codepolice.net &#187; ASP.NET</title>
	<atom:link href="http://codepolice.net/tag/aspnet/feed/" rel="self" type="application/rss+xml" />
	<link>http://codepolice.net</link>
	<description>C#, ASP.NET, MVC, LINQ, Wordpress and stuff like that</description>
	<lastBuildDate>Mon, 26 Jul 2010 08:58:47 +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>ASP.NET postback via JQuery / Javascript</title>
		<link>http://codepolice.net/2009/10/14/asp-net-postback-via-jquery-javascript/</link>
		<comments>http://codepolice.net/2009/10/14/asp-net-postback-via-jquery-javascript/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 11:35:04 +0000</pubDate>
		<dc:creator>Ola</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[webforms]]></category>

		<guid isPermaLink="false">http://codepolice.net/?p=172</guid>
		<description><![CDATA[ASP.NET Webforms isn&#8217;t the best platform to build web applications. I can&#8217;t wait to migrate my apps to ASP.NET MVC but until i have the time to do that i have to coup with some of asp.net strange parts. Today i wanted to invoke a postback via JQuery wich actually was fairly easy but i [...]]]></description>
			<content:encoded><![CDATA[<p>ASP.NET Webforms isn&#8217;t the best platform to build web applications. I can&#8217;t wait to migrate my apps to ASP.NET MVC but until i have the time to do that i have to coup with some of asp.net strange parts.</p>
<p>Today i wanted to invoke a postback via JQuery wich actually was fairly easy but i wanted to write a small post about it.</p>
<p>The trick was to get the Javascript that asp.net call to do a postback, save it somewhere and then executed via the eval() method. I used a hidden form to store the postback script.</p>
<p><strong>In the asp.net file</strong></p>
<div class="codecolorer-container csharp twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">hdnSearchPostBack<span style="color: #008000;">.</span><span style="color: #0000FF;">Value</span> <span style="color: #008000;">=</span> Page<span style="color: #008000;">.</span><span style="color: #0000FF;">ClientScript</span><span style="color: #008000;">.</span><span style="color: #0000FF;">GetPostBackEventReference</span><span style="color: #008000;">&#40;</span>SearchButton, <span style="color: #6666cc; font-weight: bold;">string</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Empty</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></div>
<p><strong>In the js file</strong></p>
<div class="codecolorer-container csharp twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">function<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#123;</span> eval<span style="color: #008000;">&#40;</span>$<span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;#ctl00_ctl00_hdnSearchPostBack&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">val</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span> <span style="color: #008000;">&#125;</span></div></div>
<p>Simple as that!</p>
]]></content:encoded>
			<wfw:commentRss>http://codepolice.net/2009/10/14/asp-net-postback-via-jquery-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>404 redirects in code with ASP.NET</title>
		<link>http://codepolice.net/2009/04/14/404-redirects-in-code-with-aspnet/</link>
		<comments>http://codepolice.net/2009/04/14/404-redirects-in-code-with-aspnet/#comments</comments>
		<pubDate>Tue, 14 Apr 2009 14:09:45 +0000</pubDate>
		<dc:creator>Ola</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[404]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[http-statuscode]]></category>

		<guid isPermaLink="false">http://codepolice.net/?p=151</guid>
		<description><![CDATA[I have had problems doing proper 404 redirects in ASP.NET ever since i started to care about proper 404 pages. I do not have any troubles if the page really does not exist. But say for example that i require a querystring on some page and for some reason i do not get a querystring. [...]]]></description>
			<content:encoded><![CDATA[<p>I have had problems doing proper 404 redirects in ASP.NET ever since i <a href="http://googlewebmastercentral.blogspot.com/2008/08/farewell-to-soft-404s.html">started to care about proper 404 pages</a>. I do not have any troubles if the page really does not exist. But say for example that i require a querystring on some page and for some reason i do not get a querystring. Then i guess it&#8217;s proper to give a 404 error.  Today i decided to give it another try and finally i think i have found the solution thanks to two great tips on the amazing Stackoverflow.com.</p>
<p>The first one is that if you want to throw a 404 error you can just do.</p>
<p><strong>throw new HttpException(404, &#8220;Article not found&#8221;);</strong></p>
<p>As simple as that. In almost all other articles i read about this people are talking about doing Response.Status = 404 and stuff like. The problem with that is that the page will continue to execute and you most likley get some kind of error if something vital is missing.</p>
<p>The next thing i learned where that you could do like this.</p>
<div class="codecolorer-container xml twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="xml codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp;</div></div>
<p>Notice the &#8220;redirectMode&#8221; property. It will cause asp.net to not change the url but do a &#8220;Server.Transfer&#8221; like redirect to the error page but keep the URL that thrown the error.</p>
]]></content:encoded>
			<wfw:commentRss>http://codepolice.net/2009/04/14/404-redirects-in-code-with-aspnet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>file_get_contents() in asp.net/C#</title>
		<link>http://codepolice.net/2009/02/13/file_get_contents-in-aspnetc/</link>
		<comments>http://codepolice.net/2009/02/13/file_get_contents-in-aspnetc/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 11:25:59 +0000</pubDate>
		<dc:creator>Ola</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[bit.ly]]></category>
		<category><![CDATA[file_get_contents()]]></category>
		<category><![CDATA[StreamReader]]></category>
		<category><![CDATA[WebRequest]]></category>

		<guid isPermaLink="false">http://codepolice.net/?p=137</guid>
		<description><![CDATA[The URL shortening service http://bit.ly has a really simple and convient API that lets just get a short url like this. http://bit.ly/api?url=http://www.myreallylong.com/url/with/lots?of=crap I&#8217;ve used this in a wordpress installation with PHP before and there i could just do. $twitter_url .= file_get_contents&#40;'http://bit.ly/api?url=' . get_permalink&#40;&#41;&#41;; Simple and clean. But today i wanted to do the same thing [...]]]></description>
			<content:encoded><![CDATA[<p>The URL shortening service http://bit.ly has a really simple and convient API that lets just get a short url like this.</p>
<p>http://bit.ly/api?url=http://www.myreallylong.com/url/with/lots?of=crap</p>
<p>I&#8217;ve used this in a wordpress installation with PHP before and there i could just do.</p>
<div class="codecolorer-container php twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000088;">$twitter_url</span> <span style="color: #339933;">.=</span> <a href="http://www.php.net/file_get_contents"><span style="color: #990000;">file_get_contents</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'http://bit.ly/api?url='</span> <span style="color: #339933;">.</span> get_permalink<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
<p>Simple and clean. But today i wanted to do the same thing with asp.net and found myself kind of lost. At last i came up with this, not as simple solution. But it works.</p>
<div class="codecolorer-container csharp twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #6666cc; font-weight: bold;">string</span> shortUrl <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> StreamReader<span style="color: #008000;">&#40;</span>WebRequest<span style="color: #008000;">.</span><span style="color: #0000FF;">Create</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;http://bit.ly/api?url=http://fragor.ohsohightech.se&quot;</span> <span style="color: #008000;">+</span> Url<span style="color: #008000;">.</span><span style="color: #0000FF;">Action</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;Question&quot;</span>, <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> <span style="color: #008000;">&#123;</span> number <span style="color: #008000;">=</span> question<span style="color: #008000;">.</span><span style="color: #0000FF;">Number</span>, title <span style="color: #008000;">=</span> question<span style="color: #008000;">.</span><span style="color: #0000FF;">Title</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ConvertTextToUrl</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#125;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">GetResponse</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">GetResponseStream</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ReadToEnd</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></div>

]]></content:encoded>
			<wfw:commentRss>http://codepolice.net/2009/02/13/file_get_contents-in-aspnetc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Publish web application project failed</title>
		<link>http://codepolice.net/2009/01/14/publish-web-application-project-failed/</link>
		<comments>http://codepolice.net/2009/01/14/publish-web-application-project-failed/#comments</comments>
		<pubDate>Wed, 14 Jan 2009 17:58:19 +0000</pubDate>
		<dc:creator>Ola</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[build]]></category>
		<category><![CDATA[deploy]]></category>
		<category><![CDATA[MSBuild]]></category>
		<category><![CDATA[Publish failed]]></category>
		<category><![CDATA[Publish fails]]></category>
		<category><![CDATA[visual studio]]></category>
		<category><![CDATA[visual studio 2008]]></category>

		<guid isPermaLink="false">http://www.codepolice.net/?p=133</guid>
		<description><![CDATA[I have had huge problems on various projects with the &#8220;publish&#8221; functionality in Visual Studio 2008. I like the feature, you just click publish, choose a directory and the files that is needed on the webserver is placed in the folder and you can easliy copy it to your server or whatever. The problem with [...]]]></description>
			<content:encoded><![CDATA[<p>I have had huge problems on various projects with the &#8220;publish&#8221; functionality in Visual Studio 2008. I like the feature, you just click publish, choose a directory and the files that is needed on the webserver is placed in the folder and you can easliy copy it to your server or whatever.</p>
<p>The problem with it is that it seems to fail from time to time. The output window gives no clues what so ever what has gone wrong so it&#8217;s kind of hard to debug. When you google it you get all sorts of threads and post about people having problems with this but it seems like it a diffrent solution for it everywhere.</p>
<p>Anyway i gave up and started looking towards MSBUILD and found <a href="http://codingcockerel.co.uk/2008/05/18/how-to-publish-a-web-site-with-msbuild/">this great post</a> about how to simulate the behavior of the publish feature with MSBUILD. You just create a Build.xml file and then you run msbuild.exe build.xml. My Build.xml file looks like this.</p>
<div class="codecolorer-container xml twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><div class="xml codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;utf-8&quot;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></span><br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Project</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://schemas.microsoft.com/developer/msbuild/2003&quot;</span> <span style="color: #000066;">DefaultTargets</span>=<span style="color: #ff0000;">&quot;Run&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp;<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Import</span> <span style="color: #000066;">Project</span>=<span style="color: #ff0000;">&quot;C:\Program Files\MSBuild\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;PropertyGroup<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;OutputFolder<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Publish<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/OutputFolder<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ProjectDir<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>C:\code\<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ProjectDir<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;CompilationDebug</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;CustomErrorsMode</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ContentEditorsEmail</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;AdministratorsEmail</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/PropertyGroup<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;PropertyGroup</span> <span style="color: #000066;">Condition</span>=<span style="color: #ff0000;">&quot;$(Environment) == 'Test'&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DeploymentFolder<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>C:\Staging\Test<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/DeploymentFolder<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/PropertyGroup<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;PropertyGroup</span> <span style="color: #000066;">Condition</span>=<span style="color: #ff0000;">&quot;$(Environment) == 'Live'&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DeploymentFolder<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>C:\Staging\Live<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/DeploymentFolder<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/PropertyGroup<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
<br />
&nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Target</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Run&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;CallTarget</span> <span style="color: #000066;">Targets</span>=<span style="color: #ff0000;">&quot;Compile&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;CallTarget</span> <span style="color: #000066;">Targets</span>=<span style="color: #ff0000;">&quot;Publish&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
<br />
&nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Target</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Clean&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ItemGroup<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;BinFiles</span> <span style="color: #000066;">Include</span>=<span style="color: #ff0000;">&quot;bin\*.*&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ItemGroup<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Delete</span> <span style="color: #000066;">Files</span>=<span style="color: #ff0000;">&quot;@(BinFiles)&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
<br />
&nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Target</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Compile&quot;</span> <span style="color: #000066;">DependsOnTargets</span>=<span style="color: #ff0000;">&quot;Clean&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;MSBuild</span> <span style="color: #000066;">Projects</span>=<span style="color: #ff0000;">&quot;myproject.csproj&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
<br />
&nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Target</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Publish&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;RemoveDir</span> <span style="color: #000066;">Directories</span>=<span style="color: #ff0000;">&quot;$(OutputFolder)&quot;</span> <span style="color: #000066;">ContinueOnError</span>=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;MSBuild</span> <span style="color: #000066;">Projects</span>=<span style="color: #ff0000;">&quot;myproject.csproj&quot;</span></span><br />
<span style="color: #009900;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">Targets</span>=<span style="color: #ff0000;">&quot;ResolveReferences;_CopyWebApplication&quot;</span></span><br />
<span style="color: #009900;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">Properties</span>=<span style="color: #ff0000;">&quot;WebProjectOutputDir=$(OutputFolder);OutDir=$(WebProjectOutputDir)\&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Project<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></div>
<p>This works great for me for now.</p>
]]></content:encoded>
			<wfw:commentRss>http://codepolice.net/2009/01/14/publish-web-application-project-failed/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>ASP.NET membership: System.Web.Security. SqlRoleProvider problems</title>
		<link>http://codepolice.net/2008/12/16/aspnet-membership-systemwebsecuritysqlroleprovider-problems/</link>
		<comments>http://codepolice.net/2008/12/16/aspnet-membership-systemwebsecuritysqlroleprovider-problems/#comments</comments>
		<pubDate>Tue, 16 Dec 2008 21:18:46 +0000</pubDate>
		<dc:creator>Ola</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[ASP.NET Membership]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[System.Web.Security.SqlRoleProvider]]></category>

		<guid isPermaLink="false">http://www.codepolice.net/?p=100</guid>
		<description><![CDATA[I had this really weird problem just now. I have done some work with the ASP.NET Membership provider and everything has been working great. But when i tried to deploy my application to the server i got this: The &#8216;System.Web.Security.SqlRoleProvider&#8217; requires a database schema compatible with schema version &#8217;1&#8242;. However, the current database schema is [...]]]></description>
			<content:encoded><![CDATA[<p>I had this really weird problem just now. I have done some work with the ASP.NET Membership provider and everything has been working great. But when i tried to deploy my application to the server i got this:</p>
<p><em>The &#8216;System.Web.Security.SqlRoleProvider&#8217; requires a database schema compatible with schema version &#8217;1&#8242;.  However, the current database schema is not compatible with this version.  You may need to either install a compatible schema with aspnet_reqsql.exe (available in the framework installation directory), or upgrade the provider to a newer version.</em></p>
<p>Alright, my database was exactly the same and everything looked fine. I tried to recreate my database with the aspnet_regsql.exe tool but nothing worked. Then i finally found this <a href="http://66.129.67.4/t/1314909.aspx">thread on the MSDN messageboard</a> and one guy said that he gave his application a name in the aspnet_Applications table and put that name in the web.config like this.</p>
<div class="codecolorer-container xml twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="xml codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;add</span> <span style="color: #000066;">connectionStringName</span>=<span style="color: #ff0000;">&quot;ApplicationServices&quot;</span></span><br />
<span style="color: #009900;"><span style="color: #000066;">applicationName</span>=<span style="color: #ff0000;">&quot;APPLICATION NAME&quot;</span> </span><br />
<span style="color: #009900;"><span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;AspNetSqlRoleProvider&quot;</span> </span><br />
<span style="color: #009900;"><span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span></div></div>
<p>And that solved it. Really really strange and i have no idea if this is a bug or whatever. On my local machine (Vista with IIS7) it worked great to have a application named &#8220;/&#8221; but on my production machin (a Server 2003 with IIS6) it did not.</p>
<p>Now i should stop working for today.</p>
]]></content:encoded>
			<wfw:commentRss>http://codepolice.net/2008/12/16/aspnet-membership-systemwebsecuritysqlroleprovider-problems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Finally have Subversion + CruiseControl.NET + MSBuild running</title>
		<link>http://codepolice.net/2008/11/06/finally-have-subversion-cruisecontrolnet-msbuild-running/</link>
		<comments>http://codepolice.net/2008/11/06/finally-have-subversion-cruisecontrolnet-msbuild-running/#comments</comments>
		<pubDate>Thu, 06 Nov 2008 16:49:06 +0000</pubDate>
		<dc:creator>Ola</dc:creator>
				<category><![CDATA[Deployment]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[continuous integration]]></category>
		<category><![CDATA[CruiseControl.NET]]></category>
		<category><![CDATA[Microsoft.WebApplication.targets]]></category>
		<category><![CDATA[MSBuild]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[Web application Project]]></category>

		<guid isPermaLink="false">http://www.codepolice.net/?p=33</guid>
		<description><![CDATA[I&#8217;ve been struggling the whole afternoon to get some kind of continuous integration up and running. It started with that i got sick and tired of the Publish feature in Visual Studio 2008 because it just starts to fail from time to time and its kind of impossible to find out why because it doesn&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been struggling the whole afternoon to get some kind of continuous integration up and running. It started with that i got sick and tired of the <strong>Publish</strong> feature in Visual Studio 2008 because it just starts to fail from time to time and its kind of impossible to find out why because it doesn&#8217;t give any kind of error information.</p>
<p>Anyway i started to look at MSBuild and see if it could handle my Publish task and i found <a href="http://codingcockerel.co.uk/2008/05/18/how-to-publish-a-web-site-with-msbuild/">this great article</a>. It explains how to make a build file that build your project and then also simulate the publish feature and put just the files necessary into a separate folder.</p>
<p>While i was on the subject i thought that i could as well see if i could set up my source control machine to build my app as soon as i check in some files, copy the build to a folder and make that folder a web application.</p>
<p>I actually was kind of easy. I found an <a href="http://msmvps.com/blogs/omar/archive/2008/10/06/asp-net-website-continuous-integration-deployment-using-cruisecontrol-net-subversion-msbuild-and-robocopy.aspx">article by Omar Al Zabir</a> that explains this in great detail.</p>
<p><strong>Not any problem at all?</strong></p>
<p>Ofcourse. The one i had most problem with was the infamous <strong>Microsoft.WebApplication.targets</strong> bug. When you build your project on the build machine you get this error.</p>
<p><em>error MSB4019: The imported project &#8220;C:\Program Files\MSBuild\Microsoft\VisualStudio\v9.0\WebApplications\Microsoft.WebApplication.targets&#8221; was not found. Confirm that the path in the &lt;Import&gt; declaration is correct, and that the file exists on disk.</em></p>
<p>I have had this problem before when we migrated a &#8220;Website&#8221; to a &#8220;Web application project&#8221; at my last job. What i remembered from it was that you had to copy the file Microsoft.WebApplication.targets from it&#8217;s location on your dev machine to the build machine. Well fine. The problem in my case was that the file already was there. I looked around for maybe an hour or until i realized that the path on my build machine was:</p>
<p><em>C:\Program Files\MSBuild\Microsoft\Visual Studio\v9.0\WebApplications\Microsoft.WebApplication.targets</em></p>
<p>While on my dev machine it was:</p>
<p><em>C:\Program Files\MSBuild\Microsoft\VisualStudio\v9.0\WebApplications\Microsoft.WebApplication.targets</em></p>
<p>Notice the difference? Don&#8217;t you just love Microsoft sometimes .. just copy the path and remove the space from &#8220;Visual Studio&#8221; and it works.</p>
<p>That was actually the only major problem i had. Otherwise i used my brain and the articles i linked to and everything is happy puppy.</p>
<p>Thanks and good night.</p>
<p>Link: <a href="http://codingcockerel.co.uk/2008/05/18/how-to-publish-a-web-site-with-msbuild/">How to publish a web site with MSBuild</a>, <a href="http://msmvps.com/blogs/omar/archive/2008/10/06/asp-net-website-continuous-integration-deployment-using-cruisecontrol-net-subversion-msbuild-and-robocopy.aspx">ASP.NET website Continuous Integration+Deployment using CruiseControl.NET, Subversion, MSBuild and Robocopy</a></p>
]]></content:encoded>
			<wfw:commentRss>http://codepolice.net/2008/11/06/finally-have-subversion-cruisecontrolnet-msbuild-running/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create a tag cloud with limited amout of tags in ASP.NET and LINQ</title>
		<link>http://codepolice.net/2008/10/14/create-a-tag-cloud-with-limited-amout-of-tags-in-aspnet-and-linq/</link>
		<comments>http://codepolice.net/2008/10/14/create-a-tag-cloud-with-limited-amout-of-tags-in-aspnet-and-linq/#comments</comments>
		<pubDate>Tue, 14 Oct 2008 15:13:12 +0000</pubDate>
		<dc:creator>Ola</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[LINQ]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Tag]]></category>
		<category><![CDATA[Tag Cloud]]></category>
		<category><![CDATA[TagCloud]]></category>

		<guid isPermaLink="false">http://www.codepolice.net/?p=24</guid>
		<description><![CDATA[Today i built a Tag cloud for my new site. I found this great article about on how to do it with LINQ and C#. But i missed some features. Especially how to limit the number of tags that was shown. So if you read that article and then have a look at this code [...]]]></description>
			<content:encoded><![CDATA[<p>Today i built a Tag cloud for my new site. I found <a href="http://kosta.apostolou.ca/software-development/how-to-create-a-tagcloud-using-linq-and-aspnet" target="_blank">this great article about on how to do it with LINQ and C#</a>. But i missed some features. Especially how to limit the number of tags that was shown. So if you read that article and then have a look at this code if you have the same problem as me.</p>
<div class="codecolorer-container csharp twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">var tagSummary <span style="color: #008000;">=</span> <span style="color: #008000;">&#40;</span><span style="color: #0600FF; font-weight: bold;">from</span> ti <span style="color: #0600FF; font-weight: bold;">in</span> db<span style="color: #008000;">.</span><span style="color: #0000FF;">TagItemRelations</span><br />
&nbsp; &nbsp; group ti by ti<span style="color: #008000;">.</span><span style="color: #0000FF;">Tag</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Text</span> into tagGroup<br />
&nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">select</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; Tag <span style="color: #008000;">=</span> tagGroup<span style="color: #008000;">.</span><span style="color: #0000FF;">Key</span>,<br />
&nbsp; &nbsp; TagFrequency <span style="color: #008000;">=</span> tagGroup<span style="color: #008000;">.</span><span style="color: #0000FF;">Count</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><br />
<span style="color: #008000;">&#125;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">OrderByDescending</span><span style="color: #008000;">&#40;</span>x<span style="color: #008000;">=&amp;</span>gt<span style="color: #008000;">;</span>x<span style="color: #008000;">.</span><span style="color: #0000FF;">TagFrequency</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Take</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">20</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
<span style="color: #6666cc; font-weight: bold;">int</span> maxTagFrequency <span style="color: #008000;">=</span> <span style="color: #008000;">&#40;</span><span style="color: #0600FF; font-weight: bold;">from</span> t <span style="color: #0600FF; font-weight: bold;">in</span> tagSummary <span style="color: #0600FF; font-weight: bold;">select</span> t<span style="color: #008000;">.</span><span style="color: #0000FF;">TagFrequency</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Max</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
var tagCloud <span style="color: #008000;">=</span> <span style="color: #008000;">&#40;</span><span style="color: #0600FF; font-weight: bold;">from</span> ti <span style="color: #0600FF; font-weight: bold;">in</span> tagSummary<br />
&nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">select</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> TagCloudItem <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; Tag <span style="color: #008000;">=</span> ti<span style="color: #008000;">.</span><span style="color: #0000FF;">Tag</span>,<br />
&nbsp; &nbsp; Weight <span style="color: #008000;">=</span> <span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">double</span><span style="color: #008000;">&#41;</span>ti<span style="color: #008000;">.</span><span style="color: #0000FF;">TagFrequency</span> <span style="color: #008000;">/</span> maxTagFrequency <span style="color: #008000;">*</span> <span style="color: #FF0000;">100</span><br />
<span style="color: #008000;">&#125;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">OrderBy</span><span style="color: #008000;">&#40;</span>x<span style="color: #008000;">=&amp;</span>gt<span style="color: #008000;">;</span>x<span style="color: #008000;">.</span><span style="color: #0000FF;">Tag</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></div>
<p>The main difference between my code and the code in the article is that i have slightly more complex data model (should not matter) and that i make the second query against the &#8220;result&#8221; from the first query. This allow me to first order by popularity and then in alphabetic order.</p>
<p>Please leave a comment if there is any better way to do this or if you have any questions.</p>
]]></content:encoded>
			<wfw:commentRss>http://codepolice.net/2008/10/14/create-a-tag-cloud-with-limited-amout-of-tags-in-aspnet-and-linq/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using JQuery Validation plugin with ASP.NET</title>
		<link>http://codepolice.net/2008/10/09/using-jquery-validation-plugin-with-aspnet/</link>
		<comments>http://codepolice.net/2008/10/09/using-jquery-validation-plugin-with-aspnet/#comments</comments>
		<pubDate>Thu, 09 Oct 2008 13:42:53 +0000</pubDate>
		<dc:creator>Ola</dc:creator>
				<category><![CDATA[JQuery]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Form Validation]]></category>
		<category><![CDATA[Validation]]></category>

		<guid isPermaLink="false">http://www.codepolice.net/?p=4</guid>
		<description><![CDATA[Like everyone else i&#8217;ve been playing around with JQuery alot latley. Asp.net and JQuery is not the best friends in the world but i guess it will be alot better when using ASP.NET MVC. Microsoft also annoncued that they will support JQuery natively in future versions. Nice! If you want to learn more about ASP.NET [...]]]></description>
			<content:encoded><![CDATA[<p>Like everyone else i&#8217;ve been playing around with JQuery alot latley. Asp.net and JQuery is not the best friends in the world but i guess it will be alot better when using ASP.NET MVC. Microsoft also annoncued that they will support <a href="http://weblogs.asp.net/scottgu/archive/2008/09/28/jquery-and-microsoft.aspx" target="_blank">JQuery natively in future versions</a>. Nice!</p>
<p>If you want to learn more about ASP.NET and Jquery be sure to read both <a href="http://www.west-wind.com/Weblog/" target="_blank">Rick Sthral&#8217;s</a> and the <a href="http://encosia.com/" target="_blank">Encosia</a> blogs.</p>
<p>I&#8217;m working on a new project now where i am trying to stay away from asp.net ajax mainly because of performance reasons but also just because i want to learn something new. Today i&#8217;ve been using the <a href="http://bassistance.de/jquery-plugins/jquery-plugin-validation/" target="_blank">JQuery Validation plugin</a>.</p>
<p>There is alot of documentation of how to use it on the the documentation pages for the plugin but i want to share with you one thing that i had problems with.</p>
<p>This is some regular example code that all the sample&#8217;s use. The problem here is that for example &#8220;EmailTextbox&#8221; is not the ID of the control but the name.</p>
<div class="codecolorer-container javascript twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
<span style="color: #006600; font-style: italic;">// validate signup form on keyup and submit</span><br />
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#aspnetForm&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">validate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp;rules<span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;OpenIdTextbox<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;required&quot;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;NicknameTextbox<span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; required<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; remote<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;resources/nickname.aspx&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;EmailTextbox<span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; required<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; email<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
<p>I scratched my head for a long long time when i used ctl00_ContentPlaceHolder1_EmailTextbox and nothing worked at all. So what you have to do is change this to something like this ..</p>
<div class="codecolorer-container javascript twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp;<span style="color: #006600; font-style: italic;">// validate signup form on keyup and submit</span><br />
&nbsp;$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#aspnetForm&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">validate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp;rules<span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ctl00$ContentPlaceHolder1$OpenIdTextbox<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;required&quot;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ctl00$ContentPlaceHolder1$NicknameTextbox<span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;required<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;remote<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;resources/nickname.aspx&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ctl00$ContentPlaceHolder1$EmailTextbox<span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;required<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;email<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #009900;">&#125;</span><br />
&nbsp;<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
<p>You could of course also use <a href="http://geekswithblogs.net/Gaurav/archive/2006/09/04/90195.aspx" target="_blank">some method that rewrite the Control.UniqueID to a name</a> and use &lt;%= %&gt; to get the name of the control.</p>
]]></content:encoded>
			<wfw:commentRss>http://codepolice.net/2008/10/09/using-jquery-validation-plugin-with-aspnet/feed/</wfw:commentRss>
		<slash:comments>4</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! -->