Skip to content


Creating a Web Part with Client-side Script

Hi all,
I came across a nice article on Creating a Web Part with Client-side Script (Javascript).
And will definately like to share this with you all….
following is the url for same
http://msdn.microsoft.com/en-us/library/ms948916.aspx


Posted in Share Point.

No comments



How to: Add Actions to the User Interface

Hi all,Time share my some of sudden discoveries in SharePoint Tools and technologies.
Subject: How to: Add Actions to the User Interface

Using
Features makes it easy to add actions to menus of the user interface in
Windows SharePoint Services. This example shows how to add actions to
various menus through a Feature and how to activate it within the
deployment.

following is the url/link to the same.

Add Actions to the User Interface

Default Custom Action Locations and IDs

Posted in Share Point.

No comments



Internet, Intranet, Extranet

Internet refers to the world-wide collection of independent networks,
connected via routers to each other for communication purposes.


Intranet refers to a collection of networks within a logical body, such
as a building, corporation or other entity. Intranets can be as simple
as two computers connected at home to each other, or as vast as 1000
branch offices of a bank, connected via privately owned, non-public
network links. Intranets usually have a firewall and router, which
permits access to the public Internet, while protecting the internal
Intranet from malicious users.



Extranets are collaborative meta-networks which are set up between two
or more Intranets to facilitate business or research communication. An
example would be TATA Group and the many subcontractors that supply TATA Group with parts for their products. TATA Group and it’s partners establish links
to tie each others Intranets together to better serve each others
needs, such as secure communications for financial transactions, parts
ordering, etc. 

Posted in Technical.

No comments



SharePoint ListTemplate IDs


Here are the SharePoint 2007 ListTemplateIDs for use in event receivers:
ID  List Type
100 Generic (custom) List
101 Document Library
102 Survey
103 Links List
104 Announcements
105 Contacts
106 Events
107 Tasks
108 Discussion Board
109 Picture Library
110 Data Source
111 Site Template Gallery
113 Web Part Gallery
114 List Template Gallery
115 Form Library
119 Wiki Page Library
120 Generic (custom) List in Datasheet view
150 Project Tasks
200 Meeting Series List
201 Meeting Agenda List
202 Meeting Attendees List
204 Meeting Decision List
207 Meeting Objectives List
211 Meeting Things to Bring List
212 Meeting Workspace Pages List
300 Portal Sites List
1100 Issue Tracking


Posted in Share Point.

No comments



SharePoint Search

Hi All,

Finally I got the solutions for my problem.
Here I pen down the detailed steps for this:

  1. Create Custom Columns in the SharePoint Lists and Libraries, as I created for Keywords, Domain, Technology.
  2. Add these columns to SharePoint Columns List at following location: SharePoint Research > Site Settings > Site Column Gallery > Create Column
  3. Specify the Colunm Name exactly same to what we created in step one (Keywords, Domain, Technology).
  4. Select the Appropraite type of information for this column by choosing radio button.
  5. Specifiy the Group Name under which this column fall and press OK.
  6. Ones we are through with above steps then follow the article specified by certdev http://technet.microsoft.com/en-us/library/cc262933.aspx
  7. Fully crawl the site in order to get our custom column in search.
  8. Then build your search query accordingly and make your custom search work decently for you and others

Now getting back to the query problem
my previous query was:
string query = “SELECT title, Path, Description, author, rank FROM SCOPE() WHERE \”scope\”= ‘All Sites’”
                      + ” AND CONTAINS (Keywords, ‘” + strQueryText[0].ToString() + “‘) “
                     + ” AND CONTAINS (Domain, ‘” + strQueryText[1].ToString() + “‘) “
                     + ” AND CONTAINS (Technology, ‘” + strQueryText[2].ToString() + “‘)”;

my new query is:
string query = “SELECT title, Path, Description, author, rank FROM SCOPE() WHERE \”scope\”= ‘All Sites’”
                         + ” AND Keywords =’” + strQueryText[0].ToString() + “‘ “
                         + ” AND Domain =’” + strQueryText[1].ToString() + “‘ ”
                         + ” AND Technology =’” + strQueryText[2].ToString() + “‘”;
Here Instead of “Contains” I used plain simple comparision and things started working fine for me.

Happy Customizing and Configuring….



Posted in Share Point.

No comments



Write up on SharePoint QuickLaunch Control

Customizing QuickLaunch Control through the SharePoint wizard:
1] Site Actions > Site Settings > Modify Navigation
2] Subsites and Pages check boxes to display items underneath them.
3] Enabling Sorting On.
4] Global Navigation for Displaying the Horizontal Navigation menu.
5] Current Navigation.
   I] Display the same navigation items as the parent site.
   II] Display the current site, the navigation items below the current site, and the current site’s siblings.
   III] Display only the navigation items below the current site.
6] Navigation Editing and Sorting for Adding/Editing/Deleting Headings, Links.

Now the above stated configuration is easy, simple and not mint for complex dynamic links.
For such case we definately need to write a awesome code.

Controlling the Levels of Nodes creation under Parent Node:
For this task we need to edit the QuickLaunch Control settings in the SharePoint Designer as follows:
1] Find html tag named “SharePoint:AspMenu” inside the default.master page of Sharepoint site
   This page can be found http://servername:portnumber/_catalogs/masterpage/default.aster path
2] The “SharePoint:AspMenu” has following attributes
    id=”QuickLaunchMenu”
    DataSourceId=”QuickLaunchSiteMap”
    runat=”server”
    Orientation=”Vertical” : Controls orientation of QuickLaunch
    StaticDisplayLevels=”2″: Levels of Nodes creation under Parent Node
    ItemWrap=”true”        : Wrap text either true or false
    MaximumDynamicDisplayLevels=”0″
    StaticSubMenuIndent=”0″
    SkipLinkText=”"
3] StaticDisplayLevels determines the levels of nodes creation, change its value and save the page and publish page.

Programmatically Adding/Editing/Updating/Deleting the Navigation nodes of QuickLaunch control.

Approaches for Developing the code that takes care of Adding/Editing/Updating/Deleting the Navigation nodes of QuickLaunch control.
1] Web part.
2] Extending the default.master by default.master.cs which is actually I ddl project.
3] ASP.NET User control (.ascx) file.
of the above approaches I prefer to go with user control bcz,
1] Its easy to develop and deploy at following location
 ”c:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\CONTROLTEMPLATES
and add the reference in the master page.
2] Easy to uninstall from the site.
3] Easy to install for different site on the server.
4] Light weight as compared to DLL projects.
5] Only drawback: can not debug the code as like to web part or default.master dll.
to be continude..


Posted in Share Point.

No comments



Steps for creating an Extended Web Application with different Authentication


Steps for creating an Extended Web Application with different Authentication.

* Creation of FBA Users Database on the Database server
I] Run command “C:\WINDOWS\Microsoft.NETFramework\v2.0.50727\aspnet_regsql.exe from the command prompt of the server.
II] Follow the wizard steps to create new Database for storing users.
1] Database server Name
2] Select Authentication Mode
3] USerName and password if SQL mode is selected.
4] Type New Database Name or Chose the Name from drop-down for existing databases on the server.
5] Next.
6] Finish.
III] Add users and Roles in the database
1] create an ASP.NET 2.0 website using Visual Studio 2005.
2] Add following key to web.config

3] Build the site.
4] under the website menu, select the option for ASP.NET Configuration. This opens up the ASP.NET web site administration tool where we can add the users and roles we want.
5] Select the Security link, create a role (something like administrators), and then go and add a user.

=============================================================================================================================

1] Create a site collection in SharePoint server through Site Central Administration.

1] Specify the tile of site
2] Port number (must be unique number)
3] Application Coonection pool (preferrably new application pool name): System login Name and Pwd
4] DataBAse Server Name
5] Database Name
6] Authentication.
OK

2] Create site
1] Select a Web application.
2] Type a title and description for your new site. The title will be displayed on each page in the site
3] Template Selection - for creation of site.
4] Specify the administrator for this Web site collection.
5] Quota Template = No Quota.
OK.

////// So till this step we are through with a TOP level Site Creation (Windows/ Active Directory). ////////////////////////

 Extended web application with FBA implemented.

3] Follow the path in order to extende an existing web application.
Central Administration > Application Management > SharePoint Web Application Management > Create or extend Web application
4] On the page we will get link for “Extend an existing Web application” (http://servername: portnumber/_admin/extendvsoption.aspx)

5] Select a Web application by clicking the drop down.
6] IIS Web Site.
1] Select “Create new IIS Web Site” radio button.
 type the site description e.g SharePoint Extended Web - 4030
2] Specify the Port number (must be a unique number).
3] Specify the Host Header (optional). eg tools.v2solutions.com
4] Specify the Path (optional). by default path will be C:InetpubwwwrootwssVirtualDirectoriesXXXX
 where XXXX is the Port Number of the site.
7] Security Configuration
Authentication provider:NTLM
Allow Anonymous: No
Use Secure Sockets Layer (SSL): No
8] Load Balanced URL
1] Specify the URL(Required) eg. http://v2inmumpc215:4030
2] Select the Zone as Extranet (Required)
OK.

9] Once we are through with the above steps then we need to change the Authentication of Newly extended web from Windows Authentication to FBA. Follow this path for same:
Central Administration > Application Management > Authentication Providers
10] Select the Web Application to change the authentication (Note: The extended web application will not be listed in this list, so please select the Parent/Base site from list for which we created extended web application.)
11] Once done we will get list of “Zone” and “membership provider Name”
These will be as follows:
Zone             Membership Provider Name
Default          Windows
Extranet         Windows
12] Select the “Extranet” from above.
1] Authentication Type: Forms
2] Enable anonymous access by checking the check box.
3] Membership Provider Name: AspNetSqlMembershipProvider
Save.
13] Now we need to change the web.config file of the Extended Web and Site Central Administration site with following key
 ”
 ”
 ” “”

Note Add this just above and below node

14] Reset IIS.
15] Once IIS is reset please follow the following path to set policy for web application
Central Administration > Application Management > Policy for Web Application
 we will be taken to the http://server name: portnumber/_admin/policy.aspx page
16] Select the Web application for which the policy is to be set.
 (Note: The extended web application will not be listed in this list, so please select the Parent/Base site from list for which we created extended web application.)
17] Click on the “Add Users” link.
 1] Select a Web application
(Note: The extended web application will not be listed in this list, so please select the Parent/Base site from list for which we created extended web application.)
 2] Select the Zone : in our case “Extranet”.
 3] Next
 4] Specify the User Name: Now here Specify the user from the FBA database that is already been created. (Note: Dont specify the AD user name.)
 5] Choose Permissions : Full Control - Has full control.
 6] Finish

And we are through with the TASK.

Now the check the Extended Web application from the Internet Explorer. eg http://servername:4030
Articles for reference:1] For Creating FBA SharePoint site.http://weblog.vb-tech.com/nick/archive/2006/06/14/1617.aspx
2] For Extending Web Application
http://blogs.msdn.com/sharepoint/archive/2006/08/16/configuring-multiple-authentication-providers-for-sharepoint-2007.aspx
http://technet2.microsoft.com/windowsserver/WSS/en/library/571cef56-51e7-4815-be6c-a98f2c88809d1033.mspx?mfr=true
3]
Membership and Role Providers in ASP.NET 2.0
http://www.odetocode.com/Articles/427.aspx


Posted in Share Point.

No comments



activate Office SharePoint Server Publishing Infrastructure feature

What features must be turned on to activate Office SharePoint Server Publishing Infrastructure feature?







Description:

Since SharePoint sites created using any template (except Publishsing-Collaboration template) lacks the “Publishing Feature” which is responsible for Creating a Web page library as well as supporting libraries to create and publish
pages based on page layouts.


    So in order to enable this feature on SharePoint site we  goto
Site features which can be found under Site Settings >> Site Administration (heading) >> Site feature and here is where we face the above stated problem/issue.



Solution

You have
to turn on the publishing feature at the site collection level.  NOTE:
You have to be a Site Collection Admin to do this:


1) If you are not at the root of your site, under Site Collection Administration, click Go to top level site settings.

2) On the Site Settings page, under Site Collection Administration, click Site collection features.

3) On the Site Collection Features page, next to Office SharePoint Server Publishing Infrastructure, click Activate.







Posted in Share Point.

No comments



Programmatically-customize SharePoint Navigation Breadcrumb


Programmatically-customize SharePoint Navigation Breadcrumb.


The Code is available at site:

http://tomblog.insomniacminds.com/tag/sitemappath/
I had tried the code posted in the url below and found that it does not
work.


So to accomplish the sameobjective I had used a asp.net user control[.ascx
file].

The following is code wrt above. [code is self explainatory]

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Diagnostics;

// SharePoint Namespaces
using Microsoft.SharePoint;
using Microsoft.SharePoint.Navigation;
using Microsoft.SharePoint.WebControls;
using Microsoft.SharePoint.WebPartPages;

public partial class V2_Breadcrumb : System.Web.UI.UserControl
{
 protected void Page_Load(object sender, EventArgs e)
 {
 #region Event Logs
''''''' EventLog writeLog = new EventLog(”Application”);
''''''' writeLog.MachineName = “.”;
''''''' writeLog.Source = “V2 Breadcrumb Control”;
''''''' #endregion

''''''' string currentPage = string.Empty;
''''''' string currentURL = string.Empty;
''''''' try
''''''' {
''''''''''' currentURL = HttpContext.Current.Request.Url.AbsoluteUri;
''''''''''' currentPage = currentURL.Remove(0, currentURL.LastIndexOf(@”/”) + 1).ToUpper();
''''''''''' currentPage = currentPage.Remove(currentPage.IndexOf(”.”));
''''''''''' currentPage = currentPage.ToUpper();
''''''''''' SetControlVisibilty(currentPage);
''''''' }
''''''' catch (Exception ex)
''''''' {
''''''''''' writeLog.WriteEntry(”Error: ” + ex.Message);
''''''' }
''' }

''' ///


''' /// METHOD FOR BUILDING THE HREF CONTROL WITH ALL ITS PROPERTY SET WHICH WILL BE RENDERED INSIDE CURRENT USER CONTROL.
''' ///
''' ///

''' /// HtmlAnchor
''' private HtmlAnchor BuildHtmlAnchor(string htmlAnchorName)
''' {
''''''' HtmlAnchor hrefControl = new HtmlAnchor();
''''''' string queryString = string.Empty;
''''''' switch (htmlAnchorName)
''''''' {
''''''''''' case “PARENTSITE”:
''''''''''''''' hrefControl.Title = “Torrential Data- CRM solution”;
''''''''''''''' hrefControl.Attributes.Add(”class”, “ms-sitemapdirectional”);
''''''''''''''' hrefControl.Attributes.Add(”style”, “font-size:11px; font-family: Verdana;”);
''''''''''''''' hrefControl.InnerText = “Torrential Data”;
''''''''''''''' hrefControl.HRef = “/Pages/Default.aspx”;''''''''''''''''''''''''''' '
''''''''''''''' break;
''''''''''' case “SUBSITE”:
''''''''''''''' hrefControl.Title = “Sales Portal”;
''''''''''''''' hrefControl.Attributes.Add(”class”, “ms-sitemapdirectional”);
''''''''''''''' hrefControl.Attributes.Add(”style”, “font-size:11px; font-family: Verdana;”);
''''''''''''''' hrefControl.InnerText = “Sales Portal”;
''''''''''''''' hrefControl.HRef = “/SalesPortal/Pages/default.aspx”;'''''''''''''''''''''''''''''''' '
''''''''''''''' break;
''''''''''' case “COMPANYDASHBOARD”:
''''''''''''''' //GET THE COMPANY NAME FROM THE QUERY STRING OF THE URL.
''''''''''''''' queryString = HttpContext.Current.Request.QueryString["Company"];
''''''''''''''' hrefControl.Attributes.Add(”style”, “font-size:11px; font-family: Verdana;”);
''''''''''''''' hrefControl.InnerText = queryString;'''''''''''''' '
''''''''''''''' break;
''''''''''' case “COMPANYFOROPPORTUNITYDASHBOARD”:
''''''''''''''' //GET THE COMPANY NAME FOR THE OPPORTUNITY IN CONTEXT.
''''''''''''''' queryString = HttpContext.Current.Request.QueryString["Opportunity"];
''''''''''''''' SPListItemCollection opportunityListItems = GetOpportunityListItems(queryString);
''''''''''''''' hrefControl.Attributes.Add(”class”, “ms-sitemapdirectional”);
''''''''''''''' hrefControl.Attributes.Add(”style”, “font-size:11px; font-family: Verdana;”);
''''''''''''''' foreach (SPListItem item in opportunityListItems)
''''''''''''''' {
''''''''''''''''''' string companyName = (string)item["Company"].ToString();
''''''''''''''''''' companyName = companyName.Remove(0, companyName.LastIndexOf(”#”)+1);
''''''''''''''''''' hrefControl.InnerText = companyName;
''''''''''''''''''' hrefControl.Title = companyName;
''''''''''''''''''' hrefControl.HRef = @”/SalesPortal/Pages/CompanyDashBoard.aspx?Company=” + companyName;
''''''''''''''' }'''''''''''''' '
''''''''''''''' break;
''''''''''' case “OPPORTUNITYDASHBOARD”:
''''''''''''''' queryString = HttpContext.Current.Request.QueryString["Opportunity"];
''''''''''''''' hrefControl.Attributes.Add(”style”, “font-size:11px; font-family: Verdana;”);
''''''''''''''' hrefControl.InnerText = queryString;'''''''''''''' '
''''''''''''''' break;
''''''''''' default:
''''''''''''''' hrefControl.InnerText = queryString;
''''''''''''''' break;
''''''' }
''''''' return hrefControl;
''' }

''' ///
''' /// Set Visibilty of Control on the masterpage of application
''' ///
''' ///

''' private void SetControlVisibilty(string contextPageName)
''' {
''''''' Control masterPageControl = new Control();
''''''' switch (contextPageName)
''''''' {
''''''''''' case “COMPANYDASHBOARD”:
''''''''''''''' masterPageControl = Page.Master.FindControl(”PlaceHolderTitleBreadcrumb”);// id= PlaceHolderTitleBreadcrumb or ContentMap
''''''''''''''' masterPageControl.Visible = false;
''''''''''''''' masterPageControl = Page.Master.FindControl(”idV2_Breadcrumb”);
''''''''''''''' masterPageControl.Visible = true;
''''''''''''''' break;
''''''''''' case “OPPORTUNITYDASHBOARD”:
''''''''''''''' masterPageControl = Page.Master.FindControl(”PlaceHolderTitleBreadcrumb”);
''''''''''''''' masterPageControl.Visible = false;
''''''''''''''' masterPageControl = Page.Master.FindControl(”idV2_Breadcrumb”);
''''''''''''''' masterPageControl.Visible = true;
''''''''''''''' break;
''''''''''' default:
''''''''''''''' masterPageControl = Page.Master.FindControl(”PlaceHolderTitleBreadcrumb”);
''''''''''''''' masterPageControl.Visible = true;
''''''''''''''' masterPageControl = Page.Master.FindControl(”idV2_Breadcrumb”);
''''''''''''''' masterPageControl.Visible = false;
''''''''''''''' break;
''''''' }'''''' '
''' }

''' protected override void Render(HtmlTextWriter writer)
''' {
''''''' #region Event Logs
''''''' EventLog writeLog = new EventLog(”Application”);
''''''' writeLog.MachineName = “.”;
''''''' writeLog.Source = “V2 BreadCrumbControl”;
''''''' #endregion

''''''' HtmlAnchor hrefBreadcrumb = null;
''''''' string currentPage = string.Empty;
''''''' string currentURL = string.Empty;
''''''' try
''''''' {
''''''''''' currentURL = HttpContext.Current.Request.Url.AbsoluteUri;
''''''''''' currentPage = currentURL.Remove(0, currentURL.LastIndexOf(@”/”) + 1).ToUpper();
''''''''''' writeLog.WriteEntry(”Current Page name: ” + currentPage);
''''''''''' writeLog.WriteEntry(”trimming the currentPage string”);
''''''''''' currentPage = currentPage.Remove(currentPage.IndexOf(”.”));
''''''''''' writeLog.WriteEntry(”Trimmed Current Page name: ” + currentPage);
'''''''''' '
''''''''''' SPWeb breadcrumbWeb = SPControl.GetContextWeb(this.Context);
''''''''''' breadcrumbWeb.Site.OpenWeb();
''''''''''' breadcrumbWeb.AllowUnsafeUpdates = true;
''''''''''' writer.Write(”“);
''''''''''' //check the current page to create href control
''''''''''' switch (currentPage)
''''''''''' {
''''''''''''''' case “COMPANYDASHBOARD”:
''''''''''''''''''' hrefBreadcrumb = BuildHtmlAnchor(”PARENTSITE”);
''''''''''''''''''' this.Controls.Add(hrefBreadcrumb);
''''''''''''''''''' hrefBreadcrumb.RenderControl(writer);
''''''''''''''''''' writer.Write(”>“);

''''''''''''''''''' hrefBreadcrumb = BuildHtmlAnchor(”SUBSITE”);
''''''''''''''''''' this.Controls.Add(hrefBreadcrumb);
''''''''''''''''''' hrefBreadcrumb.RenderControl(writer);
''''''''''''''''''' writer.Write(”>“);

''''''''''''''''''' hrefBreadcrumb = BuildHtmlAnchor(”COMPANYDASHBOARD”);
''''''''''''''''''' this.Controls.Add(hrefBreadcrumb);
''''''''''''''''''' hrefBreadcrumb.RenderControl(writer);
''''''''''''''''''' writer.Write(”“);

''''''''''''''''''' break;
''''''''''''''' case “OPPORTUNITYDASHBOARD”:
''''''''''''''''''' hrefBreadcrumb = BuildHtmlAnchor(”PARENTSITE”);
''''''''''''''''''' this.Controls.Add(hrefBreadcrumb);
''''''''''''''''''' hrefBreadcrumb.RenderControl(writer);
''''''''''''''''''' writer.Write(”>“);
'''''''''''''''''''
''''''''''''''''''' hrefBreadcrumb = BuildHtmlAnchor(”SUBSITE”);
''''''''''''''''''' this.Controls.Add(hrefBreadcrumb);
''''''''''''''''''' hrefBreadcrumb.RenderControl(writer);
''''''''''''''''''' writer.Write(”>“);
'''''''''''''''''''
''''''''''''''''''' // ADD THE COMPANY NAME LOGIC HERE.
''''''''''''''''''' hrefBreadcrumb = BuildHtmlAnchor(”COMPANYFOROPPORTUNITYDASHBOARD”);
''''''''''''''''''' this.Controls.Add(hrefBreadcrumb);
''''''''''''''''''' hrefBreadcrumb.RenderControl(writer);
''''''''''''''''''' writer.Write(”>“);

''''''''''''''''''' hrefBreadcrumb = BuildHtmlAnchor(”OPPORTUNITYDASHBOARD”);
''''''''''''''''''' this.Controls.Add(hrefBreadcrumb);
''''''''''''''''''' hrefBreadcrumb.RenderControl(writer);
''''''''''''''''''' writer.Write(”“);
''''''''''''''''''' break;
''''''''''''''' default:
''''''''''''''''''' break;
''''''''''' }
''''''''''' writer.Write(”");
''''''' }
''''''' catch (Exception ex)
''''''' {
''''''''''' writeLog.WriteEntry(”Error: ” + ex.Message);
''''''' }
''' }

''' ///
''' /// Get Opportunity List Items as per Company name specified
''' ///
''' ///

''' /// SPListItemCollection
''' private SPListItemCollection GetOpportunityListItems(string opportunityName)
''' {
''''''' SPSite topLevelSite = new SPSite(”http://v2inmumpc098:4000/”);
''''''' //SPSite topLevelSite = new SPSite(”http://v2inmumpc215:4013/”);
''''''' SPWeb topLevelWeb = topLevelSite.OpenWeb();
''''''' SPList topLeveList = topLevelWeb.Lists["Opportunities"];
''''''' string listColumnName = “Opportunity_x0020_Name”;
''''''' SPQuery queryList = new SPQuery();
''''''' queryList.Query = “” + opportunityName + ““;
''''''' SPListItemCollection opportunityListItems = topLeveList.GetItems(queryList);
''''''' return opportunityListItems;
''' }'''
}
'

Posted in Share Point.

No comments



Usefull urls part 1

Posted in Personal.

No comments