Tuesday, November 29, 2011

Differences betweenn Visual Studio 2005 and 2008

The Visual Studio 2005 is based on Microsoft .Net Framework 2.

The MS Visual Studio 2008 is based on Microsoft .Net Framework 3.5

22 New Features is available in Visual Studio 2008, if compare with VS 2005.

1. LINQ Support

LINQ essentially is the composition of many standard query operators that allow you to work with data in a more intuitive way regardless.

The Visual Studio 2005 is based on Microsoft .Net Framework 2.

The MS Visual Studio 2008 is based on Microsoft .Net Framework 3.5

22 New Features is available in Visual Studio 2008, if compare with VS 2005.

1. LINQ Support

LINQ essentially is the composition of many standard query operators that allow you to work with data in a more intuitive way regardless.

LINQ

The benefits of using LINQ are significant – Compile time checking C# language queries, and the ability to debug step by step through queries.

2. Expression Blend Support

Expression blend is XAML generator tool for silverlight applications. You can install Expression blend as an embedded plug-in to Visual Studio 2008. By this you can get extensive web designer and JavaScript tool.

3. Windows Presentation Foundation

WPF provides you an extensive graphic functionality you never seen these before. Visual Studio 2008 contains plenty of WPF Windows Presentation Foundation Library templates. By this a visual developer who is new to .NET, C# and VB.NET can easily develop the 2D and 3D graphic applications.

Visual Studio 2008 provides free game development library kits for games developers. currently this game development kits are available for C++ and also 2D/3D Dark Matter one image and sounds sets.

4. VS 2008 Multi-Targeting Support

Earlier you were not able to working with .NET 1.1 applications directly in visual studio 2005. Now in Visual studio 2008 you are able to create, run, debug the .NET 2.0, .NET 3.0 and .NET 3.5 applications. You can also deploy .NET 2.0 applications in the machines which contains only .NET 2.0 not .NET 3.x.

5. AJAX support for ASP.NET

AJAX

Previously developer has to install AJAX control library separately that does not come from VS, but now if you install Visual Studio 2008, you can built-in AJAX control library. This Ajax Library contains plenty of rich AJAX controls like Menu, TreeView, webparts and also these components support JSON and VS 2008 contains in built ASP.NET AJAX Control Extenders.

6. JavaScript Debugging Support

Since starting of web development all the developers got frustration with solving javascript errors. Debugging the error in javascript is very difficult. Now Visual Studio 2008 makes it is simpler with javascript debugging. You can set break points and run the javaScript step by step and you can watch the local variables when you were debugging the javascript and solution explorer provides javascript document navigation support.

7. Nested Master Page Support

Already Visual Studio 2005 supports nested master pages concept with .NET 2.0, but the problem with this Visual Studio 2005 that pages based on nested masters can't be edited using WYSIWYG web designer. But now in VS 2008 you can even edit the nested master pages.

8. LINQ Intellisense and Javascript Intellisense support for silverlight applications

javascriptintellisense

Most happy part for .NET developers is Visual Studio 2008 contains intellisense support for javascript. Javascript Intellisense makes developers life easy when writing client side validation, AJAX applications and also when writing Silverlight applications

Intellisense Support: When we are writing the LINQ Query VS provides LINQ query syntax as tool tips.

9. Organize Imports or Usings: We have Organize Imports feature already in Eclipse. SInce many days I have been waiting for this feature even in VS. Now VS contains Organize Imports feature which removes unnecessary namespaces which you have imported. You can select all the namespaces and right click on it, then you can get context menu with Organize imports options like "Remove Unused Usings", "Sort Usings", "Remove and Sort". Refactoring support for new .NET 3.x features like Anonymous types, Extension Methods, Lambda Expressions.

10. Intellisense Filtering: Earlier in VS 2005 when we were typing with intellisense box all the items were being displayed. For example If we type the letter 'K' then intellisense takes you to the items starts with 'K' but also all other items will be presented in intellisense box. Now in VS 2008 if you press 'K' only the items starts with 'K' will be filtered and displayed.

11. Intellisense Box display position

javascriptintellisense

Earlier in some cases when you were typing the an object name and pressing . (period) then intellisense was being displayed in the position of the object which you have typed. Here the code which we type will go back to the dropdown, in this case sometimes programmer may disturb to what he was typing. Now in VS 2008 If you hold the Ctrl key while the intellisense is dropping down then intellisense box will become semi-transparent mode.

12. Visual Studio 2008 Split View

spit

VS 205 has a feature show both design and source code in single window. but both the windows tiles horizontally. In VS 2008 we can configure this split view feature to vertically, this allows developers to use maximum screen on laptops and wide-screen monitors.

Here one of the good feature is if you select any HTML or ASP markup text in source window automatically corresponding item will be selected in design window.

13. HTML JavaScript warnings, not as errors: VS 2005 mixes HTML errors and C# and VB.NET errors and shows in one window. Now VS 2008 separates this and shows javascript and HTML errors as warnings. But this is configurable feature.

14. Debugging .NET Framework Library Source Code:

Now in VS 2008 you can debug the source code of .NET Framework Library methods. Lets say If you want to debug the DataBind() method of DataGrid control you can place a debugging point over there and continue with debug the source code of DataBind() method.

15. In built Silverlight Library

silverlight

Earlier we used to install silverlight SDK separately, Now in VS 2008 it is inbuilt, with this you can create, debug and deploy the silverlight applications.

16. Visual Studio LINQ Designer

LINQ

Already you know in VS 2005 we have inbuilt SQL Server IDE feature. by this you no need to use any other tools like SQL Server Query Analyzer and SQL Server Enterprise Manger. You have directly database explorer by this you can create connections to your database and you can view the tables and stored procedures in VS IDE itself. But now in VS 2008 it has View Designer window capability with LINQ-to-SQL.

17. Inbuilt C++ SDK

Earlier It was so difficult to download and configure the C++ SDK Libraries and tools for developing windows based applications. Now it is inbuilt with VS 2008 and configurable

18. Multilingual User Interface Architecture - MUI

MUI

MUI is an architecture contains packages from Microsoft Windows and Microsoft Office libraries. This supports the user to change the text language display as he wish.

Visual Studio is now in English, Spanish, French, German, Italian, Chinese Simplified, Chinese Traditional, Japanese, and Korean. Over the next couple of months. Microsoft is reengineering the MUI which supports nine local languages then you can even view Visual studio in other 9 local languages.

19. Microsoft Popfly Support

popfly

Microsoft Popfly explorer is an add-on to VS 2008, by this directly you can deploy or hosting the Silverlight applications and Marshup objects

20. Free Tools and Resources

People may feel that I am a promoter to Visual Studio 2008 as a salesman, but we get plenty of free resources and free tools with Visual Studio 2008.

· Visual Studio 2008 Trial

· 101 LINQ Samples

· Free .NET 3.5 control libraries with free sample programs,

· You can get plenty of free video training tutorials from Microsoft BDLC - Beginner Developer Learning Center,

· C++ games development library,

· Microsoft has provided lot of e-Books,

· P2P library and

· Microsoft is providing Coding4Fun sample program kit.

· Visual Studio Registration Discounts: If you register the Visual Studio you get Free Control Libraries, Books, Images, and Discounts.

· Download Visual Studio 2008 free trial

21. We can use for Commercial

Earlier you were spending lot of money to host your .NET applications for commercial use. Now you no need to worry Now Microsoft is providing you to host your application free on Popfly for web pages and also visual studio express projects.

Table of .NET Framework versions

A detailed list of these versions is found in the table below. The table does not represent a complete listing of releases for the framework.

1) .net versions

Version Name

Version Number[1]

Release Date

Mainstream Support Retired

Extended Support Retired

Service Pack Retired

Pre-beta

?.?.????.?

2000-07-11




1.0 Beta 1

1.0.????.0

2000-11-??




1.0 Beta 2

1.0.2914.0

2001-06-20




1.0 RTM

1.0.3705.0

2002-03-05[2]

2007-07-10[3]

2009-07-14[3]

2003-03-19

1.0 SP1

1.0.3705.209

2002-03-19

N/A

N/A

2003-08-07

1.0 SP2

1.0.3705.288

2002-08-07[4]

N/A

N/A

2005-07-21

1.0 SP3

1.0.3705.6018

2004-08-25[4]




1.1 RTM

1.1.4322.573

2003-04-01

2008-10-14[5]

2013-10-08[5]

2005-09-09

1.1 SP1

1.1.4322.2032

2004-08-25[6]




1.1 SP1 (Server 2003)

1.1.4322.2300

2005-03-30[6]




1.1 (KB893251)

1.1.4322.2310

2005-03-25




1.1 (KB927495)

1.1.4322.2407

2007-02-21




1.1 (KB953297)

1.1.4322.2443

2009-10-13




2.0 Beta 1

2.0.40607.16

2004-07-03




2.0 Beta 2

2.0.50215.44

2005-04-18




2.0 RTM (x86)

2.0.50727.42

2006-01-22[7]

2011-04-12[8]

2016-04-12[8]

2009-01-13

2.0 RTM (Vista)

2.0.50727.312

2007-01-30




2.0 (KB928365)

2.0.50727.832

2007-07-10




2.0 SP1 (x86)

2.0.50727.1433

2007-11-19[9]

N/A

N/A

2010-01-12

2.0 SP1 (x64)

2.0.50727.????

2007-11-19[10]

N/A

N/A

2010-01-12

2.0 SP1 (Server 2008 and Vista SP1)

2.0.50727.1434





2.0 SP2 (installed with 3.5 SP1)

2.0.50727.3053

2009-01-16[11]




2.0 SP2 (x86) (installed with 3.5 Family Update)

2.0.50727.3082

2008-12-17[11]




2.0 SP2 (x64) (installed with 3.5 Family Update)

2.0.50727.????

2009-1-26[11]




2.0 SP2 (Vista/Server 2008 - x86) (installed with 3.5 Family Update)

2.0.50727.????

2009-1-26[11]




2.0 SP2 (XP, Server 2003 - Without 3.5 Family Update)

2.0.50727.????

2009-1-26[12]




2.0 SP2 (KB974417)

2.0.50727.3603

2009-10-13




2.0 SP2 (KB976569)

2.0.50727.3607

2009-10-20




2.0 SP2 (KB983583)

2.0.50727.3615

2010-08-10




2.0 SP2 (Windows Vista SP2 / Server 2008 SP2)

2.0.50727.4016





2.0 SP2 (installed with Windows 7 RC)

2.0.50727.4918

2009-05-05




2.0 SP2 (installed with Windows 7 RTM)

2.0.50727.4927

2009-10-22 (General Availability)




2.0 SP2 (KB983590)

2.0.50727.4952

2010-08-10




3.0 RTM

3.0.4506.30

2006-11-21[13]

2011-04-12[14]

2017-11-04


3.0 RTM (Vista)

3.0.4506.26

2007-01-30




3.0 SP1 Beta

3.0.4506.590

2007-07-26




3.0 SP1

3.0.4506.648

2007-11-19[15]




3.0 SP2

3.0.4506.2123

2009-01-16[11]




3.0 SP2 (installed with 3.5 SP1)

3.0.4506.2254

2008-11-xx




3.5 Beta 1

3.5.20404.0

2007-04-19




3.5 Beta 2

3.5.20706.1

2007-07-26




3.5 RTM

3.5.21022.8

2007-11-20[16]

2011-04-12[14]

2018-10-04


3.5 SP1 Beta

3.5.30428.1

2008-05-10




3.5 SP1 RTM

3.5.30729.01

2008-11-18[17]




3.5 SP1 (Windows 7 Edition)

3.5.30729.4926

2009-07-13

2015-01-13[14]



4.0 Beta 1

4.0.20506

2009-05-20




4.0 Beta 2

4.0.21006

2009-10-19[18] (MSDN)

2009-10-21 (General Availability)




4.0 (RC 1)

4.0.30128.1

2010-02-10 (General Availability)




4.0 (Final)

4.0.30319.1

2010-04-12




2)

.net versions use visual studio

Version

Version Number

Release Date

Visual Studio

Default in Windows

1.0

1.0.3705.0

2002-02-13

Visual Studio .NET


1.1

1.1.4322.573

2003-04-24

Visual Studio .NET 2003

Windows Server 2003

2.0

2.0.50727.42

2005-11-07

Visual Studio 2005

Windows Server 2003 R2

3.0

3.0.4506.30

2006-11-06


Windows Vista, Windows Server 2008

3.5

3.5.21022.8

2007-11-19

Visual Studio 2008

Windows 7, Windows Server 2008 R2

4.0

4.0.30319.1

2010-04-12

Visual Studio 2010


Prior Visual Studio Version 4.0 there were Visual Basic 3, Visual C++, Visual FoxPro and Source Safe as separate products.

3)Visual studio versions

Product name

Internal
version

.NET Framework
version

Release date

Visual Studio

4.0

N/A

Spring 1995

Visual Studio 97

5.0

N/A

1997

Visual Studio 6.0

6.0

N/A

1998-06

Visual Studio .NET (2002)

7.0

1.0

2002-02-13

Visual Studio .NET 2003

7.1

1.1

2003-04-24

Visual Studio 2005

8.0

2.0

2005-11-07

Visual Studio 2008

9.0

3.5

2007-11-19

Visual Studio 2010

10.0

4.0

2010-04-12

The benefits of using LINQ are significant – Compile time checking C# language queries, and the ability to debug step by step through queries.

2. Expression Blend Support

Expression blend is XAML generator tool for silverlight applications. You can install Expression blend as an embedded plug-in to Visual Studio 2008. By this you can get extensive web designer and JavaScript tool.

3. Windows Presentation Foundation

WPF provides you an extensive graphic functionality you never seen these before. Visual Studio 2008 contains plenty of WPF Windows Presentation Foundation Library templates. By this a visual developer who is new to .NET, C# and VB.NET can easily develop the 2D and 3D graphic applications.

Visual Studio 2008 provides free game development library kits for games developers. currently this game development kits are available for C++ and also 2D/3D Dark Matter one image and sounds sets.

4. VS 2008 Multi-Targeting Support

Earlier you were not able to working with .NET 1.1 applications directly in visual studio 2005. Now in Visual studio 2008 you are able to create, run, debug the .NET 2.0, .NET 3.0 and .NET 3.5 applications. You can also deploy .NET 2.0 applications in the machines which contains only .NET 2.0 not .NET 3.x.

5. AJAX support for ASP.NET

AJAX

Previously developer has to install AJAX control library separately that does not come from VS, but now if you install Visual Studio 2008, you can built-in AJAX control library. This Ajax Library contains plenty of rich AJAX controls like Menu, TreeView, webparts and also these components support JSON and VS 2008 contains in built ASP.NET AJAX Control Extenders.

6. JavaScript Debugging Support

Since starting of web development all the developers got frustration with solving javascript errors. Debugging the error in javascript is very difficult. Now Visual Studio 2008 makes it is simpler with javascript debugging. You can set break points and run the javaScript step by step and you can watch the local variables when you were debugging the javascript and solution explorer provides javascript document navigation support.

7. Nested Master Page Support

Already Visual Studio 2005 supports nested master pages concept with .NET 2.0, but the problem with this Visual Studio 2005 that pages based on nested masters can't be edited using WYSIWYG web designer. But now in VS 2008 you can even edit the nested master pages.

8. LINQ Intellisense and Javascript Intellisense support for silverlight applications

javascriptintellisense

Most happy part for .NET developers is Visual Studio 2008 contains intellisense support for javascript. Javascript Intellisense makes developers life easy when writing client side validation, AJAX applications and also when writing Silverlight applications

Intellisense Support: When we are writing the LINQ Query VS provides LINQ query syntax as tool tips.

9. Organize Imports or Usings: We have Organize Imports feature already in Eclipse. SInce many days I have been waiting for this feature even in VS. Now VS contains Organize Imports feature which removes unnecessary namespaces which you have imported. You can select all the namespaces and right click on it, then you can get context menu with Organize imports options like "Remove Unused Usings", "Sort Usings", "Remove and Sort". Refactoring support for new .NET 3.x features like Anonymous types, Extension Methods, Lambda Expressions.

10. Intellisense Filtering: Earlier in VS 2005 when we were typing with intellisense box all the items were being displayed. For example If we type the letter 'K' then intellisense takes you to the items starts with 'K' but also all other items will be presented in intellisense box. Now in VS 2008 if you press 'K' only the items starts with 'K' will be filtered and displayed.

11. Intellisense Box display position

javascriptintellisense

Earlier in some cases when you were typing the an object name and pressing . (period) then intellisense was being displayed in the position of the object which you have typed. Here the code which we type will go back to the dropdown, in this case sometimes programmer may disturb to what he was typing. Now in VS 2008 If you hold the Ctrl key while the intellisense is dropping down then intellisense box will become semi-transparent mode.

12. Visual Studio 2008 Split View

spit

VS 205 has a feature show both design and source code in single window. but both the windows tiles horizontally. In VS 2008 we can configure this split view feature to vertically, this allows developers to use maximum screen on laptops and wide-screen monitors.

Here one of the good feature is if you select any HTML or ASP markup text in source window automatically corresponding item will be selected in design window.

13. HTML JavaScript warnings, not as errors: VS 2005 mixes HTML errors and C# and VB.NET errors and shows in one window. Now VS 2008 separates this and shows javascript and HTML errors as warnings. But this is configurable feature.

14. Debugging .NET Framework Library Source Code:

Now in VS 2008 you can debug the source code of .NET Framework Library methods. Lets say If you want to debug the DataBind() method of DataGrid control you can place a debugging point over there and continue with debug the source code of DataBind() method.

15. In built Silverlight Library

silverlight

Earlier we used to install silverlight SDK separately, Now in VS 2008 it is inbuilt, with this you can create, debug and deploy the silverlight applications.

16. Visual Studio LINQ Designer

LINQ

Already you know in VS 2005 we have inbuilt SQL Server IDE feature. by this you no need to use any other tools like SQL Server Query Analyzer and SQL Server Enterprise Manger. You have directly database explorer by this you can create connections to your database and you can view the tables and stored procedures in VS IDE itself. But now in VS 2008 it has View Designer window capability with LINQ-to-SQL.

17. Inbuilt C++ SDK

Earlier It was so difficult to download and configure the C++ SDK Libraries and tools for developing windows based applications. Now it is inbuilt with VS 2008 and configurable

18. Multilingual User Interface Architecture - MUI

MUI

MUI is an architecture contains packages from Microsoft Windows and Microsoft Office libraries. This supports the user to change the text language display as he wish.

Visual Studio is now in English, Spanish, French, German, Italian, Chinese Simplified, Chinese Traditional, Japanese, and Korean. Over the next couple of months. Microsoft is reengineering the MUI which supports nine local languages then you can even view Visual studio in other 9 local languages.

19. Microsoft Popfly Support

popfly

Microsoft Popfly explorer is an add-on to VS 2008, by this directly you can deploy or hosting the Silverlight applications and Marshup objects

20. Free Tools and Resources

People may feel that I am a promoter to Visual Studio 2008 as a salesman, but we get plenty of free resources and free tools with Visual Studio 2008.

· Visual Studio 2008 Trial

· 101 LINQ Samples

· Free .NET 3.5 control libraries with free sample programs,

· You can get plenty of free video training tutorials from Microsoft BDLC - Beginner Developer Learning Center,

· C++ games development library,

· Microsoft has provided lot of e-Books,

· P2P library and

· Microsoft is providing Coding4Fun sample program kit.

· Visual Studio Registration Discounts: If you register the Visual Studio you get Free Control Libraries, Books, Images, and Discounts.

· Download Visual Studio 2008 free trial

21. We can use for Commercial

Earlier you were spending lot of money to host your .NET applications for commercial use. Now you no need to worry Now Microsoft is providing you to host your application free on Popfly for web pages and also visual studio express projects.

Table of .NET Framework versions

A detailed list of these versions is found in the table below. The table does not represent a complete listing of releases for the framework.

1) .net versions

Version Name

Version Number[1]

Release Date

Mainstream Support Retired

Extended Support Retired

Service Pack Retired

Pre-beta

?.?.????.?

2000-07-11




1.0 Beta 1

1.0.????.0

2000-11-??




1.0 Beta 2

1.0.2914.0

2001-06-20




1.0 RTM

1.0.3705.0

2002-03-05[2]

2007-07-10[3]

2009-07-14[3]

2003-03-19

1.0 SP1

1.0.3705.209

2002-03-19

N/A

N/A

2003-08-07

1.0 SP2

1.0.3705.288

2002-08-07[4]

N/A

N/A

2005-07-21

1.0 SP3

1.0.3705.6018

2004-08-25[4]




1.1 RTM

1.1.4322.573

2003-04-01

2008-10-14[5]

2013-10-08[5]

2005-09-09

1.1 SP1

1.1.4322.2032

2004-08-25[6]




1.1 SP1 (Server 2003)

1.1.4322.2300

2005-03-30[6]




1.1 (KB893251)

1.1.4322.2310

2005-03-25




1.1 (KB927495)

1.1.4322.2407

2007-02-21




1.1 (KB953297)

1.1.4322.2443

2009-10-13




2.0 Beta 1

2.0.40607.16

2004-07-03




2.0 Beta 2

2.0.50215.44

2005-04-18




2.0 RTM (x86)

2.0.50727.42

2006-01-22[7]

2011-04-12[8]

2016-04-12[8]

2009-01-13

2.0 RTM (Vista)

2.0.50727.312

2007-01-30




2.0 (KB928365)

2.0.50727.832

2007-07-10




2.0 SP1 (x86)

2.0.50727.1433

2007-11-19[9]

N/A

N/A

2010-01-12

2.0 SP1 (x64)

2.0.50727.????

2007-11-19[10]

N/A

N/A

2010-01-12

2.0 SP1 (Server 2008 and Vista SP1)

2.0.50727.1434





2.0 SP2 (installed with 3.5 SP1)

2.0.50727.3053

2009-01-16[11]




2.0 SP2 (x86) (installed with 3.5 Family Update)

2.0.50727.3082

2008-12-17[11]




2.0 SP2 (x64) (installed with 3.5 Family Update)

2.0.50727.????

2009-1-26[11]




2.0 SP2 (Vista/Server 2008 - x86) (installed with 3.5 Family Update)

2.0.50727.????

2009-1-26[11]




2.0 SP2 (XP, Server 2003 - Without 3.5 Family Update)

2.0.50727.????

2009-1-26[12]




2.0 SP2 (KB974417)

2.0.50727.3603

2009-10-13




2.0 SP2 (KB976569)

2.0.50727.3607

2009-10-20




2.0 SP2 (KB983583)

2.0.50727.3615

2010-08-10




2.0 SP2 (Windows Vista SP2 / Server 2008 SP2)

2.0.50727.4016





2.0 SP2 (installed with Windows 7 RC)

2.0.50727.4918

2009-05-05




2.0 SP2 (installed with Windows 7 RTM)

2.0.50727.4927

2009-10-22 (General Availability)




2.0 SP2 (KB983590)

2.0.50727.4952

2010-08-10




3.0 RTM

3.0.4506.30

2006-11-21[13]

2011-04-12[14]

2017-11-04


3.0 RTM (Vista)

3.0.4506.26

2007-01-30




3.0 SP1 Beta

3.0.4506.590

2007-07-26




3.0 SP1

3.0.4506.648

2007-11-19[15]




3.0 SP2

3.0.4506.2123

2009-01-16[11]




3.0 SP2 (installed with 3.5 SP1)

3.0.4506.2254

2008-11-xx




3.5 Beta 1

3.5.20404.0

2007-04-19




3.5 Beta 2

3.5.20706.1

2007-07-26




3.5 RTM

3.5.21022.8

2007-11-20[16]

2011-04-12[14]

2018-10-04


3.5 SP1 Beta

3.5.30428.1

2008-05-10




3.5 SP1 RTM

3.5.30729.01

2008-11-18[17]




3.5 SP1 (Windows 7 Edition)

3.5.30729.4926

2009-07-13

2015-01-13[14]



4.0 Beta 1

4.0.20506

2009-05-20




4.0 Beta 2

4.0.21006

2009-10-19[18] (MSDN)

2009-10-21 (General Availability)




4.0 (RC 1)

4.0.30128.1

2010-02-10 (General Availability)




4.0 (Final)

4.0.30319.1

2010-04-12




2)

.net versions use visual studio

Version

Version Number

Release Date

Visual Studio

Default in Windows

1.0

1.0.3705.0

2002-02-13

Visual Studio .NET


1.1

1.1.4322.573

2003-04-24

Visual Studio .NET 2003

Windows Server 2003

2.0

2.0.50727.42

2005-11-07

Visual Studio 2005

Windows Server 2003 R2

3.0

3.0.4506.30

2006-11-06


Windows Vista, Windows Server 2008

3.5

3.5.21022.8

2007-11-19

Visual Studio 2008

Windows 7, Windows Server 2008 R2

4.0

4.0.30319.1

2010-04-12

Visual Studio 2010


Prior Visual Studio Version 4.0 there were Visual Basic 3, Visual C++, Visual FoxPro and Source Safe as separate products.

3)Visual studio versions

Product name

Internal
version

.NET Framework
version

Release date

Visual Studio

4.0

N/A

Spring 1995

Visual Studio 97

5.0

N/A

1997

Visual Studio 6.0

6.0

N/A

1998-06

Visual Studio .NET (2002)

7.0

1.0

2002-02-13

Visual Studio .NET 2003

7.1

1.1

2003-04-24

Visual Studio 2005

8.0

2.0

2005-11-07

Visual Studio 2008

9.0

3.5

2007-11-19

Visual Studio 2010

10.0

4.0

2010-04-12

Get control name in Page_Load event which make the post back

Hi,

Few day back i need post back control name in the Page_Load event. I did lots of search on net. I found few intersting fact about that and i am sharing that.

There are two types of controls which make post back in ASP.NET. One button type control like image button, button (whose type is “submit”), and another type use javascript function “_doPostBack” for the post back.

If post back control is button type then it will be added in the Request.Form collection means if there are two button in a page named button1 and button2 and if button1 make post back then only button1 will be in Request.Form Collection not button2 (but Request.Form collection can contains other server controls also like if page contains few textbox, dropdown list etc.) and if post back made by the button2 then only button2 will be available in Request.Form collection not button1(with other server control as I discuss earlier).

So if you want to catch which button type control made a post back in page load event, you have to just iterate the Request.Form collection.

I’ll show you demo latter in this article.

Another category of server control who make post back use the client side javascript function _doPostBack like if we made autopostback true for dropdown list, radio button etc.

If you look view source you will found _doPostBack javascript function.

function __doPostBack(eventTarget, eventArgument)

{

if (!theForm.onsubmit || (theForm.onsubmit() ! = false ))

{

theForm.__EVENTTARGET.value = eventTarget;

theForm.__EVENTARGUMENT.value = eventArgument; theForm.submit();

}

}

As you can see this function take two arguments “eventTarget” and “eventArgument”. “eventTarget” used for the control ID who is responsible for the postback and “eventArgument” used for the additional information about the control.

If you look at the view source you will also found these two hidden fields.

Lets add one dropdown server control in page and make autopostback true also add some dummy data. If you look at the view source you will found

ASP.NET engine automatically add onchange event and call the _doPostBack function and pass the appropriate parameter.

_doPostBack function first set the value of those hidden field and then submit the form. So if you want to know whether this dropdown list make post back or not you have to just check the value of “__EVENTTARGET” hidden field from the form parameter collection. I’ll show you code as well.

In my example I am adding two buttons, one image button, one dropdown list, one checkbox and two image buttons. I’ll try to print the control name which makes the post back. All I’ll try to find in page load event. So be ready for the ride.

public partial class _Default : System.Web.UI.Page

{

protected void Page_Load(object sender, EventArgs e)

{

if (IsPostBack)

Response.Write(getPostBackControlName());

}

private string getPostBackControlName()

{

Control control = null;

//first we will check the "__EVENTTARGET" because if post back made by the controls

//which used "_doPostBack" function also available in Request.Form collection.

string ctrlname = Page.Request.Params["__EVENTTARGET"];

if (ctrlname != null && ctrlname != String.Empty)

{

control = Page.FindControl(ctrlname);

}

// if __EVENTTARGET is null, the control is a button type and we need to

// iterate over the form collection to find it

else

{

string ctrlStr = String.Empty;

Control c = null;

foreach (string ctl in Page.Request.Form)

{

//handle ImageButton they having an additional "quasi-property" in their Id which identifies

//mouse x and y coordinates

if (ctl.EndsWith(".x") || ctl.EndsWith(".y"))

{

ctrlStr = ctl.Substring(0, ctl.Length - 2);

c = Page.FindControl(ctrlStr);

}

else

{

c = Page.FindControl(ctl);

}

if (c is System.Web.UI.WebControls.Button ||

c is System.Web.UI.WebControls.ImageButton)

{

control = c;

break;

}

}

}

return control.ID;

}

}

I Hope that will help you out in some situation. If you have any issue you can post in this blog.

Thanks

Rajesh Arthimalla

find Date Difference using Java Script

function DateDifference()
{
var days = 0;
var difference = 0;
var startDate = new Date(document.getElementById('txtFromDate').value);
var endDate = new Date(document.getElementById('txtToDate').value);
difference = endDate - startDate;
days = Math.round(difference/(1000*60*60*24));
alert(days.toString());
}

Date Validation using JavaScript

function DateValidation(ObjSrc) {

var d = document.getElementById(ObjSrc.id).value.split('/');
var mm = d[0];
var dd = d[1];
var yy = d[2];
var correct = true;

var todayDate = new Date();
if (mm <= 12)
correct = true;
else {alert("Invalid Date"); return false; }
if ((mm == 1) || (mm == 3) || (mm == 5) || (mm == 7) || (mm == 8) || (mm == 10) || (mm == 12)) {
if (dd <= 31)
correct = true;
else { alert("Invalid Date"); return false; }
}
if ((mm == 4) || (mm == 6) || (mm == 9) || (mm == 11)) {
if (dd <= 30)
correct = true;
else { alert("Invalid Date"); return false; }
}
if (ObjSrc.id == "txtDateOfBirth")
{
if (yy <= (todayDate.getFullYear() - 18)) {

correct = true;
}
else { alert("Invalid Date"); return false; }
if (yy >= (todayDate.getFullYear() - 70))
correct = true;
else { alert("Invalid Date"); return false; }
}
if (ObjSrc.id == "txtDateofJoining") {
if (yy >= (todayDate.getFullYear() - 70))
correct = true;
else { alert("Invalid Date"); return false; }


}

//leap year checking
var leap;
if (yy % 400 == 0 || (yy % 100 != 0 && yy % 4 == 0)) {
leap = 1;

}
else {
leap = 0;

}
if ((leap == 1) && (mm == 2) && (dd <= 29))
correct = true;
if ((leap == 0) && (mm == 2) && (dd <= 28))
correct = true;
if ((leap == 0) && (mm == 2) && (dd >= 28)) {
alert("Invalid Date");
return false;

}
if (correct == true) {

return true;
}
}

RemoteConnection to SqlServer

To configure the Database Engine to accept remote connections      1.In SQL Server Configuration Manager, expand SQL Server Network Configuration, and then click Protocols for .    2.In the details pane, right-click one of the available protocols, and then click Properties.    3.Enable Tcp/Ip and Named Pipes.  sql server browser always running to allow remote connections.
To start or stop the SQL Server Browser service using SQL Server Configuration Manager 1.From the Start menu, right-click All Programs, point to Microsoft SQL Server 2008 R2, point to Configuration Tools, and then click SQL Server Configuration Manager. 2.In SQL Server Configuration Manager, click SQL Server Services. 3.In the details pane, right-click SQL Server Browser, and then click Start or Stop.

Saturday, August 8, 2009

Rajesh Arthimalla



Rajesh Arthimalla
M-tech CSE.
Pedakurapadu,Guntur District, AP, India.
pin-522402.
ph no:+91-9701735399.