<?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>mayvelous &#187; Tips and Tricks</title>
	<atom:link href="http://www.mayvelous.com/category/general-news/tips-and-tricks/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mayvelous.com</link>
	<description>Me, Myself and Mayvelous</description>
	<lastBuildDate>Mon, 10 Oct 2011 01:09:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Sitefinity &#8211; Empty Document Uploader Screen and Silverlight MIME</title>
		<link>http://www.mayvelous.com/2011/09/08/sitefinity-empty-document-uploader-screen-and-silverlight-mime/</link>
		<comments>http://www.mayvelous.com/2011/09/08/sitefinity-empty-document-uploader-screen-and-silverlight-mime/#comments</comments>
		<pubDate>Thu, 08 Sep 2011 06:20:47 +0000</pubDate>
		<dc:creator>May</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Asp.net]]></category>
		<category><![CDATA[Bugs and Fixes]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[MIME Types]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Sitefinity]]></category>

		<guid isPermaLink="false">http://www.mayvelous.com/?p=605</guid>
		<description><![CDATA[I deployed the Sitefinity site from local to DEV and STAGING servers and the document uploader works on DEV but suddendly disappear on the STAGING server. Correct Screen Error Screen I&#8217;ve created a forum post but received no good answers. The dude kept asking me to install Silverlight Tools on all the machines. I don&#8217;t understand [...]<blockquote>
<strong>Related Posts:</strong><ul>
<li><a href='http://www.mayvelous.com/2011/07/22/sitefinity-linking-external-js-file-in-master-pages/' rel='bookmark' title='Sitefinity &#8211; Linking External JS file in Master pages'>Sitefinity &#8211; Linking External JS file in Master pages</a></li>
<li><a href='http://www.mayvelous.com/2011/07/21/sitefinity-new-site-setup-dos-and-donts/' rel='bookmark' title='Sitefinity &#8211; New Site Setup DOs and DON&#8217;Ts'>Sitefinity &#8211; New Site Setup DOs and DON&#8217;Ts</a></li>
<li><a href='http://www.mayvelous.com/2011/08/23/sitefinity-fixing-version-dependent-custom-controls-errors/' rel='bookmark' title='Sitefinity &#8211; Fixing Version Dependent Custom Controls Errors'>Sitefinity &#8211; Fixing Version Dependent Custom Controls Errors</a></li>
<li><a href='http://www.mayvelous.com/2011/08/10/how-to-fix-cruise-build-deployment-that-adds-extra-assemblies-and-nlp-files/' rel='bookmark' title='How to fix Cruise build deployment that adds extra assemblies and .nlp files'>How to fix Cruise build deployment that adds extra assemblies and .nlp files</a></li>
</ul></blockquote>]]></description>
			<content:encoded><![CDATA[<p>I deployed the Sitefinity site from local to DEV and STAGING servers and the document uploader works on DEV but suddendly disappear on the STAGING server.</p>
<p style="text-align: center;">Correct Screen<br />
<a title="correct screen by mayvelous, on Flickr" href="http://www.flickr.com/photos/mayvelous/6126479504/"><img src="http://farm7.static.flickr.com/6064/6126479504_6b64ab3e9f_m.jpg" alt="correct screen" width="200" height="64" /></a></p>
<p style="text-align: center;">Error Screen<br />
<a title="blank document upload by mayvelous, on Flickr" href="http://www.flickr.com/photos/mayvelous/6125931815/"><img class="aligncenter" src="http://farm7.static.flickr.com/6074/6125931815_864514e333_m.jpg" alt="blank document upload" width="200" height="59" /></a></p>
<p>I&#8217;ve created <a title="upload documents link screen becomes empty" href="http://www.sitefinity.com/devnet/forums/sitefinity-4-x/general-discussions/upload-documents-link-screen-becomes-empty.aspx" target="_blank">a forum post</a> but received no good answers. The dude kept asking me to install Silverlight Tools on all the machines. I don&#8217;t understand why we have to install silverlight on all machines and which silverlight exactly to install as there&#8217;re browser plugin, silverlight tools, silverlight framwork etc. And I cannot install silverlight tools unless the prerequisites, Visual Studio 2010 and Web Developer Express 2010, been installed which I absolutely don&#8217;t want to do. Also on the DEV server, there&#8217;s not a single instance of Silverlight installation was there and the uploader&#8217;s working just fine so I really had a hard time figuring out the issue with STAGING site. The forum responds were so slow, so I created a ticket and the same dude replied as followed:</p>
<blockquote><p>Can you enable Firebug and check what errors come up in the Net tab when you try to access the Upload section? Also is there a way to provide RDC to your server so I can inspect the settings in more depth?</p></blockquote>
<p>Ofcos I don&#8217;t want to give RDC access but I checked the Firebug and that really helps figure out the problem.<br />
With the help of Firebug, I got 404 file not found for Telerik.Sitefinity.Silverlight.xap file with the error below:</p>
<blockquote><p>Unhandled Error in Silverlight Application<br />
Code: 2104<br />
Category: InitializeError<br />
Message: 2104 An error has occurred.</p></blockquote>
<p>Now that&#8217;s some good hint, so I checked the path and the file exists on the server so must be the file permission issue; I googled the error message and found out that it&#8217;s all to do with missing MIME Types on STAGING server.</p>
<p><a title="mime types by mayvelous, on Flickr" href="http://www.flickr.com/photos/mayvelous/6126479352/"><img class="aligncenter" src="http://farm7.static.flickr.com/6183/6126479352_a56a1245ea_m.jpg" alt="mime types" width="217" height="240" /></a></p>
<p>I&#8217;ve added these 3 types to the server MIME types list and it fixes the problem.</p>
<blockquote><p>.xap application/x-silverlight-app<br />
.xaml application/xaml+xml<br />
.xbap application/x-ms-xbap<br />
Ref: <a title="Configure IIS for Silverlight Applications" href="http://learn.iis.net/page.aspx/262/configuring-iis-for-silverlight-applications/" target="_blank">Configuration IIS for Silverlight Applications</a></p></blockquote>
<p>I wasn&#8217;t happy with the support but thank god he at least gave me a hint to check with Firebug.</p>
<p><a href="http://www.mayvelous.com"><img src="http://www.mayvelous.com/externals/thanks.gif" alt="Thanks for subscribing Mayvelous.com" border="0" /></a><br /><strong>Sponsor:</strong> <small>(yet to be)</small>: <a href="http://www.dreamhost.com/r.cgi?130793" title="Dreamhost $50 off discount code: 50MV">Dreamhost: Get $50 Off with Discount Code: <strong>50MV</strong></a></p> <blockquote><p><strong>Related Posts:</strong><ul>
<li><a href='http://www.mayvelous.com/2011/07/22/sitefinity-linking-external-js-file-in-master-pages/' rel='bookmark' title='Sitefinity &#8211; Linking External JS file in Master pages'>Sitefinity &#8211; Linking External JS file in Master pages</a></li>
<li><a href='http://www.mayvelous.com/2011/07/21/sitefinity-new-site-setup-dos-and-donts/' rel='bookmark' title='Sitefinity &#8211; New Site Setup DOs and DON&#8217;Ts'>Sitefinity &#8211; New Site Setup DOs and DON&#8217;Ts</a></li>
<li><a href='http://www.mayvelous.com/2011/08/23/sitefinity-fixing-version-dependent-custom-controls-errors/' rel='bookmark' title='Sitefinity &#8211; Fixing Version Dependent Custom Controls Errors'>Sitefinity &#8211; Fixing Version Dependent Custom Controls Errors</a></li>
<li><a href='http://www.mayvelous.com/2011/08/10/how-to-fix-cruise-build-deployment-that-adds-extra-assemblies-and-nlp-files/' rel='bookmark' title='How to fix Cruise build deployment that adds extra assemblies and .nlp files'>How to fix Cruise build deployment that adds extra assemblies and .nlp files</a></li>
</ul></p></blockquote>]]></content:encoded>
			<wfw:commentRss>http://www.mayvelous.com/2011/09/08/sitefinity-empty-document-uploader-screen-and-silverlight-mime/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Sitefinity &#8211; Fixing Version Dependent Custom Controls Errors</title>
		<link>http://www.mayvelous.com/2011/08/23/sitefinity-fixing-version-dependent-custom-controls-errors/</link>
		<comments>http://www.mayvelous.com/2011/08/23/sitefinity-fixing-version-dependent-custom-controls-errors/#comments</comments>
		<pubDate>Tue, 23 Aug 2011 04:03:15 +0000</pubDate>
		<dc:creator>May</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Asp.net]]></category>
		<category><![CDATA[Bugs and Fixes]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Project Notes]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[Assembly]]></category>
		<category><![CDATA[Conflict]]></category>
		<category><![CDATA[Sitefinity]]></category>
		<category><![CDATA[Versioning]]></category>

		<guid isPermaLink="false">http://www.mayvelous.com/?p=601</guid>
		<description><![CDATA[Whenever we upgrade to a new version of Sitefinity or applying service packs, we get something like the following version conflict errors: Could not load file or assembly &#8216;Telerik.Sitefinity, Version=&#8230;, Culture=neutral, PublicKeyToken=b28c218413bdf563&#8242; To fix that, place the assembly binding redirect info to the runtime section of your web.config and change the values of the &#8220;oldVersion&#8221; [...]<blockquote>
<strong>Related Posts:</strong><ul>
<li><a href='http://www.mayvelous.com/2011/07/22/sitefinity-linking-external-js-file-in-master-pages/' rel='bookmark' title='Sitefinity &#8211; Linking External JS file in Master pages'>Sitefinity &#8211; Linking External JS file in Master pages</a></li>
<li><a href='http://www.mayvelous.com/2011/07/21/sitefinity-new-site-setup-dos-and-donts/' rel='bookmark' title='Sitefinity &#8211; New Site Setup DOs and DON&#8217;Ts'>Sitefinity &#8211; New Site Setup DOs and DON&#8217;Ts</a></li>
<li><a href='http://www.mayvelous.com/2011/05/05/checking-sql-server-edition-version/' rel='bookmark' title='Checking SQL Server Edition Version'>Checking SQL Server Edition Version</a></li>
<li><a href='http://www.mayvelous.com/2011/08/10/how-to-fix-cruise-build-deployment-that-adds-extra-assemblies-and-nlp-files/' rel='bookmark' title='How to fix Cruise build deployment that adds extra assemblies and .nlp files'>How to fix Cruise build deployment that adds extra assemblies and .nlp files</a></li>
</ul></blockquote>]]></description>
			<content:encoded><![CDATA[<p>Whenever we upgrade to a new version of Sitefinity or applying service packs, we get something like the following version conflict errors:</p>
<blockquote><p>Could not load file or assembly &#8216;Telerik.Sitefinity, Version=&#8230;, Culture=neutral, PublicKeyToken=b28c218413bdf563&#8242;</p></blockquote>
<p>To fix that, place the assembly binding redirect info to the <strong>runtime</strong> section of your <strong>web.config</strong> and change the values of the &#8220;<strong>oldVersion</strong>&#8221; and &#8220;<strong>newVersion</strong>&#8221; acordingly. Your site should work again after a rebuild.</p>
<p><code>&lt;runtime&gt;<br />
&lt;assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"&gt;<br />
&lt;dependentAssembly&gt;<br />
&lt;assemblyIdentity name="Telerik.Sitefinity" publicKeyToken="b28c218413bdf563" /&gt;<br />
&lt;bindingRedirect oldVersion="4.1.1574.0" newVersion="4.2.1650.0"/&gt;<br />
&lt;/dependentAssembly&gt;<br />
&lt;dependentAssembly&gt;<br />
&lt;assemblyIdentity name="Telerik.Sitefinity.Model" publicKeyToken="b28c218413bdf563" /&gt;<br />
&lt;bindingRedirect oldVersion="4.1.1574.0" newVersion="4.2.1650.0"/&gt;<br />
&lt;/dependentAssembly&gt;<br />
&lt;/assemblyBinding&gt;<br />
&lt;/runtime&gt;</code></p>
<p>Some of the most recent version numbers I&#8217;ve tracked are as followed:</p>
<ul>
<li>Sitefinity 4.0 (4.0.1210.0)</li>
<li>Sitefinity 4.1 (4.1.1395.0)</li>
<li>Sitefinity 4.1 SP1 (4.1.1405.0)</li>
<li>Sitefinity 4.1 SP2 (4.1.1501.0)</li>
<li>Sitefinity 4.1 SP3 (4.1.1574.0)</li>
<li>Sitefinity 4.2 (4.2.1650.0)</li>
<li>Sitefinity 4.2 SP1 (4.2.1733.0)</li>
</ul>
<p>Another short note/ref to check out is <a title="Found conflicts between different versions of the same dependent assembly" href="http://stackoverflow.com/questions/17806/warning-found-conflicts-between-different-versions-of-the-same-dependent-assembl" target="_blank">this post on stackoverflow</a> explaining some of the solution to version conflict error:</p>
<blockquote><p>&#8220;Found conflicts between different versions of the same dependent assembly&#8221;.</p></blockquote>
<p>Below is the direct quote from <a title="Found conflicts between different versions of the same dependent assembly" href="http://stackoverflow.com/questions/17806/warning-found-conflicts-between-different-versions-of-the-same-dependent-assembl/2137718#2137718" target="_blank">Brian</a> which I find it pretty useful.:</p>
<blockquote><p>This warning means that two projects reference the same assembly (e.g. System.Windows.Forms) but the two project require different versions. You have a few options:</p>
<ol>
<li>Recompile all projects to use the same versions (e.g. move all to .Net 3.5). This is the preferred option because all code is running with the versions of dependencies they were compiled with.</li>
<li>Add a <a title="Assembly Binding Redirect" href="http://msdn.microsoft.com/en-us/library/433ysdt1.aspx" target="_blank">binding redirect</a>. This will suppress the warning. However, your .Net 2.0 projects will (at runtime) be bound to the .Net 3.5 versions of dependent assemblies such as System.Windows.Forms. You can quickly add a binding redirect by double-clicking on error in Visual Studio.</li>
<li>Use CopyLocal=true. I&#8217;m not sure if this will suppress the warning. It will, like option 2 above, mean that all projects will use the .Net 3.5 version of System.Windows.Forms.</li>
</ol>
<p>Here is a utility to identify the offending reference(s):<br />
<a title="Find conflicting assembly references" href="http://www.brianlow.com/index.php/2010/01/25/find-conflicting-assembly-references/" target="_blank">http://www.brianlow.com/index.php/2010/01/25/find-conflicting-assembly-references/</a></p></blockquote>
<p>K that&#8217;s about it for now.</p>
<p><a href="http://www.mayvelous.com"><img src="http://www.mayvelous.com/externals/thanks.gif" alt="Thanks for subscribing Mayvelous.com" border="0" /></a><br /><strong>Sponsor:</strong> <small>(yet to be)</small>: <a href="http://www.dreamhost.com/r.cgi?130793" title="Dreamhost $50 off discount code: 50MV">Dreamhost: Get $50 Off with Discount Code: <strong>50MV</strong></a></p> <blockquote><p><strong>Related Posts:</strong><ul>
<li><a href='http://www.mayvelous.com/2011/07/22/sitefinity-linking-external-js-file-in-master-pages/' rel='bookmark' title='Sitefinity &#8211; Linking External JS file in Master pages'>Sitefinity &#8211; Linking External JS file in Master pages</a></li>
<li><a href='http://www.mayvelous.com/2011/07/21/sitefinity-new-site-setup-dos-and-donts/' rel='bookmark' title='Sitefinity &#8211; New Site Setup DOs and DON&#8217;Ts'>Sitefinity &#8211; New Site Setup DOs and DON&#8217;Ts</a></li>
<li><a href='http://www.mayvelous.com/2011/05/05/checking-sql-server-edition-version/' rel='bookmark' title='Checking SQL Server Edition Version'>Checking SQL Server Edition Version</a></li>
<li><a href='http://www.mayvelous.com/2011/08/10/how-to-fix-cruise-build-deployment-that-adds-extra-assemblies-and-nlp-files/' rel='bookmark' title='How to fix Cruise build deployment that adds extra assemblies and .nlp files'>How to fix Cruise build deployment that adds extra assemblies and .nlp files</a></li>
</ul></p></blockquote>]]></content:encoded>
			<wfw:commentRss>http://www.mayvelous.com/2011/08/23/sitefinity-fixing-version-dependent-custom-controls-errors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to fix Cruise build deployment that adds extra assemblies and .nlp files</title>
		<link>http://www.mayvelous.com/2011/08/10/how-to-fix-cruise-build-deployment-that-adds-extra-assemblies-and-nlp-files/</link>
		<comments>http://www.mayvelous.com/2011/08/10/how-to-fix-cruise-build-deployment-that-adds-extra-assemblies-and-nlp-files/#comments</comments>
		<pubDate>Wed, 10 Aug 2011 07:20:59 +0000</pubDate>
		<dc:creator>May</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Bugs and Fixes]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[.csproj]]></category>
		<category><![CDATA[.nlp]]></category>
		<category><![CDATA[.sln]]></category>
		<category><![CDATA[continuous integration]]></category>
		<category><![CDATA[Cruise Control]]></category>
		<category><![CDATA[debug error]]></category>

		<guid isPermaLink="false">http://www.mayvelous.com/?p=598</guid>
		<description><![CDATA[I have this project setup for continuous integration with cruise control. It&#8217;s been up and running for quite sometime then suddenly the website starts getting the following errors on every successful build. Exception Details: System.BadImageFormatException: Could not load file or assembly &#8216;Microsoft.VisualBasic.Activities.Compiler&#8217; or one of its dependencies. An attempt was made to load a program [...]<blockquote>
<strong>Related Posts:</strong><ul>
<li><a href='http://www.mayvelous.com/2011/07/21/sitefinity-new-site-setup-dos-and-donts/' rel='bookmark' title='Sitefinity &#8211; New Site Setup DOs and DON&#8217;Ts'>Sitefinity &#8211; New Site Setup DOs and DON&#8217;Ts</a></li>
<li><a href='http://www.mayvelous.com/2011/07/22/sitefinity-linking-external-js-file-in-master-pages/' rel='bookmark' title='Sitefinity &#8211; Linking External JS file in Master pages'>Sitefinity &#8211; Linking External JS file in Master pages</a></li>
<li><a href='http://www.mayvelous.com/2011/05/02/list-storedprocedures-or-database-objects-by-last-modified-date/' rel='bookmark' title='List storedprocedures or database objects by last modified date'>List storedprocedures or database objects by last modified date</a></li>
<li><a href='http://www.mayvelous.com/2011/05/05/checking-sql-server-edition-version/' rel='bookmark' title='Checking SQL Server Edition Version'>Checking SQL Server Edition Version</a></li>
</ul></blockquote>]]></description>
			<content:encoded><![CDATA[<p>I have this project setup for continuous integration with cruise control. It&#8217;s been up and running for quite sometime then suddenly the website starts getting the following errors on every successful build.</p>
<blockquote><p><strong>Exception Details</strong>: System.BadImageFormatException: Could not load file or assembly &#8216;Microsoft.VisualBasic.Activities.Compiler&#8217; or one of its dependencies. An attempt was made to load a program with an incorrect format.</p></blockquote>
<p style="text-align: center;"><strong>The Error Page</strong><br />
<a title="Solution/Project Platform Target Configuration + Cruise Build by mayvelous, on Flickr" href="http://www.flickr.com/photos/mayvelous/6028509102/"><img class="aligncenter" src="http://farm7.static.flickr.com/6190/6028509102_68ed413784_m.jpg" alt="Solution/Project Platform Target Configuration + Cruise Build" width="240" height="141" /></a></p>
<p>I did not make any changes to the build configs at all and the site runs fine locally. There is no reference to &#8216;<strong>Microsoft.VisualBasic.Activities.Compiler</strong>&#8216; in my project and it doesn&#8217;t have VB code. I found some extra files, see below list, in the deployment bin while comparing the bin assemblies on deployment server and my local. Once remove those files, the site comes back on, but the files are added with every cruise build.</p>
<blockquote>
<ul>
<li>Microsoft.VisualBasic.Activities.Compiler.dll</li>
<li>Microsoft.Practices.ServiceLocation.dll</li>
<li>Microsoft.Practices.ServiceLocation.xml</li>
<li>mscorlib.dll</li>
<li>normidna.nlp</li>
<li>normnfc.nlp</li>
<li>normnfd.nlp</li>
<li>normnfkc.nlp</li>
<li>normnfkd.nlp</li>
<li>PresentationCore.dll</li>
<li>System.Data.dll</li>
<li>System.Data.OracleClient.dll</li>
<li>System.EnterpriseServices.dll</li>
<li>System.EnterpriseServices.Wrapper.dll</li>
<li>System.Printing.dll</li>
<li>System.Transactions.dll</li>
</ul>
</blockquote>
<p>I google a bit to check similar problems out there and found only <a title="why does the deployment package from build server have additional assemblies" href="http://stackoverflow.com/questions/5604221/why-does-the-deployment-package-from-my-buildserver-have-additional-assemblies" target="_blank">one link</a>, which was fixed by installing missing SDK or something. I didn&#8217;t think that was the right solution for me but got an idea to check for target platform configuration on the solution and project files.</p>
<p>I compare with one of my working project many times using visual studio property window to check for the solution and project file configuration properties but they seemed to be the same, using ANYCPU for the build platform. I didn&#8217;t trust the VS property designer so used WinMerge to compare the two files and found that there are some additional configuration lines added to the solution file. So I open the .sln and .csproj in notepad, removed all the extra configs, see the image below, checked back in, forced build the Cruise Control and walah all those craps gone and the site is back to the way it was.</p>
<p style="text-align: center;"><strong>.sln Solution file comparison and the lines to remove</strong><br />
<a title="Solution/Project Platform Target Configuration + Cruise Build by mayvelous, on Flickr" href="http://www.flickr.com/photos/mayvelous/6028509060/"><img src="http://farm7.static.flickr.com/6133/6028509060_1ed98221c4_m.jpg" alt="Solution/Project Platform Target Configuration + Cruise Build" width="240" height="99" /></a></p>
<p style="text-align: center;"><strong>.csproj Project file comparison and the line to remove</strong><br />
<a title="Solution/Project Platform Target Configuration + Cruise Build by mayvelous, on Flickr" href="http://www.flickr.com/photos/mayvelous/6027957193/"><img class="aligncenter" src="http://farm7.static.flickr.com/6196/6027957193_c2f44a452c_m.jpg" alt="Solution/Project Platform Target Configuration + Cruise Build" width="240" height="36" /></a></p>
<p>The point I like to make here is that although no error with cruise build, your site can still be broken and freaking Visual Studio design views lie many time so remember to go for the good old way of editing it in notepad.</p>
<blockquote><p><strong>Note:</strong> If you don&#8217;t have any working version to compare, just search for &#8220;<strong>Mixed Platforms</strong>&#8221; or &#8220;<strong>x86</strong>&#8221; in .sln file and &#8220;<strong>&lt;PlatformTarget&gt;AnyCPU&lt;/PlatformTarget&gt;</strong>&#8221; in .csproj file and remove them accordingly.</p></blockquote>
<p><a href="http://www.mayvelous.com"><img src="http://www.mayvelous.com/externals/thanks.gif" alt="Thanks for subscribing Mayvelous.com" border="0" /></a><br /><strong>Sponsor:</strong> <small>(yet to be)</small>: <a href="http://www.dreamhost.com/r.cgi?130793" title="Dreamhost $50 off discount code: 50MV">Dreamhost: Get $50 Off with Discount Code: <strong>50MV</strong></a></p> <blockquote><p><strong>Related Posts:</strong><ul>
<li><a href='http://www.mayvelous.com/2011/07/21/sitefinity-new-site-setup-dos-and-donts/' rel='bookmark' title='Sitefinity &#8211; New Site Setup DOs and DON&#8217;Ts'>Sitefinity &#8211; New Site Setup DOs and DON&#8217;Ts</a></li>
<li><a href='http://www.mayvelous.com/2011/07/22/sitefinity-linking-external-js-file-in-master-pages/' rel='bookmark' title='Sitefinity &#8211; Linking External JS file in Master pages'>Sitefinity &#8211; Linking External JS file in Master pages</a></li>
<li><a href='http://www.mayvelous.com/2011/05/02/list-storedprocedures-or-database-objects-by-last-modified-date/' rel='bookmark' title='List storedprocedures or database objects by last modified date'>List storedprocedures or database objects by last modified date</a></li>
<li><a href='http://www.mayvelous.com/2011/05/05/checking-sql-server-edition-version/' rel='bookmark' title='Checking SQL Server Edition Version'>Checking SQL Server Edition Version</a></li>
</ul></p></blockquote>]]></content:encoded>
			<wfw:commentRss>http://www.mayvelous.com/2011/08/10/how-to-fix-cruise-build-deployment-that-adds-extra-assemblies-and-nlp-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sitefinity &#8211; Linking External JS file in Master pages</title>
		<link>http://www.mayvelous.com/2011/07/22/sitefinity-linking-external-js-file-in-master-pages/</link>
		<comments>http://www.mayvelous.com/2011/07/22/sitefinity-linking-external-js-file-in-master-pages/#comments</comments>
		<pubDate>Thu, 21 Jul 2011 21:00:18 +0000</pubDate>
		<dc:creator>May</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Bugs and Fixes]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Project Notes]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Master Pages]]></category>
		<category><![CDATA[Sitefinity]]></category>

		<guid isPermaLink="false">http://www.mayvelous.com/?p=594</guid>
		<description><![CDATA[According to this post, we can reference the Sitefinity built-in script libraries and/or external script files in site master page as followed: &#60;sf:JsFileLink id="jsLink" runat="server" ScriptType="jQuery"&#62;&#60;/sf:JsFileLink&#62; &#60;sf:JsFileLink id="jsLink" runat="server" ScriptType="prototype"&#62;&#60;/sf:JsFileLink&#62; &#60;sf:JsFileLink id="jsLink" runat="server" ScriptType="mooTools"&#62;&#60;/sf:JsFileLink&#62; To use it, reference the assembly from the project and add the following code in the master page. &#60;%@ Register Assembly="Telerik.Cms.Web.UI" [...]<blockquote>
<strong>Related Posts:</strong><ul>
<li><a href='http://www.mayvelous.com/2011/07/21/sitefinity-new-site-setup-dos-and-donts/' rel='bookmark' title='Sitefinity &#8211; New Site Setup DOs and DON&#8217;Ts'>Sitefinity &#8211; New Site Setup DOs and DON&#8217;Ts</a></li>
<li><a href='http://www.mayvelous.com/2011/05/05/checking-sql-server-edition-version/' rel='bookmark' title='Checking SQL Server Edition Version'>Checking SQL Server Edition Version</a></li>
<li><a href='http://www.mayvelous.com/2011/05/02/list-storedprocedures-or-database-objects-by-last-modified-date/' rel='bookmark' title='List storedprocedures or database objects by last modified date'>List storedprocedures or database objects by last modified date</a></li>
</ul></blockquote>]]></description>
			<content:encoded><![CDATA[<p>According to <a title="Built-in Libraries in Sitefinity" href="http://www.sitefinity.com/blogs/georgichokov/posts/09-03-25/how_to_use_jquery_and_other_javascript_libraries_in_sitefinity.aspx" rel="externals">this post</a>, we can reference the Sitefinity built-in script libraries and/or external script files in site master page as followed:</p>
<pre>&lt;sf:JsFileLink id="jsLink" runat="server" ScriptType="jQuery"&gt;&lt;/sf:JsFileLink&gt;
&lt;sf:JsFileLink id="jsLink" runat="server" ScriptType="prototype"&gt;&lt;/sf:JsFileLink&gt;
&lt;sf:JsFileLink id="jsLink" runat="server" ScriptType="mooTools"&gt;&lt;/sf:JsFileLink&gt;</pre>
<p>To use it, reference the assembly from the project and add the following code in the master page.</p>
<pre>&lt;%@ Register Assembly="Telerik.Cms.Web.UI" Namespace="Telerik.Cms.Web.UI" TagPrefix="sf" %&gt;</pre>
<p>It didn&#8217;t mention which version of Sitefinity it&#8217;s used at but after testing, found out that it&#8217;s definitly not for our current 4.1 SP2 version. The &#8220;<strong>JsFileLink</strong>&#8221; property is for older version of the sitefinity 3.6 etc which comes from <strong>Telerik.Cms.Web.UI</strong> assembly.</p>
<p>Did a bit more digging around and got the right referencing for 4.1 version.</p>
<p>1. Add this to master page, immediately after Page tag.</p>
<pre>&lt;%@ Register TagPrefix="sf" Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Web.UI.PublicControls"%&gt;</pre>
<p>2. Place the following inside the &#8220;<strong>form</strong>&#8221; tag, NOT in the &#8220;head&#8221; section.</p>
<p>If you have the &#8220;JS&#8221; folder location as mention in <a title="Sitefinity Website template file structure" href="http://www.sitefinity.com/documentation/designers-guide/website-templates-file-structure.aspx" rel="externals">this structure</a>, reference as followed:</p>
<pre>&lt;sf:JavaScriptEmbedControl runat="server" ID="jsLink1" ScriptEmbedPosition="Head" Url="~/Sitefinity/WebsiteTemplates/YourSiteTemplates/JS/test.js"&gt;&lt;/sf:JavaScriptEmbedControl&gt;</pre>
<p>If you have the script folder in your website root, use the following:</p>
<pre>&lt;sf:JavaScriptEmbedControl runat="server" ID="jsLink2" ScriptEmbedPosition="Head" Url="~/scripts/test.js"&gt;&lt;/sf:JavaScriptEmbedControl&gt;</pre>
<p>For built-in JQuery library, reference as followed:</p>
<pre>&lt;sf:JavaScriptEmbedControl runat="server" ID="jQyeryLink" ScriptEmbedPosition="Head" ScriptType="jQuery"&gt;&lt;/sf:JavaScriptEmbedControl&gt;</pre>
<p>3. Must have unique &#8220;<strong>ID</strong>&#8221; and specify &#8220;<strong>ScriptEmbedPosition</strong>&#8221; fields.</p>
<blockquote><p>The JavaScriptEmbedControl will register a script in the selected ScriptEmbedPosition (<strong>Head</strong>, <strong>InPlace</strong>, <strong>BeforeBodyEndTag</strong>). This control is also available in the page editor in the Scripts and Styles toolbox section. You can add references to scripts when editing the page through the UI, and even write inline scripts by hand. <a title="Register JS in Sitefinity Widget" href="http://www.sitefinity.com/devnet/forums/sitefinity-4-x/general-discussions/how-do-i-register-a-javascript-file-in-a-widget.aspx#1453540" rel="externals">ref</a></p></blockquote>
<p><strong>IMPORTANT</strong><br />
Place all the external JS link or code blocks at the end of the page rather than the &#8220;Head&#8221;. ie. use &#8220;<strong>BeforeBodyEndTag</strong>&#8221; for some reason sitefinity loads it&#8217;s own copy of jquery in the middle of the markup and it tends to mess up the rest of the scripts.<br />
eg.</p>
<blockquote><p>&lt;sf:JavaScriptEmbedControl runat=&#8221;server&#8221; ID=&#8221;jQyeryLink&#8221; ScriptEmbedPosition=&#8221;<strong>BeforeBodyEndTag</strong>&#8221; Url=&#8221;~/scripts/jquery.min.js&#8221;&gt;&lt;/sf:JavaScriptEmbedControl&gt;<br />
&lt;sf:JavaScriptEmbedControl runat=&#8221;server&#8221; ID=&#8221;JavaScriptEmbedControl1&#8243; ScriptEmbedPosition=&#8221;<strong>BeforeBodyEndTag</strong>&#8221; Url=&#8221;~/scripts/jquery.cycle.all.js&#8221;&gt;&lt;/sf:JavaScriptEmbedControl&gt;</p></blockquote>
<p><a href="http://www.mayvelous.com"><img src="http://www.mayvelous.com/externals/thanks.gif" alt="Thanks for subscribing Mayvelous.com" border="0" /></a><br /><strong>Sponsor:</strong> <small>(yet to be)</small>: <a href="http://www.dreamhost.com/r.cgi?130793" title="Dreamhost $50 off discount code: 50MV">Dreamhost: Get $50 Off with Discount Code: <strong>50MV</strong></a></p> <blockquote><p><strong>Related Posts:</strong><ul>
<li><a href='http://www.mayvelous.com/2011/07/21/sitefinity-new-site-setup-dos-and-donts/' rel='bookmark' title='Sitefinity &#8211; New Site Setup DOs and DON&#8217;Ts'>Sitefinity &#8211; New Site Setup DOs and DON&#8217;Ts</a></li>
<li><a href='http://www.mayvelous.com/2011/05/05/checking-sql-server-edition-version/' rel='bookmark' title='Checking SQL Server Edition Version'>Checking SQL Server Edition Version</a></li>
<li><a href='http://www.mayvelous.com/2011/05/02/list-storedprocedures-or-database-objects-by-last-modified-date/' rel='bookmark' title='List storedprocedures or database objects by last modified date'>List storedprocedures or database objects by last modified date</a></li>
</ul></p></blockquote>]]></content:encoded>
			<wfw:commentRss>http://www.mayvelous.com/2011/07/22/sitefinity-linking-external-js-file-in-master-pages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sitefinity &#8211; New Site Setup DOs and DON&#8217;Ts</title>
		<link>http://www.mayvelous.com/2011/07/21/sitefinity-new-site-setup-dos-and-donts/</link>
		<comments>http://www.mayvelous.com/2011/07/21/sitefinity-new-site-setup-dos-and-donts/#comments</comments>
		<pubDate>Thu, 21 Jul 2011 07:08:28 +0000</pubDate>
		<dc:creator>May</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Bugs and Fixes]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Project Notes]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[Project Setup]]></category>
		<category><![CDATA[References]]></category>
		<category><![CDATA[Sitefinity]]></category>
		<category><![CDATA[Solution]]></category>

		<guid isPermaLink="false">http://www.mayvelous.com/?p=589</guid>
		<description><![CDATA[The followings are things to note while create a new sitefinity sites. Name the solution. Open the solution via Sitefinity Project Manager and save the solution in the project folder with proper name Set up DB with appropriate name. Click &#8220;Browse&#8221; on the Project Manager to set up the DB. Add all references as solution [...]<blockquote>
<strong>Related Posts:</strong><ul>
<li><a href='http://www.mayvelous.com/2011/05/02/list-storedprocedures-or-database-objects-by-last-modified-date/' rel='bookmark' title='List storedprocedures or database objects by last modified date'>List storedprocedures or database objects by last modified date</a></li>
<li><a href='http://www.mayvelous.com/2011/05/05/checking-sql-server-edition-version/' rel='bookmark' title='Checking SQL Server Edition Version'>Checking SQL Server Edition Version</a></li>
</ul></blockquote>]]></description>
			<content:encoded><![CDATA[<p>The followings are things to note while create a new sitefinity sites.</p>
<p><strong>Name the solution.</strong><br />
Open the solution via Sitefinity Project Manager and save the solution in the project folder with proper name</p>
<p><strong>Set up DB with appropriate name.</strong><br />
Click &#8220;Browse&#8221; on the Project Manager to set up the DB.</p>
<p><strong>Add all references as solution items.</strong><br />
Copy all reference DLLs from the bin folder of the project to the &#8220;Lib&#8221; folder. Add them under solution folder items.</p>
<p><a title="Sitefinity Initial Setup" href="http://www.flickr.com/photos/mayvelous/5960457026/" rel="external"><img src="http://farm7.static.flickr.com/6009/5960457026_9f1c8bcb21_m.jpg" alt="Sitefinity Initial Setup" width="240" height="213" /></a></p>
<p><strong>Repoint/Rereference the dlls from &#8220;Lib&#8221; folder</strong><br />
Remove all sitefinity related references from the project and rereferences them from the &#8220;Lib&#8221; folder.<br />
<strong>Tip</strong>: The easiest way to reference the sitefinity related dlls to the project file would be:<br />
- open the project file in the notepad<br />
- search for &#8220;bin\&#8221;<br />
- replace the appropriate dll refernces with &#8220;..\Lib\&#8221;<br />
<strong>DO NOT</strong> hit &#8220;Replace All&#8221; as not all places require replacement.<br />
All sitefinity related dlls will be rereferenced to correct folder EXCLUDING AjaxControlToolkit and a few others.<br />
Search for the followings:</p>
<blockquote><p>..\Reference Assemblies\AjaxControlToolkit.dll<br />
..\Reference Assemblies\Microsoft\WindowsAzure\Microsoft.WindowsAzure.Diagnostics.dll<br />
..\Reference Assemblies\Microsoft\WindowsAzure\Microsoft.WindowsAzure.ServiceRuntime.dll<br />
..\Reference Assemblies\Microsoft\WindowsAzure\Microsoft.WindowsAzure.StorageClient.dll</p></blockquote>
<p>and repoint to Lib folder as well.<br />
<strong>Note</strong>: Everytime you do the upgrade or add a custom dlls, make sure to add/update them in the Lib folder and repoint the project references to Lib.</p>
<p><strong>Rename the Assembly and DefaultNameSpace with the project name</strong><br />
Right click on the project &gt; Properties &gt; Application tab &gt; Type in project name in the &#8220;Assembly name&#8221; and &#8220;Default namespace&#8221; textboxes.</p>
<p><a title="Rename Assembly" href="http://www.flickr.com/photos/mayvelous/5960457046/" rel="externals"><img src="http://farm7.static.flickr.com/6145/5960457046_bd748dfe22_m.jpg" alt="Rename Assembly" width="240" height="81" /></a></p>
<p><strong>Build the solution</strong><br />
If the aboves are done correctly, your solution will build successfully and once browsed, will display &#8220;Thank you for visiting our web site. Please return soon for updates.&#8221;<br />
Else you&#8217;ll get the error mentioned in the DON&#8217;T section below.</p>
<p><strong>DON&#8217;T</strong></p>
<p><strong>Don&#8217;t use dots &#8220;.&#8221; in the project name.</strong><br />
Current version throws error when using dots in the project name.<br />
<strong>Don&#8217;t build the solution before repointing the references.</strong><br />
After creating a new sitefinity site using Sitefinity Project Manager, do not build the project or solution as it will overwrite the dlls from the bin folder and throw the following error.<br />
_&#8221;Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.&#8221;_ <a title="Data Reference Error" href="http://www.sitefinity.com/devnet/forums/sitefinity-4-x/bugs-issues/422014.aspxhttp://www.sitefinity.com/devnet/forums/sitefinity-4-x/bugs-issues/telerik-openaccess-mysql-data-reference-error.aspx" rel="externals">Ref</a></p>
<p><a href="http://www.mayvelous.com"><img src="http://www.mayvelous.com/externals/thanks.gif" alt="Thanks for subscribing Mayvelous.com" border="0" /></a><br /><strong>Sponsor:</strong> <small>(yet to be)</small>: <a href="http://www.dreamhost.com/r.cgi?130793" title="Dreamhost $50 off discount code: 50MV">Dreamhost: Get $50 Off with Discount Code: <strong>50MV</strong></a></p> <blockquote><p><strong>Related Posts:</strong><ul>
<li><a href='http://www.mayvelous.com/2011/05/02/list-storedprocedures-or-database-objects-by-last-modified-date/' rel='bookmark' title='List storedprocedures or database objects by last modified date'>List storedprocedures or database objects by last modified date</a></li>
<li><a href='http://www.mayvelous.com/2011/05/05/checking-sql-server-edition-version/' rel='bookmark' title='Checking SQL Server Edition Version'>Checking SQL Server Edition Version</a></li>
</ul></p></blockquote>]]></content:encoded>
			<wfw:commentRss>http://www.mayvelous.com/2011/07/21/sitefinity-new-site-setup-dos-and-donts/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Checking SQL Server Edition Version</title>
		<link>http://www.mayvelous.com/2011/05/05/checking-sql-server-edition-version/</link>
		<comments>http://www.mayvelous.com/2011/05/05/checking-sql-server-edition-version/#comments</comments>
		<pubDate>Wed, 04 May 2011 23:59:13 +0000</pubDate>
		<dc:creator>May</dc:creator>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[scripts]]></category>
		<category><![CDATA[SQL Management Studio]]></category>
		<category><![CDATA[SQL Server Versions]]></category>

		<guid isPermaLink="false">http://www.mayvelous.com/?p=587</guid>
		<description><![CDATA[While working on this one release, I had to do lots of backup, restore, and scripts for different database server versions. Run this script a lot today. Noted that this script is very handy to check out the server edition and version. select serverproperty('edition') select @@version And another annoying thing I found is that when you [...]<blockquote>
<strong>Related Posts:</strong><ul>
<li><a href='http://www.mayvelous.com/2011/05/02/list-storedprocedures-or-database-objects-by-last-modified-date/' rel='bookmark' title='List storedprocedures or database objects by last modified date'>List storedprocedures or database objects by last modified date</a></li>
</ul></blockquote>]]></description>
			<content:encoded><![CDATA[<p>While working on this one release, I had to do lots of backup, restore, and scripts for different database server versions. Run this script a lot today. Noted that this script is very handy to check out the server edition and version.</p>
<p><code>select serverproperty('edition')<br />
select @@version</code></p>
<p>And another annoying thing I found is that when you script the whole database with schema + data, it generates huge script file which sometimes cannot open in SQL Management Studio and even if the file gets opened, cannot execute it due to not enough memory problem. So found out that I cannot solve the problem of restoring backups on different servers by scripting whole db.</p>
<p><a href="http://www.mayvelous.com"><img src="http://www.mayvelous.com/externals/thanks.gif" alt="Thanks for subscribing Mayvelous.com" border="0" /></a><br /><strong>Sponsor:</strong> <small>(yet to be)</small>: <a href="http://www.dreamhost.com/r.cgi?130793" title="Dreamhost $50 off discount code: 50MV">Dreamhost: Get $50 Off with Discount Code: <strong>50MV</strong></a></p> <blockquote><p><strong>Related Posts:</strong><ul>
<li><a href='http://www.mayvelous.com/2011/05/02/list-storedprocedures-or-database-objects-by-last-modified-date/' rel='bookmark' title='List storedprocedures or database objects by last modified date'>List storedprocedures or database objects by last modified date</a></li>
</ul></p></blockquote>]]></content:encoded>
			<wfw:commentRss>http://www.mayvelous.com/2011/05/05/checking-sql-server-edition-version/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>List storedprocedures or database objects by last modified date</title>
		<link>http://www.mayvelous.com/2011/05/02/list-storedprocedures-or-database-objects-by-last-modified-date/</link>
		<comments>http://www.mayvelous.com/2011/05/02/list-storedprocedures-or-database-objects-by-last-modified-date/#comments</comments>
		<pubDate>Mon, 02 May 2011 04:23:33 +0000</pubDate>
		<dc:creator>May</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[query]]></category>
		<category><![CDATA[storedprocedures]]></category>
		<category><![CDATA[system objects]]></category>

		<guid isPermaLink="false">http://www.mayvelous.com/?p=584</guid>
		<description><![CDATA[I learnt something new today. I needed to make a release which includes lots of changes to DB over 3 months period and needed a quick way to figure out which staging db objects to move across to the production. I wished many times to list storedprocedures by last modified date but stupid enough never [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<p>I learnt something new today. I needed to make a release which includes lots of changes to DB over 3 months period and needed a quick way to figure out which staging db objects to move across to the production.</p>
<p>I wished many times to list storedprocedures by last modified date but stupid enough never Google it and just did the painful way of noting down and scripting  them. Then I face the problem of all those script files keep piling up over the period of time and lost track of which scripts have been executed or not.</p>
<p>Today I&#8217;m in a bit of sensible mode and did a quick googling and found this useful script, so I&#8217;m posting here for later reference.</p>
<p><strong>Listing last modified storedprocedures</strong><br />
<code>select name, create_date, modify_date<br />
from sys.procedures<br />
order by modify_date desc</code></p>
<p><strong>Listing last modified tables</strong><br />
<code>select name, create_date, modify_date<br />
from sys.tables<br />
order by modify_date desc</code></p>
<p><strong>Listing db objects by type and date</strong><br />
<code>SELECT *<br />
FROM sys.objects<br />
WHERE type in ('P', 'U')<br />
AND DATEDIFF(D,modify_date, GETDATE()) &lt; 90</code></p>
<p>Type &#8220;P&#8221; is for storedprocedures and &#8220;U&#8221; for tables. More on available Types: <a title="sys.object" rel="external" href="http://msdn.microsoft.com/en-us/library/ms190324.aspx">http://msdn.microsoft.com/en-us/library/ms190324.aspx</a></p>
<p>Now that I know which objects have been last updated, I can do the DB script very easily by just selecting those objects. Sweet isn&#8217;t it? <img src='http://www.mayvelous.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><a href="http://www.mayvelous.com"><img src="http://www.mayvelous.com/externals/thanks.gif" alt="Thanks for subscribing Mayvelous.com" border="0" /></a><br /><strong>Sponsor:</strong> <small>(yet to be)</small>: <a href="http://www.dreamhost.com/r.cgi?130793" title="Dreamhost $50 off discount code: 50MV">Dreamhost: Get $50 Off with Discount Code: <strong>50MV</strong></a></p> <p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.mayvelous.com/2011/05/02/list-storedprocedures-or-database-objects-by-last-modified-date/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>System.Web.UI.HtmlControls.HtmlGenericControl</title>
		<link>http://www.mayvelous.com/2011/01/05/system-web-ui-htmlcontrols-htmlgenericcontrol/</link>
		<comments>http://www.mayvelous.com/2011/01/05/system-web-ui-htmlcontrols-htmlgenericcontrol/#comments</comments>
		<pubDate>Wed, 05 Jan 2011 04:08:33 +0000</pubDate>
		<dc:creator>May</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Asp.net]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Project Notes]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[System.Web.UI.HtmlControls.HtmlGenericControl]]></category>

		<guid isPermaLink="false">http://www.mayvelous.com/?p=572</guid>
		<description><![CDATA[I learn something new today (I&#8217;m sure most of you already know, but I just found out). I didn&#8217;t know we can use html tags such as div, span etc as html server controls. I do know if you want to convert html controls into server control, you just have to add runat=&#8221;server&#8221; element but [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<p>I learn something new today (I&#8217;m sure most of you already know, but I just found out). I didn&#8217;t know we can use html tags such as div, span etc as html server controls. I do know if you want to convert html controls into server control, you just have to add runat=&#8221;server&#8221; element but using div container as server control is a different story.</p>
<p>I normally use literal or panel server controls to show or hide the confirmation messages. But in this code, the div tag can act as a panel control by declaring it as HtmlGenericControl.</p>
<p>In the front-end you add id and runat=&#8221;server&#8221; elements to the div tag.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;fieldset&gt;
	&lt;h3&gt;Registration Validation&lt;/h3&gt;
	&lt;div id=&quot;divValidated&quot; runat=&quot;server&quot;&gt;
		Your account has been validated. You may now log in.
	&lt;/div&gt;
	&lt;div id=&quot;divNoAccount&quot; runat=&quot;server&quot;&gt;
		No matching account. If it has been over 30 days since you registered your
		account will have been deleted. Please sign up again.
	&lt;/div&gt;
	&lt;div id=&quot;divNoNeed&quot; runat=&quot;server&quot;&gt;
		Your account has already been validated.
	&lt;/div&gt;
&lt;/fieldset&gt;
</pre>
<p>In the back-end you declare it as HtmlGenericControl.</p>
<pre class="brush: csharp; title: ; notranslate">
protected System.Web.UI.HtmlControls.HtmlGenericControl divValidated;
protected System.Web.UI.HtmlControls.HtmlGenericControl divNoAccount;
protected System.Web.UI.HtmlControls.HtmlGenericControl divNoNeed;
</pre>
<p>Voila, you got your div panel with all those member variables you can make use of. So here is a little info on <strong>HtmlGenericControl</strong>.</p>
<blockquote><p>Use this class to represent an HTML server control element not directly represented by a .NET Framework class, such as <strong>&lt;span&gt;</strong>, <strong>&lt;div&gt;</strong>, <strong>&lt;body&gt;</strong>, or <strong>&lt;font&gt;</strong>.<br />
<strong><span>Caution</span></strong><br />
<span>This control can be used to display user input, which might include malicious client script. Check any information that is sent from a client for executable script, SQL statements, or other code before displaying it in your application. ASP.NET provides an input request validation feature to block script and HTML in user input. Validation server controls are also provided to assess user input.<br />
<a title="HtmlGenericControl Class" href="http://msdn.microsoft.com/en-us/library/system.web.ui.htmlcontrols.htmlgenericcontrol.aspx" target="_blank">HtmlGenericControl Class</a><br />
<a title="HtmlGenericControl Members" href="http://msdn.microsoft.com/en-us/library/system.web.ui.htmlcontrols.htmlgenericcontrol_members%28v=vs.71%29.aspx" target="_blank">HtmlGenericControl Members</a><br />
</span></p></blockquote>
<p>Pretty cool isn&#8217;t it? Well, I didn&#8217;t know that and now I know. <img src='http://www.mayvelous.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p><a href="http://www.mayvelous.com"><img src="http://www.mayvelous.com/externals/thanks.gif" alt="Thanks for subscribing Mayvelous.com" border="0" /></a><br /><strong>Sponsor:</strong> <small>(yet to be)</small>: <a href="http://www.dreamhost.com/r.cgi?130793" title="Dreamhost $50 off discount code: 50MV">Dreamhost: Get $50 Off with Discount Code: <strong>50MV</strong></a></p> <p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.mayvelous.com/2011/01/05/system-web-ui-htmlcontrols-htmlgenericcontrol/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Adding Contact Form on Blogger or Blogspot blogs with Google Form</title>
		<link>http://www.mayvelous.com/2009/02/19/adding-contact-form-on-blogger-or-blogspot-blogs-with-google-form/</link>
		<comments>http://www.mayvelous.com/2009/02/19/adding-contact-form-on-blogger-or-blogspot-blogs-with-google-form/#comments</comments>
		<pubDate>Thu, 19 Feb 2009 03:42:45 +0000</pubDate>
		<dc:creator>May</dc:creator>
				<category><![CDATA[Bloggers]]></category>
		<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Blogger Contact Form]]></category>
		<category><![CDATA[Contact]]></category>
		<category><![CDATA[Google Form]]></category>
		<category><![CDATA[Zatlite]]></category>

		<guid isPermaLink="false">http://www.mayvelous.com/?p=519</guid>
		<description><![CDATA[I fell in love with Google Forms for quite some time now. I&#8217;ve been making a good use of it in number of occations such as software borrowing register, our company seminar registration forms and even for a small lunch pack order form like this one I&#8217;ve created for my friend&#8217;s Lovo order. Last weekend [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<p>I fell in love with Google Forms for quite some time now. I&#8217;ve been making a good use of it in number of occations such as <a href="http://www.mayvelous.com/2008/07/21/inet-software-borrowing-register/" title="Inet Software Borrowing Register" rel="external">software borrowing register</a>, our company seminar registration forms and even for a small lunch pack order form like this one I&#8217;ve created for <a href="https://spreadsheets.google.com/viewform?formkey=cFZkT2pfdTdYY0lFTGZJZ182U1RQQ1E6MA" title="Tulele Lovo" rel="external">my friend&#8217;s Lovo order</a>.<span id="more-519"></span></p>
<p><a href="http://www.flickr.com/photos/mayvelous/3292128758/" title="create new google form by mayvelous, on Flickr" rel="external"><img src="http://farm4.static.flickr.com/3385/3292128758_152a5ffe1d_o.jpg" width="168" height="218" alt="create new google form" align="left" /></a>Last weekend while I was changing <a href="http://zatlite.blogspot.com" title="zatlite blog" rel="external">Zatlite&#8217;s blog</a> template, I thought of adding a <a href="http://zatlite.blogspot.com/2009/02/contact.html" title="Contact Zatlite" rel="external">contact page</a> for him. Blogger/blogspot blogs don&#8217;t allow editing server side scripts so you can&#8217;t really add an email contact form and such but ofcos there&#8217;s always many tricks to go about. Some bloggers use <a href="http://kontactr.com/" title="Kontactr" rel="external">Kontactr</a> or <a href="http://www.zoho.com/" title="zoho.com" rel="external">Zoho</a> contact form scripts. They require a registration to their site and have to put up a power by logo on your form. I&#8217;m too lazy to register so never really tried those out but chose an easier way to add a contact form on blogger using my favorite Google Forms.</p>
<p>Google Forms are just so easy to create and everything can be done in your google account. Here are brief steps to add a Google form as blogger contact form.</p>
<ul>
<li>Go to <a href="http://docs.google.com" title="Google Docs" rel="external">http://docs.google.com</a>,</li>
<li>Click New > Form (or) From Template option,</li>
<li>Enter form title and brief description, then add your form fields; make some required fields. </li>
<li>Under &#8220;See responses&#8221; button, you can check form &#8220;Summary&#8221; or &#8220;Spreadsheet&#8221; where the submitted data is stored.</li>
<li>You can grab the embedded code under &#8220;More actions&#8221; > &#8220;Embed&#8221; option or add a proper form submit confirmation message by clicking &#8220;Edit Confirmation&#8221; option.</li>
<li>Live form can be viewed by clicking the link at the bottom of the page. That&#8217;s the link you send to your friends too.</li>
<li>Create a new post, eg. &#8220;Contact me&#8221;, on your blog; choose HTML view, paste the embedded code in; publish your post.</li>
<li>If you want to move your contact post from the first page, just change the publish date to earlier dates and the post will be hidden then you can link it from your menu</li>
</ul>
<p align="center"><a href="http://www.flickr.com/photos/mayvelous/3291311247/" title="edit google form by mayvelous, on Flickr" rel="external"><img src="http://farm4.static.flickr.com/3076/3291311247_b7acb3b92a_m.jpg" width="240" height="144" alt="edit google form" /></a><br /><a href="http://www.flickr.com/photos/mayvelous/3291311307/" title="set notification rule by mayvelous, on Flickr" rel="external"><img src="http://farm4.static.flickr.com/3478/3291311307_c37653e443_m.jpg" width="240" height="210" alt="set notification rule" /></a></p>
<p>Once you&#8217;ve created your form, you need to know when the user submit to your form as soon as the submission is done. To do that, go to the related &#8220;Spreadsheet&#8221; by clicking &#8220;See responses&#8221; > &#8220;Spreadsheet&#8221; option from the Edit Form page or go directly from your google documents page. Click on &#8220;Share&#8221; blue button dropdownlist, click &#8220;Set notification rules&#8221; option. Set the rules as required and you are all set.</p>
<p>Ofcos&#8217; the bad side of having Google form is that, you can&#8217;t style the text-boxes, the width are all the same. Well&#8230;maybe you can if you read through documentation or something but I&#8217;m too lazy to do that so may be some other time. And also it does not protect your form from spammers. There&#8217;s no CAPTCHA or nothing; hence only good to use it on small/starter blogs. Zatlite blog doesn&#8217;t have many visitors/hits yet so he won&#8217;t get much spams; and I don&#8217;t really care if he gets spams either. I&#8217;ve done my work of adding contact form, the rest is up to him. <img src='http://www.mayvelous.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' />  If you want those contact forms with CAPTCHA then try those two mentioned above.</p>
<p>A few more idea to make good use of Google Form is that, having a post suggestion form on your side bar or a small site survey form etc. Here is a small suggestion for <a href="http://myanmarblogdirectory.blogspot.com/" title="Myanmar Blogs Directory" rel="external">Myanmar Blogs Directory</a> blogs to make use of Google Form. Instead of letting people leave their blog links for submission in the comment form, it&#8217;s good to have a proper form to collect the blog information such, &#8220;Blog Name&#8221;, &#8220;Category&#8221;, &#8220;Blogger Name&#8221;, &#8220;Brief Description&#8221; etc. Create a nice form and embed the code in the side bar or in a new post and start collecting new blogs information in a neat excel sheet which can later easily exported into a proper database if they plan to create a searchable directory. Oh well, just my worthless 2cents.</p>
<p>There you have it, give it a try won&#8217;t you?. And do share your ideas/how you use google docs too.</p>
<p><a href="http://www.mayvelous.com"><img src="http://www.mayvelous.com/externals/thanks.gif" alt="Thanks for subscribing Mayvelous.com" border="0" /></a><br /><strong>Sponsor:</strong> <small>(yet to be)</small>: <a href="http://www.dreamhost.com/r.cgi?130793" title="Dreamhost $50 off discount code: 50MV">Dreamhost: Get $50 Off with Discount Code: <strong>50MV</strong></a></p> <p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.mayvelous.com/2009/02/19/adding-contact-form-on-blogger-or-blogspot-blogs-with-google-form/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
	</channel>
</rss>

