Wednesday, November 16, 2011

Single Responsibility Principle for classes

http://fohjin.blogspot.com/2008/04/srp-single-responsibility-principle.html



http://www.testdriven.net/

enumerationvalue = new int[] {196,197}

Thursday, October 27, 2011

Thursday, September 29, 2011

Register Javascript variables OnLoad from server side

Started out for a way to find ClientId of Asp.Net Button in javascript code.

Interesting find is Page.ClientScript.RegisterClientScriptBlock() which registers variables and allows them to use in javascript on client side.

Sample:
Do the following on Page_Load Event of any page

 var RegisteredVar= string.Format("var _Button1ClientId='{0}';", Button1.ClientID);              Page.ClientScript.RegisterClientScriptBlock(GetType(), "AddScriptVariables", RegisteredVar, true);


Good to use the variable "RegisteredVar" in any javascript function.


Friday, September 23, 2011

Remote Debugging Visual Studio 2010

Finally was able to get it working!



1) Copy the appropriate installer from http://www.microsoft.com/download/en/details.aspx?id=475 onto your local VM

2) Install it and make it a accessible over the network(Create a share)
3) Add yourself to the Administrators group in remote computer(assuming you are logging into the host as yourself)
4) Run the msvmon.exe on remote machine as Administrator
5) Copy pdb files to shared folder on remote machine and load symbols in visual studio from that shared folder
6) Stop all the servers in load balancing environment, just have the remote machine running
7) Stop IIS on remote machine and clean up temporary asp.net files and restart IIS (This might not be needed, cleaning temporary asp.net files didnt work for me so went this way. It is not documented anywhere to do this way, just my way of doing it)
8) Copy the server name(usually DOMAIN\administrator@REMOTEMACHINE) into qualifier in visual studio
9) Find the right process and attach it, you should be good to go.




Just be persistent, it took me a week to figure this out!

Friday, September 16, 2011

Wednesday, September 7, 2011

FXCOP download

http://blog.rodhowarth.com/2010/08/general-dev-how-to-download-fxcop-100.html

Jquery live() not working in IE, event bubbling issue and workaround for that using livequery()

http://blog.bigbinary.com/2009/10/14/how-live-method-works-in-jquery-why-it-does-not-work-in-some-cases-when-to-use-livequery.html

Wednesday, August 24, 2011

External Content Type n External List SharePoint 2010

http://msdn.microsoft.com/en-us/library/ee556391.aspx


http://msdn.microsoft.com/en-us/library/ee231515.aspx

Thursday, August 4, 2011

PermMask field sharepoint

http://www.beyondweblogs.com/post/SharePoint-security-access-denied-permission-corruption-problem-Edit-Item-and-Access-Workflows.aspx

When a list is created from a saved template and none of the users have access to edit the items in the list, it can be a case of permmask field bug, which is known in sharepoint, hotfix was rolled over by Microsoft later for this.

Wednesday, August 3, 2011

PowerShell SharePoint 2010

http://technet.microsoft.com/en-us/sharepoint/ee518673 (Good Video with real basics)


http://walkthroughsharepoint2010.blogspot.com/2011_05_01_archive.html (Getting Started with PowerShell Commands, loading snapin)

http://mssharepointserver.blogspot.com/2011/04/extracting-sharepoint-farm-solutions.html (wsp is saved as persisted file in backend)

Thursday, July 28, 2011

Javascript inside SharePoint webpart

http://msmvps.com/blogs/sundar_narasiman/archive/2009/10/07/leverage-javascript-in-sharepoint-web-parts.aspx

Wednesday, July 20, 2011

Sharepoint 2010 relational lists

We now have Projected fields, joins and relational integrity between parent and child lists.


http://www.zimmergren.net/archive/2010/01/04/sp-2010-list-joins-amp-spquery-enchancements.aspx


spquery joins

Friday, July 15, 2011

DropDownList DataBind to sharepoint list items

http://jatindersingh.blogspot.com/2009/09/databinding-microsoftsharepointsplistit.html


DDL expects properties of list which are ID and Title, apart from these there should be other ways to bind data

Thursday, July 14, 2011

iispp script in iis7.0

http://www.iislogs.com/steveschofield/iis7-post-61-where-did-my-iisapp-script-go