To add a team project to Team Explorer

To add a team project to Team Explorer

  1. On the File menu, point to Open, and then click Team Project.
  2. In the Connect to Team Foundation Server dialog box, use the drop-down list to select a valid Team Foundation Server.
  3. Under Team projects, select the team projects from the list that you want to add to Team Explorer and then click OK.
    The team project you selected appears under the Team Foundation Server node.

Core 2 duo VS Core i3, Which is better?

core i3 is much faster, better than core2Duo. The reasons are explained below. Also check out the source link to see how both the processors performed in performance tests. That will give you a clear idea. Here is a detailed explanation.

Like the core 2 duo processors, the new core i3 line of processors, have two cores with many other technological enhancements including an integrated GPU (Graphic Processing Unit). The clocking frequency of the core i3 series of processors ranges from 2.26 GHz to 3.06 GHz. Each processor is endowed with the new line of advanced technologies including Intel developed hyperthreading, Intel virtualization and smart cache technology which makes these chips faster than core 2 duo processors. This is the most important point in the core i3 vs core 2 duo comparison.

The Intel codename for core i3 architecture is Clarkdale. They are based on the Westmere architecture with 32 nm fabrication and a direct media interface (DMI) bus. The socket type used for core i3 processors is LGA 1156 and the RAM type is DDR3. They support mother boards with the following types of chipsets- H55, P55, H57 and Q57.

Let us have a look at the latter processors in the core i3 vs core 2 duo comparison. Core 2 Duo processors come in three types of architectures, codenamed as Conroe, Wolfdale and Allendale. With 65 nm and 45 nm fabrications they are a tad slower and less power efficient than the 32 nm based core i3 processors. The socket used for core 2 duo processors is LGA 775 and they come with a FSB bus. The FSB bus is a lot slower in operation than the DMI bus in core i3 processors.

Coupled with the fact that the i3 processors have a L2 cache size of 2 x 256 kb and a L3 cache size of 4MB, with hyperthreading and smart cache enabled, core 2 duo processors are indeed slower. On top of that, DDR3 RAM compatibility in core i3 processors, compared to DDR2 compatibility of core 2 duo processors makes them even more faster. The price range of Intel core i3 is $100 to $133, which makes them top options in the entry level market.

Core i3 Vs Core 2 Duo: Performance
The technical specifications have made it clearly indicated that Intel core i3 beats its predecessor, core 2 duo in almost all departments. This is but natural as they were indeed designed to replace them. Be it processing speed, multitasking or graphic output, opting for core i3 processors is the logical choice to make!

Hope the core i3 vs core 2 duo processor comparison provided in this article has made it easier for you to choose the right processor for your personal desktop computer or laptop computer. Going for a more advanced line of processors is always beneficial in the long run. You should also check out the Intel core i5 and core i7 processors before going ahead as they offer far more computing power and speed, compared to the entry level core i3 or core 2 duo.

Delegate

delegate is a type that references a method. Once a delegate is assigned a method, it behaves exactly like that method. The delegate method can be used like any other method, with parameters and a return value

Delegates have the following properties:
  • Delegates are similar to C++ function pointers, but are type safe.
  • Delegates allow methods to be passed as parameters.
  • Delegates can be used to define callback methods.
  • Delegates can be chained together; for example, multiple methods can be called on a single event.

Turn On Visual Studio 2005/2008/2010 Line Numbering

Visual Studio Line Numbering Setting


 

 Text Editor Settings

Once all of the settings are visible, expand the Text Editor branch of the tree. Here you can see a list of all of the languages for which settings may be modified. We will enable line numbering for C# code editing. Expand the C# node of the tree and select the General section to reveal the settings. To enable source code line numbering, tick the appropriate checkbox. Click OK to accept the setting and the line numbers will appear.


Find number of days in a given month



This user defined functions return the number of days in a given month.
ALTER FUNCTION GetDaysCountInMonth( @Date DATETIME )
RETURNS INT
AS
BEGIN
      DECLARE @count INT
      SET @count = CASE
      WHEN DATEPART(MM,@Date) IN (1, 3, 5, 7, 8, 10, 12) THEN 31
      WHEN DATEPART(MM,@Date) IN (4, 6, 9, 11) THEN 30
      ELSE
            CASE WHEN (DATEPART(YY,@Date) % 4 = 0
            AND
            DATEPART(YY,@Date) % 100 != 0)
            OR
            ((DATEPART(YY,@Date)) % 400 = 0)
            THEN 29
      ELSE 28
END
END
RETURN @count
END
GO

--Result
SELECT dbo.GetDaysCountInMonth(GETDATE()) COUNT
SELECT dbo.GetDaysCountInMonth('2000-02-12') COUNT--Leap year
SELECT dbo.GetDaysCountInMonth('2100-02-12') COUNT


How to Show / Hide a ModalPopupExtender using Javascript


If we have a ModalPopupExtender with the id ‘modPopup_ModalPopupExtender’, and need to display or hide it in javascript, we can easily do this using the $find() function.
Let’s see this in action:

ASPX :


JAVA SCRIPT:


Count Columns in a Table SQL


SELECT  count(*) from information_schema.columns where table_name='giveTableNameHere'
or
SELECT  count(*) FROM syscolumns WHERE   OBJECT_NAME(id) = 'giveTableNameHere'

here i given my tested query for counting columns in a particular Table in a DB

What is LINQ?

Language Integrated Query (LINQ), is a component released within the .NET 3.5 Framework. It is one of the most powerful features of .NET 3.5. It serves the purpose of querying objects.
LINQ comprises a series of operators, which are used to query, filter and project data in arrays, enumerable classes, relational databases and XML. In order to query data, the data needs to be encapsulated as an object. In case the data source is not an object, it first needs to be converted to an object in order for LINQ to query it.
LINQ has its own Query Processing Engine. The information returned by a LINQ query is a collection of in-memory object which may be enumerated.
The LINQ concept treats the data source as an Object, rather than a Database. So we may say, its an object that is queried. LINQ may query any type of data source, like:
  • LINQ querying SQL (MS SQL Server supported).
  • LINQ querying Datasets (Querying is possible on Datasets and DataTables)
  • LINQ querying ORM Solution
  • LINQ querying Objects (In-memory data may be queried)
  • LINQ querying XML (Querying is possible on XML data source

Question:

Could not load file or assembly 'System.Web.Extensions,
Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' 
or one of its dependencies. The system cannot find the file specified. 

solution:

1.Go to Add reference, Select System.Web.Extensions and install this to WebConfig.
and replace existing one in web config.

<compilation debug="true">
<assemblies>
<--replace instead of this -->
<add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>


<--with this one-->


<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>


</assemblies>
</compilation>

how to remove project from tfs

how to  remove TFS related files From Solution:


Step 1: File -> Source Control -> Change Source Control and then unbind and/or disconnect all projects and the solution.

If this helped you, promote this click +1... Thanks

How To Use Self Join In Sql Server 

Self Join in SQL Server 2000/2005 helps in retrieving the records having some relation or similarity with other records in the same database table. A common example of employees table can do more clearly about the self join in sql. Self join in sql means joining the single table to itself. It creates the partial view of the single table and retrieves the related records. You can use aliases for the same table to set a self join between the single table and retrieve the records satisfying the condition in where clause.
For self join in sql you can try the following example:

Create table employees:
emp_id emp_name emp_manager_id
1 Vinoth

Null
2 Prabhu

1
3 Prabha 1
4 Saravanan 2
5 Babu

2
6 Muthu

5
7 Dinesh 5

Now to get the names of managers from the above single table you can use sub queries or simply the self join.

Self Join SQL Query to get the names of manager and employees:
select e1.emp_name 'manager',e2.emp_name 'employee'
from employees e1 join employees e2
on e1.emp_id=e2.emp_manager_id

Result:
manager employee
Vinoth

Prabhu

Vinoth

Prabha

Prabhu

Saravanan

Prabhu Babu


Babu

Muthu

Babu

Dinesh

Understanding the Self Join Example
In the above self join query, employees table is joined with itself using table aliases e1 and e2. This creates the two views of a single table.

from employees e1 join employees e2
on e1.emp_id=e2.emp_manager_id

Here e.emp_manager_id passes the manager id from the 2nd view to the first aliased e1 table to get the names of managers.
Breadcrumbs typically appear horizontally across the top of a web page, usually below title bars or headers. They provide links back to each previous page the user navigated through to get to the current page or—in hierarchical site structures—the parent pages of the current one. Breadcrumbs provide a trail for the user to follow back to the starting or entry point. A greater-than sign (>) often serves as hierarchy separator, although designers may use other glyphs (such as » or ›), as well as various graphical treatments.
Typical breadcrumbs look like this:
Home page > Section page > Subsection page
or
Home page >> Section page >> Subsection page

Types of breadcrumbs

There are three types of web breadcrumbs:
  • Path: path breadcrumbs are dynamic and show the path that the user has taken to arrive at a page.
  • Location: location breadcrumbs are static and show where the page is located in the website hierarchy.
  • Attribute: attribute breadcrumbs give information that categorizes the current page.

try catch in javascript

We can use try catch function in java script.

$('a').click(function (e) {
  try{
      your code here.........
  }
   catch(e){}
  return false;
});
MultiView:
<asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex="0">
<asp:view id=view1" runat ="server">
</view>
<asp:view id=view2" runat ="server">
</view>

</Multiview>
Previous Button:
protected void btnPrev_Click(object sender, EventArgs e)
        {
            MultiView1.ActiveViewIndex--;
        }
Next Button:
        protected void btnNext_Click(object sender, EventArgs e)
        {
            MultiView1.ActiveViewIndex++;
        }

 protected override void OnPreRender(EventArgs e)
        {
            btnPrev.Visible = MultiView1.ActiveViewIndex > 0;
            btnNext.Visible = MultiView1.ActiveViewIndex < MultiView1.Views.Count - 1;
            base.OnPreRender(e);
        }





A potentially dangerous Request.Form value was detected from the client

This issue happening if we entered text in controls that look like HTML statement. We can omit this issue  to set validation request is False.

<%@ Page Language="C#" MasterPageFile="~/ControlPanel/Site1.Master" ValidateRequest="false" AutoEventWireup="true" CodeFile="Cookies.aspx.cs" Inherits="ControlPanel_Cookies" %>



We can set this settings in globally when we write like below in web.config
<system.web>
<pages validateRequest="false" /> 


TRIM in SQL




The TRIM function is helped to remove specified prefix or suffix from a string. The most commonly we are using to remove white spaces.
 



SELECT RTRIM(LTRIM(' dotnettips4all ')) AS TRIM

SELECT RTRIM('             dotnettips4all             ')  AS RTRIM

SELECT LTRIM('        dotnettips4all          ')AS LTRIM