Saturday, January 2, 2010

Fix Runtime Errors in Internet Explorer

Fix Runtime Errors in Internet Explorer: "Because this type of error message does not apply to you, you can prevent it from appearing. To do this, follow these steps in Internet Explorer:
Click the Tools button , and then click Internet Options. Or, press ALT+T, and then press O.
In the Internet Options dialog box, click the Advanced tab.
Click to select the Disable script debugging (Internet Explorer) and Disable script debugging (Other) check boxes, and then click to clear the Display a notification about every script error check box."

Calendar Web Part for SharePoint that displays and gives details of events from an event list

















Introduction
This is a calendar part which displays events from an existing event list (dates highlighted), and also provides details about an event on the click of the event date.

Background

To create this WebPart, I chose the ASP.NET Calendar control and has overridden its OndayRender method to give colors to the dates with events.
The SharePoint object model (Microsoft.sharepoint.dll) is then used to pull the event details, displayed on the click of the date.

There are two classes used:
A class to highlight the event dates and to give colors to the dates of the calendar (e.g., gray for weekends).
A WebPart to create and render the Calender control and to display the event details pulled from the event list, on click of the highlighted date."

Thursday, December 31, 2009

SharePoint 2010 Developer - Beta

SharePoint 2010 Developer - Beta


SharePoint 2010 provides the business collaboration platform for developers to rapidly build solutions using familiar tools while leveraging a rich set of out of the box features. Visual Studio 2010 and SharePoint Designer 2010 make developers more productive and Visual Studio Team Foundation Server delivers support for application lifecycle management. Developers can integrate Line of Business data in SharePoint 2010 with read/write capability delivered by Business Connectivity Services. Sandboxed Solutions can be deployed to a shared hosting environment to limit the impact of unpredictable code to the other applications in use.

Audience Prerequisites

Basic understanding of Microsoft Office, SharePoint and using Microsoft Visual Studio.


Getting Started with SharePoint 2010

Welcome to the SharePoint 2010 learning center. SharePoint 2010 includes numerous new capabilities and features for professional developers. In this welcome video you will hear from some of the team members behind the training kit to understand what the kit is all about and what are plans are for the future of the SharePoint learning center on Channel 9.


SharePoint 2010 Developer Roadmap

SharePoint 2010 includes numerous new capabilities and features for professional developers most of which are highlighted in this unit. SharePoint 2010 makes developing those solutions easier, quicker, and more flexible. Much of the work that the developer had to do in the past with earlier versions of SharePoint has been replaced with simple configuration of the SharePoint 2010 platform, use of Visual Studio 2010 and SharePoint Designer 2010 or with calls to the SharePoint API.


Visual Studio 2010 Tools for SharePoint 2010

This unit will provide you with an overview of SharePoint development with Visual Studio 2010. Specific topics covered will include an overview of the project and item templates, a walkthrough of the designers included, and areas of extensibility within Visual Studio 2010 that can enhance SharePoint development. Visual Studio 2010 includes support out of the box for the most common types of projects that you may want to build with SharePoint 2010 as well as new features for more easily defining features, solutions, and wizards to walk through the most common settings for each project type.


UI Enhancements

The look and feel of SharePoint has radically changed from earlier versions of the product. In addition to being more accessible to the user it allows for improved extension points and fewer workarounds. The new user interface components that you can extend and build applications which include the fluent UI ribbon and an extensible dialog system.


Lists and Schemas

In a typical system data is somewhat normalized – not all of the system's data exists in one large table or list. Instead data exists in sets of tables or lists which have one entry for each entity across multiple tables.


LINQ to SharePoint

LINQ is a new data access paradigm which allows users to express SQL like syntax against a variety of data sources. LINQ can improve performance by allowing the back end data source to decide the best way to solve the query. SharePoint now fully supports LINQ for querying lists so that you can query information from the platform in a more condensed, easier to understand format.


Client Object Model

In SharePoint 2010 there are a number of object models that can be used by developers to access the server. The Client Object Model (Client OM) is a unified model which uses the same or similar programming concepts as the Server Object Model (Server OM). The Client OM can be accessed via web services, via a client (JavaScript) API, and via REST.


Workflow

In SharePoint 2010 you can associate workflows with a site so you need not associate a workflow instance with a specific item in a list. Site-level workflows are a powerful mechanism to create generic functionality using the power of Windows Workflow Foundation (WF).


Services Architecture

In this session we will discuss the new Service Architecture model for SharePoint 2010. In SharePoint 2010 the Service platform has been re-written with a new more scalable and flexable architecture.


Accessing External Data

In SharePoint 2010 Business Connectivity Services (BCS) enables integration with back end systems. Business Connectivity Services includes a set of presentation features, a connectivity framework and tooling within SPD and Visual Studio that enable developers and ITPros to connect to external data and services and to surface this data in SharePoint 2010 and Office 2010.This session will provide an overview of the BCS capabilities and usage in SharePoint 2010.


Enterprise Content Management

From a free form Wiki to a highly controled intranet or internet site, learn about all of the new Web Content Management features in SharePoint 2010. This session will cover enhancements to the core authoring UI, publishing infrastructure, the content query webpart, and content deployment.


Extending Search

This session will provide an overview of the enterprise search product line in SharePoint 2010. We've brought together the best of SharePoint Search and FAST ESP, resulting in the most complete enterprise search product line in the industry. In this session we'll talk about our overall strategy for enterprise search and delineate each of the key search products in SharePoint 2010.


PerformancePoint Services

There has been considerable investment in the Business Intelligence capabilities of SharePoint 2010. From new product capabilities like balanced scorecards, interactive dashboards, and line of business integration to improvements in Excel rendered content with Excel Services, improved and new capabilities for Self-Service information access, and creation of BI assets. In this session, we will cover the major components and identify the new capabilities.


Sandboxed Solutions

SharePoint 2010 adds a new deployment model for SharePoint called Sandboxed Solutions. It is a controlled solution packaging format that offers SharePoint Server Farm owners a way to easily mitigate risk that custom code will cause issues for them. It does this by restricting the API's that can be called and governing resources that can be used. Because of this Sandboxed Solutions provide a solution package that can be easily deployed to a shared server environment. This talk will describe what Sandboxed Solutions are, it will demonstrate how to create them with Visual Studio 2010 and how to deploy and monitor them on SharePoint farms.


Sharepoint 2010 Security

SharePoint Server 2010 incorporates a new, more powerful and flexible authentication model that works with any corporate identity system, including Active Directory® directory services, LDAP-based directories, application-specific databases, and new user-centric identity models such as LiveID. This model uses claims-based authentication and a new product, code-named "Geneva." Claims-based authentication is built around the concept of an identity and is based on standards — WS-Federation, WS-Trust — and protocols like the Security Assertion Markup Language (SAML).

SP2010 - Channel 9

Blog info

 

Blog for All Miscellaneous (immigration, h1b, iphone, English…etc) posts:

http://vkgandemisc.blogspot.com/

Direct email to post: vijaykumar.gande.misc@blogger.com

 

 

Blog for All work done posts (Private)

http://vkgandework.blogspot.com

Direct email to post: vijaykumar.gande.work@blogger.com

 

Blog for Technical posts (Public)

http://vkgande.blogspot.com

Direct email to post: vijaykumar.gande.tech@blogger.com

 

 


Wednesday, December 30, 2009

Syntax Highlighting Tag

<pre class="Cpp" name="code">….Place the C# code inbetween pre tags, in case if the posting contains VB.NET code then change class="vb".</pre>

Deploying the Master Page (Master Pages and SharePoint part 4 of 6) | SharePoint Magazine

Deploying the Master Page (Master Pages and SharePoint part 4 of 6) | SharePoint Magazine: "There are two ways to do this. The easiest way is to add the image to a folder in the 12 hive under the Layouts directory. At that point you can reference the image in the Master Page with _layouts/{folder name}/{file name}.
The other way is to put it in an image list on the root site of your page. Then you can reference them in an image tag like so:
The advantage of putting them in a list is that you can manage the image in the SharePoint list moving forward. The advantage of putting them in the 12 hive layouts folder is that it is real easy and that is the way SharePoint does it with the default images.

To incorporate the layouts approach, you just need to make sure the image gets moved to the 12 hive layouts folder. You can either manually move it there, or you can have a solution do the move for you. We will talk more about this in the last article in this series.

If you do the image list approach, you can either just put the image in the correct list. Or, if you want everything to be done automatic, then you could create the list as a featre and add the image when the feature is being created. However, that is a complete other subject (i.e.: creating lists and list instances as features)."


….Place the C# code here, in case if your posting VB.NET code then change class=vb. If your posting text delete this…

Deploying the Master Page (Master Pages and SharePoint part 4 of 6) | SharePoint Magazine

Deploying the Master Page (Master Pages and SharePoint part 4 of 6) | SharePoint Magazine: "Steps to create a feature for Master Page deployment:
Note: We will not be using any tools like Visual Studio Extensions for WSS or WSPBuilder for this walkthrough. However, I recommend using these tools to wrap the features in solutions. We will talk more about this in the last article in this series."


….Place the C# code here, in case if your posting VB.NET code then change class=vb. If your posting text delete this…

Developing a Custom Master Page (Master Pages and SharePoint part 3 of 6) | SharePoint Magazine

Developing a Custom Master Page (Master Pages and SharePoint part 3 of 6) | SharePoint Magazine: "After you make a copy of the master page, the content pages will not know that this is the master page they should use. So, default.aspx is the content page. And if you open default.aspx in SharePoint Designer, you will notice this in the upper right corner:

Notice that it is still pointing to the default.master page. If you want it to point to the new customDefault.master page, then right click on customDefault.master (in the Folder List) and choose “Set as Default Master Page”. After doing this, open the default.aspx page again and notice that the master page referenced changed:"


….Place the C# code here, in case if your posting VB.NET code then change class=vb. If your posting text delete this…

Incorporating a Master Page into a SharePoint site definition | SharePoint Magazine

Incorporating a Master Page into a SharePoint site definition | SharePoint Magazine: "This is the sixth article in a six-part series on ASP.NET Master Pages and SharePoint.
Introduction to Master Pages.
Examining the out of the box Master Pages in SharePoint.
Developing a custom Master Page for SharePoint.
Deploy a Master Page for a production ready system.
Customizing the Application.master Page.
Incorporating a Master Page into a SharePoint site definition"


….Place the C# code here, in case if your posting VB.NET code then change class=vb. If your posting text delete this…

Examining the out of the box Master Pages in SharePoint | SharePoint Magazine

Examining the out of the box Master Pages in SharePoint | SharePoint Magazine: "The out of the box master pages for publishing sites can be found at %Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\PublishingLayouts\MasterPages. Just like the default.master, these master pages are moved to the master page gallery of the SharePoint site when the publishing site is created. Once again, just like default.master, the word “moved” is actually incorrect because SharePoint technically keeps a reference to the master page on the 12 hive file system (the concept called Ghosting or Un-Customizing)."


….Place the C# code here, in case if your posting VB.NET code then change class=vb. If your posting text delete this…

Introduction to Master Pages | SharePoint Magazine

Introduction to Master Pages | SharePoint Magazine: "Introduction to Master Pages.
Examining the out of the box Master Pages in SharePoint.
Developing a custom Master Page for SharePoint.
Options to deploy a Master Page for a production ready system.
Customizing the Application.master Page.
Incorporating a Master Page into a SharePoint site definition
In this article we will discuss the structure and architecture of an ASP.NET Master Page. We will show ASP.NET Master Page’s basic concepts in order to gain an understanding of how the pages work. This article will lay the groundwork for the subsequent articles in this series on customizing SharePoint Master Pages."


….Place the C# code here, in case if your posting VB.NET code then change class=vb. If your posting text delete this…

Chris O'Brien: Using the Delegate Control

Chris O'Brien: Using the Delegate Control: "Wednesday, 20 June 2007
Using the Delegate Control

When starting to build MOSS sites, many developers will start the page template development process by analyzing the shipped master pages and/or using the 'How to create a minimal master page' MSDN article. Whilst very useful, for simplicity the example in the article unfortunately does not include some of the functionality the SharePoint team implemented in default.master, specifically the use of the Delegate Control for the page to load controls. I think this is a shame, since many developers who don't take the time to specifically look at it may therefore be unaware of how powerful the Delegate Control can be.
So what is it?
Essentially the Delegate Control provides an alternative to adding user controls and server controls to a .aspx page in the normal way. By this, I mean adding the control to the page by dragging from the toolbox in the development environment or by adding the appropriate markup manually. Instead, with a Delegate Control all we do is add the markup to instantiate a Delegate Control instance, and use a Feature to specify separately which control should actually be loaded. What this effectively gives us is the ability to control what controls are used on a page without having to directly modify and redeploy master pages/page layouts. This extra level of abstraction can be quite powerful, since any feature scope can be used with the Delegate Control. I'll come back to this, but enough theory for now. Here's how it's used:"


….Place the C# code here, in case if your posting VB.NET code then change class=vb. If your posting text delete this…

Using Delegate Controls in Sharepoint

mrbill's blog » Using Delegate Controls in Sharepoint: "May
24
2007
Using Delegate Controls in SharepointPosted by unclaimed blog
No Comments » After wrestling with the SDK information which skips a step or 2, I finally got the delegate control example to work that allows you to replace the Sharepoint Search box on the fly with your own custom control without ever having to touch the aspx page itself. This is a very cool feature with unlimited ramifications.
Why it is cool
Using the concept of a delegate control, you can take any control that exists in Sharepoint today or your own custom creations and place them on a sharepoint page such that they override the existing control at whatever scope you desire (individual site, site collection or farm) and yet require no recoding of the page(s) itself. On every Sharepoint deployment I have ever done, it has been requested that the search box be modified, either comsmetically or functionally. In previous Sharepoint versions, this involvded either customizing the pages one by one and/or creating a whole new site defintion. WIth the concept of delegate controls in Sharepoint 2007, its a handful of lines of code and its far more powerful."


….Place the C# code here, in case if your posting VB.NET code then change class=vb. If your posting text delete this…

SharePoint Delegate Controls in SharePoint 2007 - Best Practices - Atlanta .NET Regular Guys

SharePoint Delegate Controls in SharePoint 2007 - Best Practices - Atlanta .NET Regular Guys: "SharePoint Delegate Controls: What EVERY SharePoint developer should know, but most do not.
Every time I talk to someone about SharePoint 2007 development, I ask them if they know about SharePoint delegate controls. Almost all of them have said no at first. LEARN THEM!
I feel this is one of the most important features of SharePoint 2007 if you are doing any type of customization or skinning.
A delegate control is user control that has a predefine space on a page that can be changed by turn on or off a feature. The stock example used is, if you want to change the search area you could upload a feature with a user control to replace it with your own. Delegate controls are based on numbered sequences with the lowest being displayed. Yours just has to be the lowest."


….Place the C# code here, in case if your posting VB.NET code then change class=vb. If your posting text delete this…

Delegate Control (Control Templatization)

Delegate Control (Control Templatization): "Delegate Control (Control Templatization)Windows SharePoint Services 3.0 implements a straightforward mechanism to declare candidate controls for a particular functionality and provides a mechanism for choosing a single functionality provider. Through a Feature you can identify controls and control templates that serve as candidates for a chosen functionality.
Controls are identified based on the functionality that is provided by the control. You can register controls for these functionalities through Feature elements. You specify which sort of control to use, a sequence number, and a URL to either a control template or an assembly, as shown in the following code examples:"


….Place the C# code here, in case if your posting VB.NET code then change class=vb. If your posting text delete this…

Monday, December 28, 2009

Add Digg, Technorati, Stumble Upon, Delicious buttons in Blogger | ASP.NET, Sharepoint, C#, VB.NET Solutions

Add Digg, Technorati, Stumble Upon, Delicious buttons in Blogger | ASP.NET, Sharepoint, C#, VB.NET Solutions: "Add Digg, Technorati, Stumble Upon, Delicious buttons in Blogger"

Blogger SEO Tips: Update Title Style and Add Meta tag | ASP.NET, Sharepoint, C#, VB.NET Solutions

Blogger SEO Tips: Update Title Style and Add Meta tag | ASP.NET, Sharepoint, C#, VB.NET Solutions: "Blogger SEO Tips: Update Title Style and Add Meta tag"

HTMLEncode A String Online

HTMLEncode A String Online: "HTML-encode a string"

Replace href in string using C# and Regex

The following function replaces all the href's in the "inputString" with the value in the "replaceString"


string ProcessHREFs(String inputString, String replaceString)
{
Regex r = new Regex("href\\s*=\\s*(?:\"(?<1>[^\"]*)\"|(?<1>\\S+))", RegexOptions.IgnoreCase | RegexOptions.Compiled);
return r.Replace(inputString, replaceString);
}

Regular Expressions in C# – Practical Usage | Martijn's C# Programming Blog

Regular Expressions in C# – Practical Usage | Martijn's C# Programming Blog: "Regular Expressions in C# – Practical Usage"

Get All Hrefs Using C# in ASP.net

Get All Hrefs Using C# in ASP.net: "Get All Hrefs Using C# in ASP.net"

kalani's blogs: Code Plugin for Blogger - How to Install Syntaxhighlighter

kalani's blogs: Code Plugin for Blogger - How to Install Syntaxhighlighter: "Code Plugin for Blogger - How to Install Syntaxhighlighter"

Publish Source code in Blogger | ASP.NET, Sharepoint, C#, VB.NET Solutions#comment-form#comment-form#comment-form

Publish Source code in Blogger | ASP.NET, Sharepoint, C#, VB.NET Solutions#comment-form#comment-form#comment-form: "Publish Source code in Blogger
Tags: Blogger, Google Share After posting any source code, First we make sure that the code is correct and same as the original. For HTML or script source code, we require HTML Encoding so that blogger doesn't execute this code.The Source code format should be different from content and there should be option for copy code or print code so that user don't need to select entire code and press ctrl+c. I use 'Syntaxhighligher' to display source code in blogger. It fullfills all requirement. First Layout is very pretty with line numbers and it provides 'View Plain' (To display only source code in another window),'Copy to clipboard' and 'Print?' options. We will see How can we use syntaxhighlighter in blogger without any hosting."

Sharepoint 2010 video tutorials

Sharepoint video tutorials: "Sharepoint video tutorials"

How to: Sharepoint 2010

How to -- Sharepoint 2010: "How to -- Sharepoint 2010"

USCIS - Freedom of Information and Privacy Acts (FOIA)

USCIS - Freedom of Information and Privacy Acts (FOIA): "Freedom of Information Act (FOIA)

USCIS Freedom of Information Act (FOIA) and Privacy Act (PA) Contact:

U.S. Citizenship and Immigration Services
National Records Center, FOIA/PA Office
P. O. Box 648010
Lee’s Summit, MO 64064-8010
(816) 350-5570
Fax (816) 350-5785
uscis.foia@dhs.gov"

Sunday, December 27, 2009

C# String Replace() not working?

C# String Replace() not working?: "String objects, once defined, never change. When you call .Replace it actually returns a new string with the changes, and leaves the original untouched.

In practice the code often looks like myString = myString.Replace(something, something); ."

String to Byte Array (vice versa) Conversion in C# and VB.NET (and back)

String to Byte Array Conversion in C# and VB.NET (and back): "Question:
How do I convert a string to a byte array and vica-versa in VB.NET and C#?
Answer:
' VB.NET to convert a string to a byte array
Public Shared Function StrToByteArray(str As String) As Byte()
Dim encoding As New System.Text.ASCIIEncoding()
Return encoding.GetBytes(str)
End Function 'StrToByteArray

// C# to convert a string to a byte array.
public static byte[] StrToByteArray(string str)
{
System.Text.ASCIIEncoding encoding=new System.Text.ASCIIEncoding();
return encoding.GetBytes(str);
}

' VB.NET to convert a byte array to a string:
Dim dBytes As Byte() = ...
Dim str As String
Dim enc As New System.Text.ASCIIEncoding()
str = enc.GetString(dBytes)

// C# to convert a byte array to a string.
byte [] dBytes = ...
string str;
System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding();
str = enc.GetString(dBytes);"

Need to overcome SharePoint's filename restrictions in document libraries.

Need to overcome SharePoint's filename restrictions in document libraries.: "overcome SharePoint's filename restrictions in document libraries."