Follow in Twitter & Facebook


Like in Facebook

Powered By Blogger Widgets

Free Download

FREE Tools


Saturday, September 29, 2012

Add user to group in active directory using C#.Net

- No comments
In this article we will discuss about how we can add an user to Active directory using C#.Net code. Also you can check Asp.Net, SQL Server and SharePoint articles.

Below is the full code:

First we need to write using statements like below:

using System.DirectoryServices;
using System.DirectoryServices.AccountManagement;

Tuesday, September 25, 2012

Left outer join and Right outer join in SQL Server

- No comments
In this article we will discuss about Left outer join and Right outer join in SQL Server. You can also check another SQL server articles on different types of joins in SQL Server.

SQL joins are very much useful whenever we are retrieving data from multiple tables.

Left outer join:
First remember Left outer join and left join both are same, there is no difference between left outer join and left join. Left outer join gives all records from the left table as well as match records in two tables and corresponding null value for the right table.

Right outer join:
Similarly right join and right outer join are absoulutely same, there is no difference between a right join and right outer join. Right outer join returns all the matching records from both tables, as well as all records from the right table and corresponding null values for the left table.

Example:
Suppose we have 2 tables name as Employees and Salary as shown in the figure below:
Employees table has 3 columns: ID, Name and Age

Salary table has 2 columns ID and Salary

Now lets try to query left outer join like below:
SELECT e.ID,e.Age,e.Name,e.ID,s.ID FROM employees e
left join Salary s on e.ID=s.ID

The output will come as shown in the figure below:

Since its a left outer join, so its returning all records from the left table (Employees) and corresponding NULL values for Unmatched record.

Now lets try to query right outer join like below:
SELECT e.ID,e.Age,e.Name,e.ID,s.Salary FROM employees e right join Salary s on e.ID=s.ID

Now check the out put in the figure below:

Since its a right outer join so it is showing all records from the right table (salary) and corresponding NULL values for unmatched record.

Sunday, September 23, 2012

SharePoint 2010 metadata tutorial

- No comments
This video tutorial is about Metadata in SharePoint 2010. This also explained about Site Columns, Content
types, Term stores, Term Sets, keywords etc. Also you can check some SharePoint 2013 tutorials.

This video tutorial is presented by i3training.

Saturday, September 22, 2012

SharePoint with Dot Skills Required

- No comments
We have an interesting opportunity for you in the .Net domain for 4- 8 yrs of experience for 2 Companies @ Bangalore.

Required and Mandatory Skills : Sharepoint 2010 / MOSS 2010 ( Development )
Job Location : Bangalore
If you are interested in this opportunity, please send your updated profile to suma.urolagin@careernet.co.in ASAP with the following details and we will contact you immediately for the further process.

Friday, September 21, 2012

Convert first letter to uppercase in C#.Net

- No comments
In this article we will discuss how can we convert first letter to upper case using C#.Net. Also you can check my last article on how to check if string contains a particular string in C#.Net here.  Also you can see a very good article on Remove HTML tags from string in C#.Net.

Below is the full code:
Html code:

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Convert first letter to uppercase in C#.Net</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:TextBox ID="txtEnterText" runat="server"></asp:TextBox><br />
        <asp:Button ID="btnTest" runat="server" 
            Text="Convert First Letter To UpperCase" onclick="btnTest_Click" /><br />
        <asp:Label ID="lblResult" runat="server" Text=""></asp:Label>
    </div>
    </form>
</body>
</html>

.cs code:
protected void btnTest_Click(object sender, EventArgs e)
    {
        if (!string.IsNullOrEmpty(txtEnterText.Text))
        {
            char[] allLetters = txtEnterText.Text.Trim().ToCharArray();
            allLetters[0] = char.ToUpper(allLetters[0]);
            string outPut = new string(allLetters);
            lblResult.Text = outPut;
        }
}

The output will appear like below:

Asp.Net 4 developer job openings

- No comments
We have a very exciting opportunity for the position of Dot Net Developer with good experience in SQL Server 2005/2008.

Job Description:

Job Title: Dot Net- 4 Developer
Job Location: Whitefield, Bangalore.
Experience: 3-4.5 years
Job Type: Permanent

Thursday, September 20, 2012

Disallow space using regular expression validator in asp.net

- No comments
In this article we will discuss how we can disallow users to enter space while inputing data in asp.net by using Regular Expressions validators in asp.net. Validation controls are very useful in asp.net application development. There are ways to do this using JQuery or JavaScript. But here we will discuss how we can achive that by using Asp.Net validation controls.

Here is the full HTML code:

Hardware and software requirement for SharePoint 2013

- No comments
Hardware requirements:According to Microsoft there are different installation scenario for SharePoint 2013. Below are the hardware requirements for different scenarios.

Single server with a built-in database or single server that uses SQL Server (SharePoint Foundation 2013):
For this installation scenario we need 8GB RAM, 64-Bit, 4 crores processor and 80 GB hard disk space.

Single server with a built-in database or single server that uses SQL Server (SharePoint Server 2013):

Tuesday, September 18, 2012

The Search Service is currently offline in SharePoint 2010

- No comments
In this post we will check the solution for "The Search Service is currently offline" error, which very ofter we got in SharePoint search. You can also check my last article on Branding the Search box in SharePoint 2010.

Also you can see an article on FAST Search Server 2010 SharePoint 2010.

If you got the error "The Search Service is currently offline" in SharePoint search. Then try following methods which may be useful to you.

Method-1:
In this method we need to run the Office SharePoint Server Search service. For this go to Start > Administrative Tools > Office SharePoint Server Search. If it is not running then run the service.

Method-2:
Try the below stsadm commands.
stsadm -o osearch -action stop

stsadm -o osearch -action start
And during this command if it prompts to deleted the SSP then select NO.

Hope these 2 solution will work.

This is actually a tricky error. Sometime professionals also stop the MOSS search service and recreating the service with a new database. But this is not a recommended solution.

Tuesday, September 11, 2012

Reset to site definition using SharePoint 2010 designer

- No comments
In this article we will discuss how to reset to site definition or site templates by using SharePoint 2010 designer. I have also explained the details steps how to change the title and description of a SharePoint site using SharePoint 2010 designer in this article.

SharePoint 2010 designer is very much improved as compared to MOSS 2007, but there are still some best practices need to follow.

We can create a site by using existing out of box site templates provided by microsoft such as Team site, blank site etc. You can also check this article for list of site templates available in SharePoint 2010.

When we are using the out of box site definition pages which are also known as uncustomized pages, actually we do not create or save any pages to content database. The content database only contains the reference to those pages.

But If you modify those pages using SharePoint designer then those pages becomes customize page and a copy of the site definition file is stored in the SQL Server content database.
Any customized page can be reset to the uncustomized site definition file. Any customizations you made with SharePoint Designer in advanced edit mode are discarded, except for customizations made to content in the PlaceHolderMain placeholder, or any web part added inside a web part zone.

To reset to the site definition, Open the site in Sharepoint designer 2010. Then from the site tab click on Reset to Template as shown in the figure below.


This will ask a confirmation message as shown in the figure below. Click on Yes.

Once you click on Yes the Reset to Site Definition page will open in the browser, there it will ask wether you want a specific page or all pages. Select the option you requied as shown in the figure below and click on Reset as shown in the figure below.


This will again ask a confirmation message. Click on OK.

Adding meta tags to aspx pages in asp.net

- No comments
In this article we will discuss about how to add meta tags and meta description to .aspx page in an Asp.Net web site. Meta tags and descriptions are very much useful in the context of search engine. So it is necessary to give meta tags and meta descriptions to web sites.

You can also visit some SharePoint 2013, SharePoint 2010, SQL Server and Asp.Net MVC articles here.

There are at least 3 ways we can add meta tags and description to an .aspx page.

1. Add in the page directive:
We can add meta tags and description to the page directive of an .aspx page like below:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="MetaTagTest.aspx.cs" Inherits="MetaTagTest"  MetaDescription="A SharePoint and Asp.Net web site" MetaKeywords="SharePoint,Asp.Net,C#.Net,SQL Server" %>

Here MetaDescription, MetaKeywords are the tags to whom we can set the description and tag respectively.
2. Inside head section:
We can add Meta tags and description inside the <head> </head> section of an .aspx page like below:
<meta name="description" content="A SharePoint and Asp.Net web site" />
<meta name="keywords" content="SharePoint,Asp.Net,C#.Net,SQL Server" />

3. Through .aspx.cs code:
Through code we can also add meta tag and meta description to a page like below:

 protected void Page_Load(object sender, EventArgs e)
    {
        Page.MetaDescription = "A SharePoint and Asp.Net web site";
        Page.MetaKeywords = "SharePoint,Asp.Net,C#.Net,SQL Server";
    }

Saturday, September 8, 2012

Split javascript string

- No comments
In this article we will discuss about how to split a JavaScript string. You can check the last article on Remove HTML tags from string in C#.

Here is the string:

var strMainString = new String();

strMainString = "SharePointDotNet.com|EnjoySharePoint.com|Fewlines4Biju.com";

Friday, September 7, 2012

Asp.net WCF openings with Capgemini

- No comments
Looking for .Net developers with WCF for Capgemini Bangalore. If you are interested please feel free to send your updated resume to shweta.singh@capgemini.com.

Looking for candidates who can join us strictly within 20 days.
  • Total years of Experience:
  • Number of years of experience in .net

JavaScript array tutorial

- No comments
In this article we will see how to define and use an array in JavaScript. Also you can check my last article on how to enable javascript in different browser here. Also you can check some jQuery articles.

To define an array in javascript we can use the keyword var like below:

var arr = new Array();  // Here the size is not defined.

var arr = new Array(3); // Here the array size is defined to 3

Below is the way to add items to the array.

var arr = new Array(3);

arr[0] ="SharePointDotNet.com";
arr[1] ="EnjoySharePoint.com";

arr[2] = "Fewlines4Biju.com";

Remember the array index always starts from 0.

You can also directly define and assign elements to an array like below:

var arr = new Array ("SharePointDotNet.com","EnjoySharePoint.com","Fewlines4Biju.com");

Similarly to retrive value from an array with index like below.

alert ( arr[0] ) : It will return the value which is present in the zeroth index.

Also you can check an article on how to convert an arraylist to string.

Thursday, September 6, 2012

asp.net tutorial for beginners

- 1 comment
This asp.net video tutorial for beginners. Apart from Asp.Net, in this video tutorial they have used Visual Studio 2010. This explains about membership provider.

The below video tutorial explains about Asp.Net concepts like Managed code, unmanaged code, Common

Tuesday, September 4, 2012

Retrieve browser details using C#.Net in Asp.net

- No comments
In this article we will discuss how to get browser details like browser name, browser version etc using C#.Net. You can also check my last article on how to Disable right click by using jQuery in asp.net.

C#.Net provides HttpBrowserCapabilities class to interact with browser properties. This class present in System.Web namespace. So before using the HttpBrowserCapabilities we need to import the namespace.

Full code:
lblBrowserDetails.Text = "Browser name: " + Request.Browser.Browser
            + " Browser Type: " + Request.Browser.Type
            + " Browser Version :" + Request.Browser.Version
            + " Browser Major Version: " + Request.Browser.MajorVersion
            + " Browser Minor Version: " + Request.Browser.MinorVersion
            + " Is Browser in Beta version? " + Request.Browser.Beta;

The output will be like below:
IE:
Browser name: IE Browser Type: IE8 Browser Version :8.0 Browser Major Version: 8 Browser Minor Version: 0 Is Browser in Beta version? False

Firefox:
Browser name: Firefox Browser Type: Firefox15 Browser Version :15.0 Browser Major Version: 15 Browser Minor Version: 0 Is Browser in Beta version? False

Chrome:
Browser name: Chrome Browser Type: Chrome21 Browser Version :21.0 Browser Major Version: 21 Browser Minor Version: 0 Is Browser in Beta version? False

Like this also there are other properties available and we can access.
Reference from:
http://msdn.microsoft.com/en-us/library/3yekbd5b(v=vs.100).aspx

Also you can check SharePoint articles and SharePoint jobs.

Monday, September 3, 2012

Retrieving data from multiple tables using Ado.net

- No comments
In this article we will discuss how to retrieve data from multiple tables. You can also check my last article on DataReader in Asp.net.

Suppose there are multiple tables in SQL Server database. For this example we will retrive using disconnected architure.

Suppose we have 3 tables namely: Employee, Department, EmployeeCategory. In the very straight forward

Sunday, September 2, 2012

SharePoint 2013 App Model

- No comments
Here is a very good video tutorial on SharePoint 2013 App model, which is a new feature of the latest version of SharePoint. The video is presented by Andrew Connell an SharePoint MVP and a popular author.
Also you can check a video tutorial on introduction on SharePoint 2013 and a video tutorial on SharePoint 2013 search.