Madhawa Learns To Blog : C#, Java

.net, c#, java,sql, OOAD and more mad memory dumps...

  Home  |   Contact  |   Syndication    |   Login
  47 Posts | 0 Stories | 57 Comments | 15 Trackbacks

News

Archives

Post Categories

Blog Roll

Hang Outs

My old blog

.net

Very useful article by Wayne Hartman.

http://blog.waynehartman.com/articles/84.aspx

 


These days I'm working on a CMS solution and I had all my list definitions and list instances in one feature, so everything was working fine. But its not ideal as each time I change the list definitions I have to de-activate and re-activate the whole feature. And each time I do that the default data I have defined in list definitions are duplicated. So I created another feature for list instances but its giving the following error when trying to activate. "GetUserListSchema(): Failed to get the list ......

Going over all the w3wp processes in task manager is frustrating if you wanna do this frequently :). So here it is.

taskkill /F /IM w3wp.exe /T

Works in the command line and PowerShell as well.


/// <summary> /// Add Permission Level to a Sharepoint user group collection /// </summary> /// <param name="spWeb">The sp web.</param> /// <param name="permissionName">Name of the permission.</param> /// <param name="groupCollection">The group collection.</param> public static void AddPermissionsToGroupCollec... spWeb, string permissionName, string[] groupCollection) { SPSecurity.RunWithElevatedP... { try { //Allow updating of ......

public static List<string> GetChoiceFieldValues(string listName,string fieldName, string siteCollection, string webSite) { List<string> fieldList; SPSite spSite = null; SPWeb spWeb = null; try { if (siteCollection != null) spSite = new SPSite(siteCollection); else spSite = SPContext.Current.Site; if (webSite != null) spWeb = spSite.OpenWeb(webSite); else spWeb = spSite.OpenWeb(); SPList spList = spWeb.Lists[listName]; SPFieldChoice field = (SPFieldChoice)spList.Field... fieldList ......

Today I had to work on a project which uses VS2008 and SQL Server 2008. I haven't used SQL2008 but had used VS2008 a little bit. When I tried to install SQL2008 (Developer edition) got this strange error which says "Microsoft .NET Framework 3.5 installation has failed. SQL 2008 Setup requires .NET 3.5 to be installed." Strange thing is I had installed .NET 3.5 in the VPC upfront. Actually you are installing .NET 3.5 when you install VS2008 right? Anyway I tried to resolve this using, 1. Uninstall ......

/// <summary> /// Add a user to a Sharepoint group /// </summary> /// <param name="userLoginName">Login name of the user to add</param> /// <param name="userGroupName">Group name to add</param> private void AddUserToAGroup(string userLoginName, string userGroupName) { //Executes this method with Full Control rights even if the user does not otherwise have Full Control SPSecurity.RunWithElevatedP... { //Don't use context to create the spSite object ......

STSDEV is a simple tool for SharePoint developers. It helps you to create SharePoint projects (with solutions precisely) and deploy templates and components into the SharePoint 2007 platform. http://www.codeplex.com/stsdev This tool creates project and solution in same name and in the same folder. We all know we never put the solution and project files in the same folder and never use same name for the solution and the project. Unfortunately we didn’t find a way of changing those and use the tool ......

One of the main things you should consider if you believe in good coding is error or exception handling. When it come to programming languages, now all popular object oriented languages have try, catch method to handle an exception. We can put our code (which might gives errors or exceptions) inside the try block and error handling code in the catch block. This has become the de-facto of error or exception handling now. But when it comes to T-SQL we hadn’t got that luxury. Error handling in T-SQL ......

Visual WebGui is the .net answer for GWT (Google Web Toolkit). But it’s seems more powerful than GWT even though it’s not coming from Microsoft and yet it’s open source. Still I hadn’t got time to put my hands on deeply but you can feel it by just browsing their web site and checking the features and comparing those with GWT. Not like GWT, in Visual WebGui you can use existing windows controls to create your UI. Major advantage of Visual WebGui over GWT is we can deploy Visual WebGui applications ......

Full .net Archive