<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Chintan Jajal</title>
	<atom:link href="http://jajalc.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://jajalc.wordpress.com</link>
	<description>Sharepoint &#38; .NET Blogs!!!</description>
	<lastBuildDate>Thu, 14 Oct 2010 03:18:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='jajalc.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Chintan Jajal</title>
		<link>http://jajalc.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://jajalc.wordpress.com/osd.xml" title="Chintan Jajal" />
	<atom:link rel='hub' href='http://jajalc.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Expose RIA Services as WCF with .NET 4</title>
		<link>http://jajalc.wordpress.com/2010/10/14/expose-ria-services-as-wcf-with-net-4/</link>
		<comments>http://jajalc.wordpress.com/2010/10/14/expose-ria-services-as-wcf-with-net-4/#comments</comments>
		<pubDate>Thu, 14 Oct 2010 03:09:15 +0000</pubDate>
		<dc:creator>Chintan Jajal</dc:creator>
				<category><![CDATA[asp.net]]></category>
		<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://jajalc.wordpress.com/?p=68</guid>
		<description><![CDATA[Developing RIA/Silverlight solution, we faced a problem when we wanted to consume the same RIA Service in Biztalk integration process. Below is a quick fix, which allows RIA service to be consumed as a WCF Service. Add the following in your end point on RIA Host Service. You will need to have the latest version [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jajalc.wordpress.com&amp;blog=6613475&amp;post=68&amp;subd=jajalc&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Developing RIA/Silverlight solution, we faced a problem when we wanted to consume the same RIA Service in Biztalk integration process.</p>
<p>Below is a quick fix, which allows RIA service to be consumed as a WCF Service.</p>
<p>Add the following in your end point on RIA Host Service. You will need to have the latest version of RIA Services installed.<br />
<span style="color:#0000ff;"></span></p>
<p><span style="color:#0000ff;"><code>&lt;endpoints&gt;        &lt;add name="OData" type="System.ServiceModel.DomainServices.Hosting.ODataEndpointFactory, System.ServiceModel.DomainServices.Hosting.OData, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /&gt;      &lt;/endpoints&gt;</code></span></p>
<p><span style="color:#0000ff;"></span><br />
Also add Reference to Microsoft.ServiceModel.DomainServices.Hosting in RIA Web project.</p>
<p>Happy Coding!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jajalc.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jajalc.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jajalc.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jajalc.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jajalc.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jajalc.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jajalc.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jajalc.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jajalc.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jajalc.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jajalc.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jajalc.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jajalc.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jajalc.wordpress.com/68/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jajalc.wordpress.com&amp;blog=6613475&amp;post=68&amp;subd=jajalc&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jajalc.wordpress.com/2010/10/14/expose-ria-services-as-wcf-with-net-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/44dc02df284375f39b7d9ab697f0a92d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jajalc</media:title>
		</media:content>
	</item>
		<item>
		<title>COGNOS with JQUERY</title>
		<link>http://jajalc.wordpress.com/2010/10/13/cognos-with-jquery/</link>
		<comments>http://jajalc.wordpress.com/2010/10/13/cognos-with-jquery/#comments</comments>
		<pubDate>Wed, 13 Oct 2010 23:24:19 +0000</pubDate>
		<dc:creator>Chintan Jajal</dc:creator>
				<category><![CDATA[COGNOS]]></category>

		<guid isPermaLink="false">http://jajalc.wordpress.com/?p=65</guid>
		<description><![CDATA[While working on creating custom navigation in COGNOS, we tried to use Jquery to do the client side rendering of the menu, but Jquery just wont work with COGNOS Javascript. This was because javascript was conflicting with COGNOS js scripts and below is a quick fix. Put the below code in your HTML code. var [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jajalc.wordpress.com&amp;blog=6613475&amp;post=65&amp;subd=jajalc&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>While working on creating custom navigation in COGNOS, we tried to use Jquery to do the client side rendering of the menu, but Jquery just wont work with COGNOS Javascript.</p>
<p>This was because javascript was conflicting with COGNOS js scripts and below is a quick fix.</p>
<p>Put the below code in your HTML code.</p>
<p>var $x = jQuery.noConflict();<br />
 $x(document).ready(function () {<br />
		        //$x(&#8220;&#8221;);<br />
		    });<br />
All your jquery manipulation needs to use &#8220;$x&#8221; as prefix.</p>
<p>Hope this helps!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jajalc.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jajalc.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jajalc.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jajalc.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jajalc.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jajalc.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jajalc.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jajalc.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jajalc.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jajalc.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jajalc.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jajalc.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jajalc.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jajalc.wordpress.com/65/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jajalc.wordpress.com&amp;blog=6613475&amp;post=65&amp;subd=jajalc&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jajalc.wordpress.com/2010/10/13/cognos-with-jquery/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/44dc02df284375f39b7d9ab697f0a92d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jajalc</media:title>
		</media:content>
	</item>
		<item>
		<title>Step 5 : Failed to register SharePoint services</title>
		<link>http://jajalc.wordpress.com/2010/05/02/failed-to-register-sharepoint-services-2010/</link>
		<comments>http://jajalc.wordpress.com/2010/05/02/failed-to-register-sharepoint-services-2010/#comments</comments>
		<pubDate>Sun, 02 May 2010 02:12:10 +0000</pubDate>
		<dc:creator>Chintan Jajal</dc:creator>
				<category><![CDATA[Sharepoint]]></category>

		<guid isPermaLink="false">http://jajalc.wordpress.com/?p=57</guid>
		<description><![CDATA[Recently I tried to install Sharepoint 2010 on a brand new Win2008 with AD installed&#8230; I also made sure that all the prerequisites are installed, but during the Sharepoint configuration wizard, I got Failed to register SharePoint services. An exception of type System.ServiceProcess.TimeoutException was thrown.  Additional exception information: Time out has expired and the operation [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jajalc.wordpress.com&amp;blog=6613475&amp;post=57&amp;subd=jajalc&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Recently I tried to install Sharepoint 2010 on a brand new Win2008 with AD installed&#8230;</p>
<p>I also made sure that all the <em>prerequisites </em>are installed, but during the Sharepoint configuration wizard, I got</p>
<p><code>Failed to register SharePoint services.<br />
An exception of type  System.ServiceProcess.TimeoutException was thrown.  Additional exception  information: Time out has expired and the operation has not been  completed.<br />
System.ServiceProcess.TimeoutException: Time out has  expired and the operation has not been completed.</code></p>
<p><strong>It happened while registering &#8220;SharePoint Foundation Search V4&#8243; and &#8220;Sharepoint Server Search 14&#8243;. The log file, which wizard refers to is not really that helpful!<br />
</strong></p>
<p>After trying couple of times with no luck, I just changed the user name under which the service runs from <strong>&#8220;Local Services&#8221;</strong> to <strong>&#8220;Local System&#8221;</strong> and also starting the services, while the wizard was running.  Just make sure that you start the service while the wizard is still running and is on Step 5.</p>
<p>This fixed the problem..</p>
<p>Good luck!!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jajalc.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jajalc.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jajalc.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jajalc.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jajalc.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jajalc.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jajalc.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jajalc.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jajalc.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jajalc.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jajalc.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jajalc.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jajalc.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jajalc.wordpress.com/57/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jajalc.wordpress.com&amp;blog=6613475&amp;post=57&amp;subd=jajalc&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jajalc.wordpress.com/2010/05/02/failed-to-register-sharepoint-services-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/44dc02df284375f39b7d9ab697f0a92d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jajalc</media:title>
		</media:content>
	</item>
		<item>
		<title>Update Master Page Gallery in Publishing site</title>
		<link>http://jajalc.wordpress.com/2009/08/20/update-master-page-gallery-in-publishing-site/</link>
		<comments>http://jajalc.wordpress.com/2009/08/20/update-master-page-gallery-in-publishing-site/#comments</comments>
		<pubDate>Thu, 20 Aug 2009 00:48:44 +0000</pubDate>
		<dc:creator>Chintan Jajal</dc:creator>
				<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[CheckOut]]></category>
		<category><![CDATA[Master Page Gallery]]></category>
		<category><![CDATA[publishing site]]></category>
		<category><![CDATA[site definition]]></category>
		<category><![CDATA[source control]]></category>
		<category><![CDATA[SPList]]></category>
		<category><![CDATA[SPListItem]]></category>
		<category><![CDATA[update master page gallery]]></category>

		<guid isPermaLink="false">http://jajalc.wordpress.com/?p=49</guid>
		<description><![CDATA[There are times when you have a requirement of only selecting &#8220;Custom Page layouts&#8221; when a user wants to create a new page in Sharepoint Portal site. I won&#8217;t go in details of how to adding and deploying new custom page layouts using feature,  but you can refer here for it : http://blogs.msdn.com/syedi/archive/2008/08/01/custom-site-definition-for-collaboration-portal-template-sharepoint-2007-wow-moss.aspx http://spreflections.wordpress.com/2008/09/24/deploy-master-page-and-page-layout-as-a-feature/ Once [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jajalc.wordpress.com&amp;blog=6613475&amp;post=49&amp;subd=jajalc&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>There are times when you have a requirement of <strong>only </strong>selecting &#8220;Custom Page layouts&#8221; when a user wants to create a new page in Sharepoint Portal site.</p>
<p>I won&#8217;t go in details of how to adding and deploying new custom page layouts using feature,  but you can refer here for it :</p>
<p><a href="http://blogs.msdn.com/syedi/archive/2008/08/01/custom-site-definition-for-collaboration-portal-template-sharepoint-2007-wow-moss.aspx">http://blogs.msdn.com/syedi/archive/2008/08/01/custom-site-definition-for-collaboration-portal-template-sharepoint-2007-wow-moss.aspx</a><br />
<a href="http://spreflections.wordpress.com/2008/09/24/deploy-master-page-and-page-layout-as-a-feature/">http://spreflections.wordpress.com/2008/09/24/deploy-master-page-and-page-layout-as-a-feature/</a></p>
<p>Once you have a added a custom page layout, you don&#8217;t want the user to pick from any sharepoint built-in page layouts.</p>
<p>To achieve that functionality you can mark those layout types to be hidden on the feature activation code. As all the page layouts are item in a list which is source controlled via sharepoint you will need to check out the file and then only update the &#8220;Hidden Page&#8221; attribute.</p>
<p>here is how you can ahcieve it.</p>
<p><code><br />
using (SPWeb web = site.OpenWeb())<br />
                {<br />
                    web.AllowUnsafeUpdates = true;<br />
                    SPList list = web.Lists["Master Page Gallery"];<br />
                    foreach (SPListItem item in list.Items)<br />
                    {<br />
                        //Note that if your page layout's content type needs to be different<br />
                        if (item["Associated Content Type"] != null &amp;&amp; (item["Associated Content Type"].ToString().IndexOf("Article Page") != -1<br />
                            || item["Associated Content Type"].ToString().IndexOf("Welcome") != -1))<br />
                        {<br />
                            item.File.CheckOut();<br />
                            item["Hidden Page"] = "True";<br />
                            item.Update();<br />
                            item.File.CheckIn("");<br />
                        }<br />
                    }<br />
                    list.Update();<br />
                    web.Update();<br />
                }<br />
</code></p>
<p>now when the feature is activated, user will only be able to see custom page layouts.</p>
<p>Good luck!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jajalc.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jajalc.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jajalc.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jajalc.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jajalc.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jajalc.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jajalc.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jajalc.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jajalc.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jajalc.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jajalc.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jajalc.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jajalc.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jajalc.wordpress.com/49/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jajalc.wordpress.com&amp;blog=6613475&amp;post=49&amp;subd=jajalc&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jajalc.wordpress.com/2009/08/20/update-master-page-gallery-in-publishing-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/44dc02df284375f39b7d9ab697f0a92d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jajalc</media:title>
		</media:content>
	</item>
		<item>
		<title>Delete files after upload using swfupload (multiple file upload)</title>
		<link>http://jajalc.wordpress.com/2009/02/19/delete-files-after-upload-using-swfupload/</link>
		<comments>http://jajalc.wordpress.com/2009/02/19/delete-files-after-upload-using-swfupload/#comments</comments>
		<pubDate>Thu, 19 Feb 2009 00:36:58 +0000</pubDate>
		<dc:creator>Chintan Jajal</dc:creator>
				<category><![CDATA[asp.net]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[ajax style upload]]></category>
		<category><![CDATA[delete file]]></category>
		<category><![CDATA[delete swfupload]]></category>
		<category><![CDATA[file picker]]></category>
		<category><![CDATA[multiple file upload]]></category>
		<category><![CDATA[swfupload]]></category>
		<category><![CDATA[swfupload file delete]]></category>
		<category><![CDATA[upload file]]></category>
		<category><![CDATA[upload file to server]]></category>

		<guid isPermaLink="false">http://jajalc.wordpress.com/?p=21</guid>
		<description><![CDATA[SWFUpload is a very handy tool, if you had to upload multiple files. More info on SWFUpload and implementation details can be found at http://www.swfupload.org/ With SWFUPload once the file is uploaded there is no actual implementation (i have come across ) to delete file once uploaded. I have implemented this using asp.net, but it [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jajalc.wordpress.com&amp;blog=6613475&amp;post=21&amp;subd=jajalc&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>SWFUpload is a very handy tool, if you had to upload multiple files. More info on SWFUpload and implementation details can be found at <a href="http://www.swfupload.org/">http://www.swfupload.org/</a></p>
<p>With SWFUPload once the file is uploaded there is no actual implementation (i have come across ) to delete file once uploaded. I have implemented this using asp.net, but it wont be hard to convert that to different web technologies. In this implementation i have used jquery (<a href="http://jquery.com/">http://jquery.com/</a>) to handle delete file-function.</p>
<p>Some of the files are modified  for demostration purpose. You can enhance it accordingly. In this example i havn&#8217;t created any custom control to keep things simple, but there are many implementation of SWFUPload as asp.net custom control.</p>
<p><img class="alignnone size-full wp-image-39" title="19-02-2009-11-11-561" src="http://jajalc.files.wordpress.com/2009/02/19-02-2009-11-11-561.gif?w=630" alt="19-02-2009-11-11-561"   /></p>
<p>(fileprogress.js)</p>
<p><img class="alignnone size-full wp-image-40" title="19-02-2009-11-02-081" src="http://jajalc.files.wordpress.com/2009/02/19-02-2009-11-02-081.gif?w=630" alt="19-02-2009-11-02-081"   /></p>
<p>The logic is quite simple to delete the files. Once the files are uploaded setComplete function is invoked &amp; in that, we will need to attach a DIV &amp; an anchor tag for delete link.</p>
<p>(deletefile.ashx)</p>
<p><img class="alignnone size-full wp-image-41" title="19-02-2009-11-09-061" src="http://jajalc.files.wordpress.com/2009/02/19-02-2009-11-09-061.gif?w=630" alt="19-02-2009-11-09-061"   /></p>
<p>Attached are all the zip files created in VS.NET 2008.</p>
<ul>
<li>Handler.ashx is for uploading &amp; checking if file exists</li>
<li>deletefile.ashx for file deletion</li>
<li>fileprogress.js modified for attaching deletion event</li>
<li>handlers.js modifed for checking server response on file exists</li>
<li>swfupload.js modified (FILE_ALREADY_EXISTS             : 300)</li>
<li>swfupload.queue.js  not modified.</li>
</ul>
<p>(default.aspx)</p>
<p><img class="alignnone size-full wp-image-42" title="19-02-2009-11-18-131" src="http://jajalc.files.wordpress.com/2009/02/19-02-2009-11-18-131.gif?w=630" alt="19-02-2009-11-18-131"   /></p>
<p><a href="http://users.tpg.com.au/jajal/dotnet/flashupload.zip">Download source code here</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jajalc.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jajalc.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jajalc.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jajalc.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jajalc.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jajalc.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jajalc.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jajalc.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jajalc.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jajalc.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jajalc.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jajalc.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jajalc.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jajalc.wordpress.com/21/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jajalc.wordpress.com&amp;blog=6613475&amp;post=21&amp;subd=jajalc&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jajalc.wordpress.com/2009/02/19/delete-files-after-upload-using-swfupload/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/44dc02df284375f39b7d9ab697f0a92d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jajalc</media:title>
		</media:content>

		<media:content url="http://jajalc.files.wordpress.com/2009/02/19-02-2009-11-11-561.gif" medium="image">
			<media:title type="html">19-02-2009-11-11-561</media:title>
		</media:content>

		<media:content url="http://jajalc.files.wordpress.com/2009/02/19-02-2009-11-02-081.gif" medium="image">
			<media:title type="html">19-02-2009-11-02-081</media:title>
		</media:content>

		<media:content url="http://jajalc.files.wordpress.com/2009/02/19-02-2009-11-09-061.gif" medium="image">
			<media:title type="html">19-02-2009-11-09-061</media:title>
		</media:content>

		<media:content url="http://jajalc.files.wordpress.com/2009/02/19-02-2009-11-18-131.gif" medium="image">
			<media:title type="html">19-02-2009-11-18-131</media:title>
		</media:content>
	</item>
		<item>
		<title>Modify DisplayFormUrl (SPCalendarItem) to use javascript</title>
		<link>http://jajalc.wordpress.com/2009/02/17/modify-displayformurl-spcalendaritem-to-use-javascript/</link>
		<comments>http://jajalc.wordpress.com/2009/02/17/modify-displayformurl-spcalendaritem-to-use-javascript/#comments</comments>
		<pubDate>Tue, 17 Feb 2009 03:18:09 +0000</pubDate>
		<dc:creator>Chintan Jajal</dc:creator>
				<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[custom]]></category>
		<category><![CDATA[DisplayFormUrl]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[SPCalendarItem]]></category>
		<category><![CDATA[SPCalendarItemCollection]]></category>
		<category><![CDATA[SPCalendarView]]></category>

		<guid isPermaLink="false">http://jajalc.wordpress.com/?p=3</guid>
		<description><![CDATA[Hello&#8230; Recently i have been told to display our firm&#8217;s time entry in sharepointy calendar view.. First of all it sounded very interesting &#38; still it is It nearly took me an hour to get a hang of  SPCalendarView control provided by ms (thanks to http://www.tonstegeman.com/Blog/Lists/Posts/Post.aspx?ID=60). My main challenge was not to display data out [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jajalc.wordpress.com&amp;blog=6613475&amp;post=3&amp;subd=jajalc&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hello&#8230;</p>
<p>Recently i have been told to display our firm&#8217;s time entry in sharepointy calendar view.. First of all it sounded very interesting &amp; still it is <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>It nearly took me an hour to get a hang of  SPCalendarView control provided by ms (thanks to <a title="http://www.tonstegeman.com/Blog/Lists/Posts/Post.aspx?ID=60" href="http://www.tonstegeman.com/Blog/Lists/Posts/Post.aspx?ID=60">http://www.tonstegeman.com/Blog/Lists/Posts/Post.aspx?ID=60</a>). My main challenge was not to display data out for Sharepoint list, but integrate it with one of our core systems.  With SPCalendarView &amp; SPCalendarItem its very easy to display data in a webpart format, but the problem happens, if you intend to use javascript in DisplayFormURL.</p>
<p>It will show you an error :</p>
<p><span style="color:#ff0000;"><strong>You must specify a server relative URL at  Microsoft.SharePoint.WebControls.SPCalendarItem.set_DisplayFormUrl(String value) </strong></span></p>
<p>Googled for an hour but with no luck. So i tried to modified the Generated HTML of the Calendar View and hurray it worked!!!. Look at the Render function below which has all the modification. I haven&#8217;t use SPCalendarItem&#8217;s item.ItemID property, but you can customize it for your purpose.</p>
<p><strong><span style="color:#000000;">When the Webpart is getting rendered, i replaced &#8220;/replace?ID&#8221; with my javascript string. You will also need to replace  &#8212; ONCLICK=&#8221;GoToLink(this);return false; with a blank string. This will prevent displaying the message &#8220;Invalid URL&#8221;</span></strong></p>
<p><strong><span style="color:#000000;">Look at the status bar in below mentioned images!.<br />
</span></strong></p>
<p><img class="alignnone size-full wp-image-10" title="original1" src="http://jajalc.files.wordpress.com/2009/02/original1.png?w=630" alt="original1"   /></p>
<p><span style="color:#008000;"><strong><img class="alignnone size-full wp-image-9" title="modified1" src="http://jajalc.files.wordpress.com/2009/02/modified1.png?w=630" alt="modified1"   /></strong></span></p>
<blockquote><p>If you had to open a new window (which i had to), when the user clicks on a particular item you can achieve it using the following lines.</p></blockquote>
<p><code>//while adding a new item, you can improve the logic here, but this was just for testing.<br />
item.DisplayFormUrl = "/replace/window.open("+ Page.Server.UrlEncode("'") + "item.aspx?time_uno=" + row["id"].ToString();</code></p>
<p><code>//when the rendering happens!</p>
<p></code></p>
<p><code>StringWriter textWriter = new StringWriter();<br />
HtmlTextWriter htmlWriter = new HtmlTextWriter(textWriter);<br />
calView.RenderControl(htmlWriter);<br />
string replaced = htmlWriter.InnerWriter.ToString();<br />
replaced =Page.Server.UrlDecode(replaced);<br />
replaced = replaced.Replace("/replace/", "javascript:");<br />
replaced = replaced.Replace("?ID=", "');");<br />
replaced = replaced.Replace("ONCLICK=\"GoToLink(this);return false;\" target=\"_self\"", "");<br />
replaced = replaced.Replace("onfocus=\"OnLink(this)\"","");<br />
writer.Write(replaced);<br />
</code><br />
So here it goes<br />
<code><br />
using System;<br />
using System.Collections.Generic;<br />
using System.Runtime.InteropServices;<br />
using System.Web.UI;<br />
using System.Web.UI.WebControls.WebParts;<br />
using Microsoft.SharePoint.WebControls;<br />
using System.Web.UI.WebControls;<br />
using System.Web.UI.HtmlControls;<br />
using Microsoft.SharePoint;<br />
using System.Data;<br />
using System.IO;</code></p>
<p><code>namespace TimeEntry<br />
{<br />
[Guid("a4e02451-4738-4adf-ab8f-36a27d81c813")]<br />
public class TEViewer : Microsoft.SharePoint.WebPartPages.WebPart<br />
{<br />
/// &lt;summary&gt;<br />
/// Create all your controls here for rendering.<br />
/// Try to avoid using the RenderWebPart() method.<br />
/// &lt;/summary&gt;<br />
protected override void CreateChildControls()<br />
{<br />
base.CreateChildControls();</p>
<p>try<br />
{<br />
AddCalendar();<br />
}</p>
<p>catch (Exception ex)<br />
{<br />
Controls.Add(new LiteralControl("&lt;b&gt;Error&lt;/b&gt; "));<br />
Controls.Add(new LiteralControl(ex.ToString()));<br />
}<br />
}</p>
<p>private SPCalendarItemCollection GetTimeEntry()<br />
{<br />
SPCalendarItemCollection items = new SPCalendarItemCollection();</p>
<p>Ds = //Your Dataset...<br />
DateTime currentdatetime = DateTime.Now;<br />
foreach (DataRow row in Ds.Tables[0].Rows)<br />
{<br />
SPCalendarItem item = new SPCalendarItem();<br />
//item.ItemID = row["id"].ToString();</p>
<p>item.StartDate = row["StartDate"];<br />
item.EndDate = row["EndDate"];</p>
<p>item.hasEndDate = true;<br />
item.DisplayFormUrl = "/replace";</p>
<p>item.Title = row["Title"]ToString() ;<br />
item.IsAllDayEvent = false;<br />
item.IsRecurrence = false;<br />
item.CalendarType = Convert.ToInt32(SPCalendarType.Gregorian);<br />
items.Add(item);<br />
}<br />
return items;<br />
}</p>
<p><span style="color:#008000;"><strong> protected override void Render(HtmlTextWriter writer)<br />
{<br />
StringWriter textWriter = new StringWriter();<br />
HtmlTextWriter htmlWriter = new HtmlTextWriter(textWriter);<br />
calView.RenderControl(htmlWriter);</strong></span></p>
<p><span style="color:#008000;"><strong> string replaced = htmlWriter.InnerWriter.ToString().Replace("/replace?ID=", "javascript:alert('Sharepoint hacked!');");<br />
replaced = replaced.Replace("ONCLICK="GoToLink(this);return false;"", "");<br />
writer.Write(replaced);<br />
}</strong></span></p>
<p>SPCalendarView calView;<br />
private void AddCalendar()<br />
{</p>
<p>calView = new SPCalendarView();<br />
calView.ViewType = GetCalendarType(Page.Request["CalendarPeriod"]);<br />
calView.DataSource = GetTimeEntry();<br />
calView.DataBind();<br />
Controls.Add(calView);</p>
<p>}</p>
<p>private static string GetCalendarType(string type)<br />
{<br />
if (type == null)<br />
type = string.Empty;<br />
switch (type.ToLower())<br />
{<br />
case "day":<br />
return "day";<br />
case "week":<br />
return "week";<br />
case "timeline":<br />
return "timeline";<br />
default:<br />
return "month";<br />
}<br />
}<br />
/// &lt;summary&gt;<br />
/// Ensures that the CreateChildControls() is called before events.<br />
/// Use CreateChildControls() to create your controls.<br />
/// &lt;/summary&gt;<br />
/// &lt;param name="e"&gt;&lt;/param&gt;<br />
protected override void OnLoad(EventArgs e)<br />
{<br />
if (!_error)<br />
{<br />
try<br />
{<br />
base.OnLoad(e);<br />
this.EnsureChildControls();<br />
// Your code here...<br />
}<br />
catch (Exception ex)<br />
{<br />
HandleException(ex);<br />
}<br />
}<br />
}</p>
<p></code></p>
<p><code>/// &lt;summary&gt;<br />
/// Clear all child controls and add an error message for display.<br />
/// &lt;/summary&gt;<br />
/// &lt;param name="ex"&gt;&lt;/param&gt;<br />
private void HandleException(Exception ex)<br />
{<br />
this._error = true;<br />
this.Controls.Clear();<br />
this.Controls.Add(new LiteralControl(ex.Message));<br />
}<br />
}<br />
}<br />
</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jajalc.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jajalc.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jajalc.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jajalc.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jajalc.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jajalc.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jajalc.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jajalc.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jajalc.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jajalc.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jajalc.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jajalc.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jajalc.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jajalc.wordpress.com/3/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jajalc.wordpress.com&amp;blog=6613475&amp;post=3&amp;subd=jajalc&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jajalc.wordpress.com/2009/02/17/modify-displayformurl-spcalendaritem-to-use-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/44dc02df284375f39b7d9ab697f0a92d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jajalc</media:title>
		</media:content>

		<media:content url="http://jajalc.files.wordpress.com/2009/02/original1.png" medium="image">
			<media:title type="html">original1</media:title>
		</media:content>

		<media:content url="http://jajalc.files.wordpress.com/2009/02/modified1.png" medium="image">
			<media:title type="html">modified1</media:title>
		</media:content>
	</item>
	</channel>
</rss>
