Monday, 27 February 2012

Introduction to .Net Framework


Microsoft started development on the .NET Framework in the late 1990s originally under the name of Next Generation Windows Services (NGWS). By late 2000 the first beta versions of .NET 1.0 were released.

Version
Release Date
05-01-2002
01-04-2003
07-11-2005
06-11-2006
19-11-2007

.NET Framework 1.0

This is the first release of the .NET Framework. Released on February 13, 2002. Available for Windows 98, NT 4.0, 2000, and XP.

.NET Framework 1.1

This is the first major .NET Framework upgrade and was published on April 3, 2003. It is also part of the second release of Microsoft Visual Studio .NET (released as Visual Studio .NET 2003). This is the first version of the .NET Framework to be included as part of the Windows operating system, shipping with Windows Server 2003.

Changes since 1.0

  • Built-in support for mobile ASP.NET controls. Previously available as an add-on for .NET Framework, now part of the framework.
  • Built-in support for ODBC and Oracle databases. Previously available as an add-on for .NET Framework 1.0, now part of the framework.
  • .NET Compact Framework - a version of the .NET Framework for small devices.
  • Numerous API changes.

.NET Framework 2.0

 Changes since 1.1

  • Numerous API changes.
  • Language support for Generics built directly into the .NET CLR.
  • Many additional and improved ASP.NET web controls.
  • New data controls with declarative data binding.
  • New personalization features for ASP.NET, such as support for themes, skins and webparts.

.NET Framework 3.0

Formerly called WinFX, includes a new set of managed code APIs that are an integral part of Windows Vista and Windows Server 2008 operating systems. It consists of four major new components:

 .NET Framework 3.5

Version 3.5 of the .NET Framework was officially released to manufacturing (RTM) on November 19, 2007.
As with previous versions, a new .NET Compact Framework 3.5 was released in tandem with this update in order to provide support for additional features on Windows Mobile and Windows Embedded CE devices.

Changes since version 3.0

  • New language features in C# 3.0 and VB.NET 9.0 compiler
  • Adds support for expression trees and lambda methods
  • Extension methods
  • Anonymous types with static type inference
  • Language Integrated Query (LINQ) along with its various providers
    • LINQ to Objects
    • LINQ to XML
    • LINQ to SQL
  • Paging support for ADO.NET
  • ADO.NET synchronization API to synchronize local caches and server side datastores
  • ASP.NET AJAX is included

SP1 (codename "Arrowhead")

.NET Framework 3.5 SP1, codenamed "Arrowhead", reportedly will enhance support for occasionally connected applications, and provide built-in support for the Microsoft ASP.NET Model-View-Controller (MVC) Framework.

Future development

Microsoft has not yet made public a roadmap of the development plans for future edition of .NET framework, but has released general information regarding it. To this end, it will include technologies like PLINQ (Parallel LINQ), a parallel implementation of the LINQ engine, and Task Parallel Library, which exposes parallel constructs via method calls.

Introduction to C#


C Sharp (programming language)

C# is an object-oriented programming language developed by Microsoft as part of the .NET initiative and later approved as a standard by ECMA and ISO . Anders Hejlsberg leads development of the C# language, which has a procedural, object-oriented syntax based on C++ and includes influences from aspects of several other programming languages (most notably Delphi and Java) with a particular emphasis on simplification.

History

During the development of .NET, the class libraries were originally written in a language called Simple Managed C (SMC). In January 1999, Anders Hejlsberg formed a team to build a new language at the time called Cool. By the time the .NET project was publicly announced at the July 2000 Professional Developers Conference (PDC), the language had been renamed C# and the class libraries and ASP.NET runtime had been ported to C#.

C#'s principal designer and lead architect at Microsoft is Anders Hejlsberg, who was previously involved with the design of Visual J++, Borland Delphi, and Turbo Pascal. In interviews and technical papers he has stated that flaws in most major programming languages (e.g. C++, Java, Delphi, and Smalltalk) drove the fundamentals of the Common Language Runtime (CLR), which, in turn, drove the design of the C# programming language itself.

Design goals

The ECMA standard lists these design goals for C#:
  • C# is intended to be a simple, modern, general-purpose, object-oriented programming language.
  • Because software robustness, durability and programmer productivity are important, the language should include strong type checking, array bounds checking, detection of attempts to use uninitialized variables, source code portability, and automatic garbage collection.
  • The language is intended for use in developing software components that can take advantage of distributed environments.
  • Programmer portability is very important, especially for those programmers already familiar with C and C++.
  • Support for internationalization is very important.
  • C# is intended to be suitable for writing applications for both hosted and embedded systems, ranging from the very large that use sophisticated operating systems, down to the very small having dedicated functions.
Versions
1.0, 1.5, 2.0 (ECMA), 3.0

Features

C# differs from C and C++ in many ways, including:
  • There are no global variables or functions. All methods and members must be declared within classes. It is possible, however, to use static methods/variables within public classes instead of global variables/functions.
  • Multiple inheritance is not supported, although a class can implement any number of interfaces. This was a design decision by the language's lead architect to avoid complication.
  • Full type reflection and discovery is available.

Features of C# 2.0

New features in C# for the .NET SDK 2.0 (corresponding to the 3rd edition of the ECMA-334 standard) are:
  • Partial classes allow class implementation across more than one source file. This permits splitting up very large classes.
  • Generics or parameterized types.
  • Static classes that cannot be instantiated, and that only allow static members. This is similar to the concept of module in many procedural languages.
  • Anonymous delegates.
  • The accessibility of property accessors can be set independently.
  • Nullable value types which provides improved interaction with SQL databases.
  • Coalesce operator: (??) returns the first of its operands which is not null (or null, if no such operand exists):

Features of C# 3.0

C# 3.0 is the current version, and was released on 19 November 2007 as part of .NET Framework 3.5. It includes new features inspired by functional programming languages such as Haskell and ML, and is driven largely by the introduction of the Language Integrated Query (LINQ) pattern to the Common Language Runtime.[9]
 C# 3.0 was unveiled at the 2005 Professional Developers Conference. It is not currently standardized by any standards organisation, though it is expected that it will eventually become an ECMA and then ISO standard, as did its predecessors.

Criticism

Performance 
C# programs, like all programs written for the .NET and other virtual machine environments such as Java, tend to require more system resources than functionally similar applications that access machine resources more directly.

Platform 
Microsoft's current .NET implementation is only available on Windows.

Saturday, 25 February 2012

Restrict Checkboxlist To Single Selection


How we can restrict checkboxlist to single selection
(Or)
How we can do checkboxlist behaves like a radiobuttonlist

Javascript Code:

<script type = "text/javascript">

    function MutExChkList(chk)
    {
        var chkList = chk.parentNode.parentNode.parentNode;
        var chks = chkList.getElementsByTagName("input");
        for(var i=0;i<chks.length;i++)
        {
            if(chks[i] != chk && chk.checked)
            {
                chks[i].checked=false;
            }
        }
    }

</script>

Design View of the CheckBoxList:

                <asp:CheckBoxList ID="cblSelect" runat="server" RepeatLayout="Flow" >
                <asp:ListItem Text="Yes" Value="Y" onclick="MutExChkList(this);" ></asp:ListItem>
                <asp:ListItem Text="No" Value="N" onclick="MutExChkList(this);"></asp:ListItem>
                </asp:CheckBoxList>

All the best,
Prakash

Monday, 20 February 2012

AJAX Introduction & How To Download AJAX Toolkit



Hi guys,



Please click the below link and download the file.  In that, you will get notes on AJAX introduction with explanation and examples and also how to download AJAX Toolkit and the procedure on how to add into our visual studio .Net.


AJAX Introduction and How to Download AJAX Toolkit


Regards,
Prakash

How To Install IIS on Windows 7 or Vista


If you are a developer using ASP.NET, one of the first things you’ll want to install on Windows 7 or Vista is IIS (internet information server). Keep in mind that your version of Windows may not come with IIS. I’m using Windows 7 Ultimate edition.
First, go to Control Panel, and then click on Programs. You’ll see a link for “Turn Windows features on or off”


If you expand the Internet Information Services tree node, you can see that there are a lot of options beneath it. You will probably want to explore these options, because even if you click on IIS, some of the necessary options for doing development aren’t checked.
Once you’ve gone ahead and checked the items you want, and clicked OK, you’ll see this dialog for a while….
Now when you navigate in your browser to localhost, you’ll see the new default page… slick!

How To Install IIS in Windows XP




To install IIS 5.1 in Windows XP Pro follow these steps:
  1. On the Start menu, click Control Panel.
  2. Double-click Add or Remove Programs.
  3. Click Add/Remove Windows Components.
  4. Click Internet Information Services (IIS) and then click Details.
  5. In Internet Information Services (IIS), select the check boxes for SMTP Service and World Wide Web Service, and then click OK.
  6. In Windows Component selection, ensure that the Internet Information Services (IIS) check box is selected, and then click OK to install the components that you selected.


Friday, 17 February 2012

ASP.Net Themes and Skins

ASP.NET Themes and Skins


ASP.NET Themes and ASP.NET skins are another method of adding style and consistency to ASP.NET pages without managing each page and control separately. Themes and skins are an alternative to using Master Pages.

ASP.NET themes are a unified look which can be applied to every page in a web site. ASP.NET skins are also like a theme, but it can be applied to Controls like Buttons Controls, DropDownList Controls. The following ASP.NET tutorial helps you learn the basics on ASP.NET Themes and ASP.NET Skins with a sample Theme you can build on.

Creating an ASP.NET Theme

Themes and skins are good for adding style and consistency to ASP.NET pages without managing each page and control separately. But in order to use ASP.NET Themes and ASP.NET skins, you should first create and ASP.NET Theme.  ASP.NET by default searches for available themes in a folder called App_Themes. The following steps show you how to create this folder and start a new theme, and design skins for two ASP.NET Controls.

1.    Right click the Project name in the Solution Explorer and select Add ASP.NET Folder - -> Theme from the Context Menu.
 
2.    Rename Theme1 to “myTheme”.
 
3.    Right Click the “myTheme” folder and add a Skin File named customSkin.skin. The customSkin.skin file will open with the default skin template.

4.    At the bottom of the customSkin.skin File, after the “--%>” markup, enter the following skin description code.

<asp:DropDownList runat="server" CssClass="myCustomStyle" >
</asp:DropDownList>
<asp:Button runat="server" BorderStyle="Dotted" CssClass="myCustomStyle" />

5.    Right Click on the “myTheme” folder and Add a new Style Sheet named “myCustom.css” to the Project.
6.    Add the following Style Class into the “myCustom.css”.

myCustomStyle
{
background-color:#ccffcc;
font-style: italic;
font-family: Arial, Tahoma, 'Trebuchet MS';
font-size: xx-large;
}

Now you have successfully created a skin for an ASP.NET DropDownList Control and a Button Control. The content of the “customSkin.skin” declares that all controls of these types should use the “CssClass” called “myCustom.css”. The “myCustomStyle” class is in the “myCustom.css”.

The Button control has been programmed to use a dotted border style in the “customSkin.skin”. This property isn’t part of the style sheet and therefore applies only to buttons and not to the DropDownList control.

Applying Theme to a Web Site

The best and the fastest way to tell every page and every control in a web site to use a given theme is to code it in the “web.config” file. The following steps show you how to make a theme available site wide.

1.    Open the “web.config” file from the Solution Explorer.
Note:  If you do not have a “web.config” file, run the application for the first time, and it will ask whether to create one or not.

2.    Go to the element starting with “<pages” within the “<system.web>” section.
Note:  If the “web.config” file does not have “<pages” just type in this tag, and Visual Studio will suggest and help you auto fill it.

3.    Add the following code snippet after the “<pages” for the “theme” attribute.

<pages theme="myTheme">
</pages>

At runtime, every page in the web site now knows to use the “myTheme” ASP.NET theme. This ASP.NET theme makes the DropDownList and the Button Controls within the pages to use the “myTheme” ASP.NET theme styles.

You also can use the “styleSheetTheme” attribute instead of the theme attribute. The “styleSheetTheme” attribute allows local setting to override the global theme.

<pages styleSheetTheme="myTheme">
</pages>

Applying Theme to a Page

You also have the capability of setting a theme for an individual page alone by configuring its “theme” or “styleSheetTheme” settings. This allows different themes on different pages. The following steps show you how to apply a theme to an individual page.

1.    Remove any themes assigned in the “web.config” file. (Check Assigning a theme to the whole Web Site). This is because if you leave the theme declared in the “web.config” file, it effects for whole site, thus it overrides any theme applied to an individual page locally.
2.    Go to the Design View of the ASP.NET page.
3.    Select the page by clicking on the blank area and go to the Properties Window of the Document Object (You can also press F4).
4.    Set the “StyleSheetTheme” property to the name of you preferred theme (“myTheme”).

5.    Drag and drop a DropDownList and a Button Control on the page and you will see how the IDE looks up the “myTheme” ASP.NET theme and applies the style information in the Design View.