Saturday, November 28, 2009

How to detect clicked on outside of a particular div?

This is the part of my work on java script. I need to detect in my code, whether I clicked on a particular div or out of a div. So, what is the best way? Get he user clicked position and compare them with div coordinates? No that's not a good solution. Then how we need to do? Below is the best way of implementing it.

document.onclick = clickEvent;
function clickEvent(e) {
    var targ;
    if (!e) var e = window.event;

    if ( targ =;
    else if (e.srcElement) targ = e.srcElement;

    //if (targ.nodeType == 3) // defeat Safari bug

        if (targ.nodeName != "HTML") {
        while (targ.nodeName != "BODY") {
            if ( && == 'divGrid') {
                return false;
            } else {
                targ = targ.parentNode;
    }    //This is the place where you need to write code when you click outside of the div.

Hope this helps in solving some problems. Look for more.

How to detect tab key is pressed in javascript?

Recently I was working for a client and they needs plenty of functionality to be implemented in the javascript. And on the way of writing the code, I need to check whether user pressed on the tab key. When user on a particular div and hit the tab key then I need to do some logic. So, is there any event like tab clicked in javascript? NO… So,how to detect it. Below is the code I used for it.

document.onkeydown = keydown;

function keydown(event) {
        var code;
        var e;
        if (document.all) {
            if (!event) {
                var e = window.event;
                code = e.keyCode;
        else if (event.which) {
        code = event.which;
        e = event;
        if (code == 9) {//Write some logic

Note: keycode 9 is for tab key.

Hope this helps you.

How to, Jquery DatePicker Enable, Disable, Remove, attach

After worked with Jquery and their related plug ins in the web applications thought of writing nice posts on rare findings.

In some requirements we need to attach and remove the datepicker to a control or to a division. So, how to attach datepicker to a control or div dynamically… After read the jquery datepicker documentation, got to know the way to do that. The same case with Remove, enable, disable… So, below are the ways to do them.





NOTE: The selector I used [.datepicker] is just for example…. You need to give the id or class selector according to your requirement in place….

Do you like this post? Do you want to know anything more? Please post all here….

Tuesday, November 24, 2009

Download SharePoint 2010 BETA 2

It’s the time to download the latest version of SharePoint 2010 BETA2. I am downloading and will check whether they have made any changes to the BETA1. I faced so many problems in BETA 1 as it is not giving support to import user profiles from Active Directory. Will install it today and will let you know if I find anything interesting.

Friday, November 20, 2009

Download Sql Server 2008 R2 November CTP

Get the new version of Sql Server 2008 R2 edition and play with it. It is more enhanced version of the Sql server 2008. Just downloaded and found some options are nice. Try it out and enjoy the new features.

Thursday, November 19, 2009

Silverlight 4 BETA is ready

Wow, this is completely unexpected and nice. They are calling it as a developer release. Plenty of features and tools. Check it right now.

But some important points you need to know is, Silverlight 4 development is only on Visual Studio 2010. But, no problem Visual Studio 2010 can be installed side by side with Visual Studio 2008 SP1. So, get it and start play with it. Enjoy!!! with new finding and learning.

Wednesday, November 18, 2009

Installation guide SharePoint 2010

Today, I got latest build public BETA from MSDN, I installed on my laptop. So, what are the prerequisites and how to install it on the server? For this I want to post a simple, light weight post which walk you through the installation.
Before start installation, I have allocated a minimum of 50GB space for SharePoint 2010 on the hard drive. I completely cleaned/formatted it.

What is the best supported OS: Windows Server 2008 R2 [64-bit].
What is system version and hardware support: 64-bit
So, I started with installing the OS first.
1. Installed Windows server 2008 R2 [64-bit] on the system.
2. Enabled all features needed by SharePoint 2010. Below are the features/services.
IIS, .NET 3.5, IE Security, Wireless LAN etc. [Go to server manager and find add features]
3. Now, we need backend support, so installed Sql Server 2008.
4. What are the componets you need? Management Studio, Analysis services, BI[If Needed], Sql Server Book Online, and others as you needed.
5. Installed Sql Server 2008 SP1.
6. Now, we are ready with all the basic needs and ready to install SharePoint 2010. Start SharePoint installation file.
7. You will see the first nice screen with all the options available on the window. Now, select the option "Install software prerequisites'
8. Below are the ones it needs to proceed.
> Application Server Role, Web Server (IIS) Role
• Microsoft SQL Server 2008 Native Client
• Microsoft "Geneva" Framework Runtime
• Microsoft Sync Framework Runtime v1.0 (x64)
• Microsoft Chart Controls for Microsoft .NET Framework 3.5
• Microsoft Filter Pack 2.0
• Microsoft SQL Server 2008 Analysis Services ADOMD.NET
9. Agree the License Terms.
10. Now, you will see the preparation tool window which configures above services. So one by one all services/features will be installed successfully.
11. Now, from the main menu window, choose install SharePoint Server 2010.
12. If it asks for any product key then go to the MSDN link and check for the keys available and enter the key. If didn't ask then no problem.
13. After entered the key, it will ask you which installation you need. Standalone/Farm.
What my choice here is Standalone because, it is in BETA and first time installation so, first go for standalone. Later you can install FARM.
14. Now, you will see the progress bar installing SharePoint 2010. First it will install SharePoint 2010 and then applying updates. Which will take about 10-20 minutes.
15. We are almost completed and time for running SharePoint Products Configuration Wizard.
16. Click Next on the screen and it will give a warn that it needs some services to be restarted like IIS, SharePoint administration v4 etc.. Click OK and proceed.
17. It has all of 10 steps in the wizard, one by one slowly runs and completes. This is actually the part where the configuration database, sample data etc.. will created.
18. After completed all steps then it will automatically opens the browser with central administration application. If you see any errors in browser just do IISRESET or restart your machine once.

Note: There may be chances that you get exceptions while installing the SharePoint 2010 public BETA. Please check these posts to resolve the issues.
Exception 1
Exception 2
I hope this will help you to install the SharePoint 2010 very successfully without any problems. Please let me know, if you are facing any issues or any issues which you resolved while installing.

Microsoft.Office.Server.UserProfiles.UserProfileException: The request channel timed out

This is the continuation of Part 1. I have written a post on solving the issues while installing SharePoint 2010 in my previous post. So, As I said in my previous article, the new exception message I got in my system is below.

Microsoft.Office.Server.UserProfiles.UserProfileException: The request channel timed out while waiting for a reply after 00:00:19.9340000. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout. ---> System.TimeoutException: The request channel timed out while waiting for a reply after 00:00:19.9340000. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout. ---> System.TimeoutException: The HTTP request to 'https://myserver:32844/d31735f8a1b34f3a8263707181c7e298/ProfilePropertyService.svc' has exceeded the allotted timeout of 00:00:19.9990000. The time allotted to this operation may have been a portion of a longer timeout. ---> System.Net.WebException: The operation has timed out

So, what the above error message means? I also don't know anything about it at first glance. But, how did I resolv it?

I read the exception message 4 times continuously and understood again that this is the problem because of the WCF service. I copied the above given url in IE, waited for the response. But bad luck, didn't get any response.

As it is a service[.svc], What the idea I got here is, this path should exists some where on the file system. So, What I did? I search the file system for the file ProfilePropertyService.svc. And luckily I found the file in a location at "C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\d31735f8a1b34f3a8263707181c7e298\5902e8c4\679035c5" with the file name "profilepropertyservice.svc.cdcab7d2.compiled'. So, this is what helped me and felt very happy by seeing it. You know what? First time when I ran the configuration wizard the service compiled and I was stuck because of first exception I got[Resolved in previous article.] After that I reran the configuration wizard then it again compiled but didn't updated the temporary ASP.NET files folder. So, I just did IISRESET on the server and started the configuration wizard again and everything completed successfully.

Now, I have everything setup and running. I felt very happy and started playing with SharePoint 2010. Hope this helps you to solve the problems and I think you like the way I approached to resolve these issues. Let me know your ideas and feel free to ask me if you are facing any problems.

Microsoft.Office.Server.UserProfiles.UserProfileException: Unrecognized attribute allowInsecureTransport

Today, I got SharePoint 2010 Public BETA downloaded and installed on my laptop. It is very smooth and run very fast and total size is very less. All the prerequisites ran complete and while running the Product Configuration Wizard I got an exception and below is the detailed message of it.

Microsoft.Office.Server.UserProfiles.UserProfileException: Unrecognized attribute 'allowInsecureTransport'. Note that attribute names are case-sensitive. (C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\WebClients\Profile\client.config line 56) ---> System.Configuration.ConfigurationErrorsException: Unrecognized attribute 'allowInsecureTransport'. Note that attribute names are case-sensitive. (C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\WebClients\Profile\client.config line 56)

There is a hotfix released on kb. Check this.

So, this is the best part of the wizard. It completely given me very clear and wonderful message so that I can understood by reading it once. So, I went to the path above given in message and looked for the client.config file.

In the section, I found the line allowInsecureTransport="true". I don't know what to do with that. Because, As it said, it is case sensitive in error message, I tried with different combinations like camel case, pascal case, all lower, all upper etc..... But nothing worked.
After thought about it for a while, I just removed the attribute from the config file and saved the config.

Now, I reran the configuration wizard, there I see that this problem won't exist any more.

So, how this worked? When I deeply look into the config file, I understood that it is the WCF service setting. So, as you all know SharePoint 14 is supporting WCF services they have implemented some services based on it. In this BETA version, somehow that attribute is missing and it's not finding by the system.

So, now I resolved the issue and didn't get this problem again. But, this time I got a new and unexcepted exception message on my screen. See this post for more details.

But above both messsages came while running 8 of 10 step in configuration wizard while creating sample data.

Keep an eye on my blog for more solutions and updates from the technologies you like. Love to hear comments.

Tuesday, November 17, 2009

SharePoint 2010 public BETA is available on MSDN- Download

Hi all,

It's the time to download the SharePoint 2010 public BETA version which is available on MSDN. For this so many people are awaiting from long time and now the time comes. So, go to the link

And search for SharePoint and find SharePoint 2010 link. Now, you will get the download panel to start download.

NOTE: Remember somehow the link is not visible for all public users. To view or to access the site you need to login first with your msdn or any hotmail account. Right now there are some problems and the link is disabled for the normal sign ins. If your account is paid one, then only you will get access to it. According to the release it is public BETA it may available for download soon for all users.

Let me know, if you are having any trouble to get it or any issues.

Different grid implementations for view, edit, add records

I have a requirement to show the existing  records from database and give options to user for edit, add, delete. So, I thought some of them already implemented and searched for them and found some good examples. But, most of them are not really good at editing the row and submit changes. Some of them are submitting data back to server when column edit complete and some of them are having some problems.

Here the list of grids I have found which are very good start for everyone who are looking for the same.

Please let me know, if you know any more grids which are available on the net.

Hope this helps to find the best one which matches your requirements. What do you say?

Friday, November 6, 2009

SharePoint Designer 2010 is also free download

I think, most of you already knew it. But, I want to tell my readers that SharePoint designer 2010 is also Microsoft releasing for free. As SharePoint Designer 2007 is freely available they are continuing the same and saving some $ to their customers. But, you need to wait for another 4-5 months to get it.

SharePoint 2010 complete features here

Today, I read an article which explains all the features of SharePoint 2010 product. You should have to look at this and learn what the new and nice features available in the upcoming release.

Thursday, November 5, 2009

Add Dotnetshoutout button in all blog posts blogger blogs

This is another blog tip I want to tell you as I just added it recently to my blog. I think, you have seen my post on "how to add dotnetkicks kick it icon to all posts in blogger blog". So, by taking that as initiative created this code for DotnetShoutout and working great.

How to add it?

  • Go to edit html option of your blog, by login into your blogger blog and under layout and then Edit HTML.
  • Download full template before start editing the html code.
  • Now check the option "Expand Widget Templates".
  • Search in your browser for the keyword "data:post.body".
  • I think you found one instance as "<data:post.body/>".
  • Please add the below code exactly below the line you just found.

<a expr:href='&quot;; + data:post.url + &quot;&amp;title=&quot; + data:post.title' expr:id='data:widget.instanceId + &quot;_kickit&quot;' rel='nofollow' rev='vote-for'> <img alt='Shout it' expr:src='&quot;; + data:post.url' style='border:0px'/></a>

  • Save the template and just view your blog now.
  • I think, you will see the Shout it icon under each blog post body. Now you can add any formatting code to make it more stylish by adding p tags, css to look good on your page and positioning.

Hope it helps!!! Do you like this post?

Wednesday, November 4, 2009

Does SharePoint designer 2010 support SharePoint 2007 and earlier?

SharePoint designer 2010 is not supporting backward compatibility. Means won't support Windows SharePoint Services v3 or earlier versions. I think you got what I am going to say now… Yes, SharePoint designer 2010 only works for SharePoint 2010. I think this news is hard for you, but this will be good for us only. Because in this way, they will build very good version of product without any mess-up. By taking this as the advantage they will only concentrate on the SharePoint 2010 support and will make really a very good product. So, how to get the support for SharePoint 2007 sites? Is there no other way to edit the earlier version sites? I know this is the question in your mind now.

Don't fear. There is an option. By thinking these questions in mind, the SharePoint designer team is developing the software/product to install the designer side by side. So, you can install the SharePoint designer side by side the both versions on the same machine without having any issues. So, this will solve all the problems. If any site which is of earlier than SharePoint 2010 you can use SharePoint Designer 2007, for SharePoint 2010 you can use SharePoint designer 2010.

Are there any requirements for side by side installation? Yes, it has some requirements. You know a big change from previous version to current version is bit [32 bit vs 64 bit]. As SharePoint Designer 2007 is came only on 32-bit[x86], you will only install SharePoint Designer 2010[X86] 32 bit version side by side on a server. And if you install SharePoint Designer 64-bit on a server which has installed 32-bit MS Office, then it won’t give good result. So, Don’t install mismatched version of any. Please install everything of same version.

SharePoint Designer 2010 login as another user

Everyone knows that this is a big problem in SharePoint designer 2007 which doesn't have option to change the current logged in user. But, it is changed. Now SharePoint designer 2010 has the option to see who logged in and change the current logged in user. Good news!!!

So, as they are still working on similar issues to fix so many problems we have faced, hope the coming version of 2010 package will solve so many issues and make our life easy. I guess it will take few more months for the complete development of SharePoint designer 2010 and will release BETA around April 2010. Let's await for it.

How to:

In SharePoint designer 2010 there is an option at very bottom left corner which shows the current logged in user information and options to change user. See below figure.


So, this is it!!! Do you like this post? is built on SharePoint 2010 BETA

Do you believe this? Very nice UI and navigation. I really like the site and the way they organized the data. I thought it was built upon SharePoint 2007. But no, it was built on SharePoint 2010 BETA edition. Check the site and feel the sense of SharePoint 2010.

Isn’t it looks great?

Tuesday, November 3, 2009

SharePoint 2010 release BETA2 in November 2009

I know, all the SharePoint lovers waiting for this release. The current version released is very buggy and not able to test all features available. So everyone concentration is now on BETA version releasing in this month. Microsoft should test it thoroughly and release it with all features are functioning. To get more news and the beta release I refer you to register for letting you know by yourself.

Register here: