Tuesday, April 28, 2009

What is SharePoint?

SharePoint is an enterprise information portal, from Microsoft, that can be configuredto run Intranet, Extranet and Internet sites. Microsoft Office SharePoint Server 2007allows people, teams and expertise to connect and collaborate. A SharePoint enterprise portal is composed of both SharePoint Portal and Windows SharePoint Services, with SharePointbeing built upon WSS. WSS is typically used by small teams, projects and companies. SharePointServer is designed for individuals, teams and projects within a medium to large company wide enterprise portal.

Monday, April 27, 2009

Dynamic RadMenu Telerik control in sharepoint.

Steps:
1.Install AJAX Extensions and register required web.config entries. For More Details http://sharepoint.microsoft.com/blogs/mike/Lists/Posts/Post.aspx?ID=3
2.Register following two entries into SafeControls tag of web.config for telerik controls.


3.Register following entry into SafeControls tag of web.config file for code behind file

4.Register following entry into tag of web.config file for telerik control

5.Add following register tag into master page.
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI, Version=2007.3.1425.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" %>
6.Replace Master tag with following tag in master page.
<%@ Master language="C#" inherits="DynamicMenuCodeBehind.DynamicMenuCodeBehind, DynamicMenuCodeBehind, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a8f881868076fc9f"%>
7.Add RadMenu control tag into master page wherever required in master .



8.Change the Skin of RadMenu as per requirement.
9.Create custom list “MenuLinks”
10.Register
Telerik.Charting.dll, Telerik.Web.UI.dll and DynamicMenuCodeBehind.dll assemblies in GAC
11.Copy Skins folder into virtual directories folder like “C:\Inetpub\wwwroot\wss\VirtualDirectories\22543”

Prerequisite :
Skins Folder( DownLoadable)
Telerik.Charting.dll
Telerik.Web.UI.dll
ASPAJAXExtSetup

Code Behind:

Friday, May 30, 2008

convert an amount value in Words

Hi ,
Now we have a function in our sql database which can convert an amount value to its "in words " equivalent ..
just as you do while signing cheques ....
how to use ?select dbo.util_fn_AmountToWords(456.75)
will give u and output of:"Four Hundred And Fifty Six And Seventy Five Paise"

Wednesday, May 28, 2008

To fetch data from gridview to Excel/Doc

private void Export(GridView GridView1) { System.IO.StringWriter sw = new StringWriter(); System.Web.UI.HtmlTextWriter htw = new HtmlTextWriter(sw); HtmlForm frm = new HtmlForm(); Response.ContentType = "application/vnd.ms-excel" ; Response.AddHeader("content-disposition", "attachment;filename=SomeFile.doc"); Response.Charset = "" ; EnableViewState = false ; Controls.Add(frm) ; frm.Controls.Add(GridView1); frm.RenderControl(htw) ; Response.Write(sw.ToString()) ; Response.End() ; }

Saturday, May 24, 2008

Fetching User Phone number from active directory.

protected void Page_Load(object sender, EventArgs e)
{
string path = "LDAP://"; // Path for active directory.
System.DirectoryServices.DirectoryEntry de = new System.DirectoryServices.DirectoryEntry(path);
System.DirectoryServices.DirectorySearcher deSearch = new System.DirectoryServices.DirectorySearcher(de);
deSearch.PropertiesToLoad.Add("mail");
deSearch.PropertiesToLoad.Add("telephoneNumber");
string strUserName = System.Web.HttpContext.Current.User.Identity.Name;
strUserName = strUserName.Remove(0, 10);
deSearch.Filter = ("(sAMAccountName= " + strUserName + ")");
deSearch.SearchScope = SearchScope.Subtree;
SearchResult results = deSearch.FindOne();
TextBox1.Text = results.Properties["mail"][0].ToString();
if ((results.Properties["telephoneNumber"].Count != 0))
{
TextBox1.Text = results.Properties["telephoneNumber"][0].ToString();
}
else
{
Response.Write("Error: There is no entry in telephoneNumber field of the Active Directory for the current user");
}

}