2011 in review
The WordPress.com stats helper monkeys prepared a 2011 annual report for this blog.
Here’s an excerpt:
A New York City subway train holds 1,200 people. This blog was viewed about 5,300 times in 2011. If it were a NYC subway train, it would take about 4 trips to carry that many people.
Heavy shelling with powershell
Hi,
in this post i’m going to cover the powershell as what i understood. hope you all find it appropriate and worth for your work. if not than please do feel free to update / upgrade my knowledge
.
So starting with shelling
what is powershell:
* windows powershell is microsofts task automation framework [as per wikipedia] built primarily for the windows administrators.
* It basically consist of command-line shell which is build on top of .net common language runtime and .net framework that accepts and returns .NET framework objects unlike to its counterparts which accept and return text.
* An administrator can perform administrative tasks on local but also on remote windows system through the virtue of powershell support to COM and WMI
As per microsoft its: http://msdn.microsoft.com/en-us/library/aa973757%28VS.85%29.aspx
found some hand tool / editor for playing with the powershell at http://powergui.org do check it.
Regards,
Manish Patil
Manipulating SharePoint Lookup Field values using Javascript
This article gives an small trick for manipulating the values of SharePoint Lookup Field (OOB control for list item lookup). For one of my assignments I was required to manipulate the values listed into SharePoint Lookup Field so I did it in this fashion
function getField(fieldType,fieldTitle)
{
var docTags = document.getElementsByTagName(fieldType);
for (var i=0; i < docTags.length; i++)
{
if (docTags[i].title == fieldTitle)
{
docTags[i].readOnly = true;
docTags[i].setAttribute(“choices”,”Comment 1|20″);
}
}
return false;
}
getField(‘input’,'Comment Type’);
Add .net assembly to sharepoint 2010 package or solution
hi,
here in today I would like to share a small but required thing while packaging sharepoint solutions. We usually require to bundle-up .net assemblies within a sharepoint solution(s). Microsoft Visual studio 2010 has made this thing very easy for packaging sharepoint 2010 solutions.
Please check the screen shots for the same
In the solution explorer you can see an .net assembly( underlined red in color), I wanted to refer/add this assembly into the sharepoint solution (highlighted in dark black).
So I opened the package.package (double click it
) as shown in screen shot.
Here on the wizard click on Advance tab (highlighted in red box below)
On opening of the tab gives option (inform of buttons) to add, edit, delete “Additional Assemblies”. The added assemblies are listed in the grid.
When we try to add new assembly it will give 2 options viz; Add existing assembly & Add assembly from project output
Now if you want to add assembly from your current project/solution then use second option & if you to refer to external assembly which is not part of your project then use first option.
In either cases if you want to register these assemblies into the web.config safe controls then there is provision for same
One most important thing to remember is: any assembly that you want to refer/add should be strong named (public token key) in order to add it to the GAC / assembly cache.
Additional Resource can be found at: Add & Remove Additional Assemblies
Get SPweb, SPList or Document Library from SPContentDatabase Class
Hi,
This post is helpful for those who are trying to extract information from the SPContentDatabase class. This is usually required when one is creating custom timer job, base level features etc.
The following code is written for Custom timer job:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SharePoint.Administration; (must)
using Microsoft.SharePoint;
namespace TTKTimerJob
{
class TTKIssueTimerJob: SPJobDefinition
{
public TTKIssueTimerJob()
: base()
{ }
public TTKIssueTimerJob(string jobName, SPService service, SPServer server, SPJobLockType targetType)
: base(jobName, service, server, targetType)
{ }
public TTKIssueTimerJob(string jobName, SPWebApplication webApplication)
: base(jobName, webApplication, null, SPJobLockType.ContentDatabase)
{
this.Title = “TTK Issue Timer Job”;
}
public override void Execute(Guid targetInstanceId)
{
// get a reference to the current site collection’s content database
SPWebApplication webApplication = this.Parent as SPWebApplication;
SPContentDatabase contentDb = webApplication.ContentDatabases[targetInstanceId];
// Get the TimerJobList Name from the webApplication collection
SPSiteCollection timerSiteCollection = webApplication.ContentDatabases[targetInstanceId].Sites;
SPList timerJobList = null;
foreach (SPSite siteItem in timerSiteCollection)
{
#region code here: finds the List in rootweb
//assumes the existence of a site collection with an absolute URL of
//http://localhost/sites/sitecollection/subsite/Lists/abc and that this site collection has a Web site named subsite
//SPList xyz = siteItem.RootWeb.GetList(“list url here”);
//SPList xyz = siteItem.RootWeb.Lists.TryGetList(“list Title here”);
timerJobList = siteItem.RootWeb.Lists.TryGetList(“ListTimerJob”);
if (timerJobList != null)
{
// create a new list Item, set the Title to the current day/time, and update the item
SPListItem newList = timerJobList.Items.Add();
newList["Title"] = DateTime.Now.ToString();
newList.Update();
break;
}
#endregion}
}
}
}
Possible ways: Excel Automation
Hi,
This post is outcome of love & relationship with excel automation and recent hit back with the same. I would like to praise the courage & efforts of colleagues who restlessly kept on working so that I can write this post
So starting with the post we’ll go to history from where this all started
As a aspiring software developer in mid-of 2006 I first came across this notorious requirement where I was required to read excelsheets from one location on the server process the data and then dump it into database. Believe me this requirement put into nodus situation. I had never that this kind of situation could ever arise and if then should not possible at all.
But when I did bit of goggle (I’m god follower from start of my carrier) then I came to know this is very common requirement and there are fair enough solutions (which actually work for all:) ). And that point when I had my first hate and love relationship with excel automation(hate=bcz I never thought of this, love = bcz many handy solutions are around).
Following are the possible approaches by which I had read and wrote to excel file:
READ:
- Microsoft OleDB driver:
- Jet OleDB for 32 bit applications
- ACE.OleDB for 64 bit applications
- Microsoft Office COM/ Excel Objects
- Stream objects
- Excel Services (applicable only for MOSS)
Write:
- CSV or delimiter while exporting data to client through HTTPHeaders of ASP.NET
- XML and XSLT while exporting data to client through HTTPHeaders of ASP.NET
- Microsoft Office COM/ Excel Objects
- Open Office SDK (applicable for MSOffice 2007 and above [.xlsx extensions])
- Microsoft OleDB driver with SQL queries that pushes data into excel
Microsoft Sharepoint 2010 end user guide
Hi All,
I feel pleased to update you that, Packt Publication House had released the Book “Microsoft SharePoint End User Guide: Business Performance Enhancements” that was Technically Reviewed by Me.
Please do feel free to visit the following link for same:
https://www.packtpub.com/microsoft-sharepoint-2010-end-user-guide-business-performance-enhancement/book

to check the reviewers panel & their details please visit following link:
http://my.safaribooksonline.com/book/-/9781849680660/about-the-reviewers/pref04
Its an achievement which I never thought about
Want to become a Technical Architect
Carrier Objective: Want to become a Technical Architect.
Ultimate goal: Want to become a Technical Architect.
Want to shape my carrier as a technical architect.
Down the line of carrier want to be Technical Architect.
Isn’t this is thing that you offent have in your mind as being an software professional. But many of us get confuse or are in delima that ‘How can I become a Tech Arch and what all is required for that’.
People have many belife and views to answer the above question(s), many of them are right to certain extend. The views and belifes which I came across are as below:
Even though these sound right. but I really dont feel that these are mandatory factors. For me architect is one who is very seasoned person, one who keeps on evaluating the technology, makes best out from technology by utilizing it to its stretch. No doubt doing or having certifications is good then also you can work as architect.
I would like to share few links which can help to target the said objective:
- http://www.ibm.com/developerworks/library/ws-soa-proarch1.html
- http://www.kanneganti.com/technical/architect
- http://en.wikipedia.org/wiki/Software_architect
for some good books please refer this one:
Also you make use of following microsoft links:
- http://msdn.microsoft.com/en-gb/architecture/default.aspx (register yourself for monthly journals etc.)
- http://msdn.microsoft.com/en-us/architecture/cc505969.aspx
The Article is still in draft mode. please stay tune for right one
Disabling Wall Paper Through Group Policy
Recently I came across the request for disabling the desktop wall paper through group policy in NT n/w. After a bit of googling I got to know how to apply this. Following is the step:
Local Computer Policy (In Group Policy) => User Configuration => Administrative Templates => Desktop => Active Desktop: ‘Active Desktop Wallpaper’
In the wizard specify the image that is required to be set in bkground (it allows: physical path or else UNC path)
** by default this option allows to apply only jpg/jpeg file extensions. If you want .png or .bitmap then you need to first enable the
The Web Part Events
1. ONINIT EVENT:
Fires 1st: Startup of the Control and where in web parts, the storage system is loaded; also calls LoadViewState
(loads the view state for all controls); if you uncomment this event, you MUST include the base.OnInit(e) line.
This is the best place to define controls and its attributes that are added to the part. We can register
events of the controls here itself
2. ONLOAD EVENT:
Fires 2nd: OnLoad event – this is where startup functionality/processing happens, including trapping PostBack – AFTER THE
OnLoad events, any User Generated events (Click, and so on) are fired
3. CREATECHILDCONTROLS EVENT:
Fires 3rd (BEFORE any events and OnPreRender)- this creates any controls; you can use this event to do any
checking or resetting of controls. You can alternately define controls here (instead of OnInit) though
this can affect how well you can maintain view state.
4. Custom EVENT HANDLERS:
Fires 4th: Event Handlers – event handlers fire just AFTER CreateChildControls and before OnPreRender:
5. ONPRERENDER EVENT:
Fires 5th: OnPreRender event – called just before anything is drawn via the Render event
(here is where Properties can be changed before the controls are drawn); this event calls
SaveViewState to save the view state before rendering
6. RENDER EVENT:
Fires 6th (last): Render event – Render this control to the output (HTML Writer) parameter specified
The HTML writer to write out to




