Monday, December 6, 2010
NET Developer
Calling XML Web Services from Windows Forms
Web services can be used to enhance the functionality of Windows Forms. Connecting Windows Forms to Web services is as simple as making calls to Web service methods, which are processed on a server that then returns the results of the method call.
There are two types of Web service methods, synchronous and asynchronous. When synchronous Web service methods are called, the caller waits for the Web service to respond before continuing operations. When asynchronous Web service methods are called, you can continue to use the calling thread while waiting for the Web service to respond. This allows you to use the existing set of threads efficiently in the client application. For more information about working with synchronous and asynchronous Web service methods, see Accessing XML Web Services in Managed Code.
Synchronous Web Service Methods
A call to a synchronous Web service method involves calling the method and waiting for the computation to occur on the server and return a value before continuing with the rest of the code in the Windows Form.- Create a Web service application. For more information, see Creating XML Web Services in Managed Code.
- In Solution Explorer, right-click the .asmx file and choose View Code.
- Create a Web service method that does addition. This following Web service method will take two integers and add them, returning the sum:
- Create another Web service method that does multiplication. The following Web service method will take two integers and multiply them, returning the product:
- From the Build menu, choose Build Solution. You can also browse to the .asmx file you created in this project to learn more about Web services. Your Web service is now available for calling from a Windows Form.
- Create a new Windows application. For more information, see Creating a Windows Application Project. Security Note Calls to Web Methods require a privilege level granted by the System.Net.WebPermisson class. If you are running in a partial-trust context, the process might throw an exception. For more information, see Code Access Security Basics.
- Add a reference to the Web service created above. For details, see Adding and Removing Web References.
- From the Toolbox, add three TextBox controls and two Button controls. The text boxes will be for the numbers, and the buttons will be used for the calculations and to call the Web service methods.
- Set the properties of the controls as follows:
Control Property Text TextBox1 Text 0 TextBox2 Text 0 TextBox3 Text 0 Button1 Text Add Button2 Text Multiply - Right-click the form and choose View Code.
- Create an instance of the Web service as a member of the class. You need to know the name of the server where you created the Web service above.
- Create an event handler for Button1's Click event. For details, see Creating Event Handlers on the Windows Forms Designer.
' Visual Basic Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click ' Create instances of the operands and result. Dim x, y, z As Integer ' Parse the contents of the text boxes into integers. x = Integer.Parse(TextBox1.Text) y = Integer.Parse(TextBox2.Text) ' Call the WebAdd Web service method from the instance of the Web service. z = MathServiceClass.WebAdd(x, y) TextBox3.Text = z.ToString End Sub // C# private void button1_Click(object sender, System.EventArgs e) { // Create instances of the operands and result. int x, y, z; // Parse the contents of the text boxes into integers. x = int.Parse(textBox1.Text); y = int.Parse(textBox2.Text); // Call the WebAdd Web service method from the instance of the Web service. z = MathServiceClass.WebAdd(x, y); textBox3.Text = z.ToString(); }Visual C# Note Be sure that the necessary code to enable the event handler is present. In this case, it would be similar to the following:this.button1.Click += new System.EventHandler(this.button1_Click); - Create an event handler for Button2's Click event in the same fashion, and add the following code.
' Visual Basic Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click ' Create instances of the operands and result. Dim x, y, z As Integer ' Parse the contents of the text boxes into integers. x = Integer.Parse(TextBox1.Text) y = Integer.Parse(TextBox2.Text) ' Call the WebMultiply Web service method from the instance of the Web service. z = MathServiceClass.WebMultiply(x, y) TextBox3.Text = z.ToString End Sub // C# private void button2_Click(object sender, System.EventArgs e) { // Create instances of the operands and result. int x, y, z; // Parse the contents of the text boxes into integers. x = int.Parse(textBox1.Text); y = int.Parse(textBox2.Text); // Call the WebAdd Web service method from the instance of the Web service. z = MathServiceClass.WebMultiply(x, y); textBox3.Text = z.ToString(); }Visual C# Note Be sure that the necessary code to enable the event handler is present. In this case, it would be similar to the following:this.button2.Click += new System.EventHandler(this.button2_Click); - Press F5 to run your application. Enter values into the first two text boxes. When you press the Add button, the third text box should show their sum. When you press the Multiply button, the third text box should show their product. Note The first call to a Web service takes a while for the server to process, because the Web service is instantiated on the server. Keep this in mind when pressing the buttons in your application. This lag is dealt with in the section below.
Asynchronous Web Services
When you call asynchronous Web service methods, the application continues to run while waiting for the Web service to respond. This allows you to use the resources efficiently in the client application. This is a far more resource-savvy way to implement Web services within your Windows application.For details, see Accessing an XML Web Service Asynchronously in Managed Code.
Sunday, December 5, 2010
MS Development Team Leader
GNSE Group is willing to hire the following:
MS Development Team Leader A well-rounded and seasoned candidate is always welcomed. Please forward your CVs to:info@gnsegroup.com
Sunday, November 14, 2010
Migrating from PHP to ASP.NET- part4
The typical way of outputting data in PHP is through the echo() language construct.
closest analogue to this in ASP.NET is the Response.Write() method, or the
'
Code Sample 3. Basic output in PHP
$hello = "hi how are you\n";
echo $hello;
?>
Code Sample 3. Basic output in Visual Basic .NET
However, these methods for sending output to the browser exist primarily for backwards compatibility with classic ASP. ASP.NET's new control-based, event-oriented model allows for data to be output to the browser by simply setting properties on server controls. This technique allows for clean separation of layout and code and can make maintenance easier, requiring significantly less code in complex situations than PHP.
The current date is:
This example declares a server-side Label control called TheDate, and during the page's Load event, sets the Text property of the label to the current date and time. The HTML output of this code is identical to the other two versions, except that the Label control renders itself as a span tag containing whatever was set as the label's text.
Conditional Processing
IF/ELSE
PHP has several conditional processing expressions such as for, while, switch, and foreach but the most common is the if/else expression. Visual Basic .NET has very similar constructs with similar syntax. Code Sample 4 provides a comparison of equivalent conditional logic in PHP and Visual Basic .NET.
Code Sample 4. Basic conditional logic in PHP
if ($a > $b) {
print "a is bigger than b";
} elseif ($a == $b) {
print "a is equal to b";
} else {
print "a is smaller than b";
}
Code Sample 4. Basic conditional logic in Visual Basic .NET
If a > b
Response.Write ("a is bigger than b")
ElseIf a = b Then
Response.Write ("a is equal to b")
Else
Response.Write ("a is smaller than b")
End If
Switch
Switch statements are common language constructs for most programming languages when you wish to test a single expression for multiple values. They are commonly used to replace if statements that contain multiple elseif/else blocks.
Code Sample 5 shows a comparison between PHP's switch statement and Visual Basic's Select Case statement.
Code Sample 5. A switch statement in PHP
switch ($i) {
case 0:
print "i equals 0";
break;
case 1:
print "i equals 1";
break;
case 2:
print "i equals 2";
break;
default:
print "i is not equal to 0, 1 or 2";
}
Code Sample 5. A Select Case statement in Visual Basic .NET
Select Case Number i
Case 0
description = "0"
Wesponse.Write ("i equals 0")
Case 1
description = "1"
Response.Write ("i equals 1")
Case 2
description = "2"
Response.Write ("i equals 2")
Case Else
description = " i is not equal to 0, 1 or 2"
Response.Write ("i is not equal to 0, 1 or 2 ")
End Select
Thursday, November 11, 2010
Application Developer
Job Title Application Developer
Country Egypt
Job Category System Analyst
Job Type Full Time
Description This position will be responsible for new application development, as well as maintaining and supporting existing applications. We are looking for individual contributors with strong sense of accountability, strong analytical & problem solving skills and effective communication skills. He/she must be quick learners and should be able to grasp new concepts quickly. The candidate will be responsible for performing VB6, VS.NET 2003, 2005 and ASP.NET development in both VB.NET (is Must) and C#, HTML java script Ajax technology (Preferred) and SQL Server (2000 and 2005) in the backend and CRYSTAL REPORT at least 9, SQL reporting service as reporting tools. At least 1 year experience -Ability to learn quickly Summary of technical Requirement- A Bachelor’s Degree in Computer Engineering, Computer Science, Information Technology or equivalent education in a related discipline is preferred
Qualifications Management skills and leadership The ability to analyze and solve problems The ability to communicate Computer skills The ability to make decisions Organizational skills
Gender Any
Experience 3 - 5 Years.
Salary (L.E.) Negotiable
Comments PLEASE SEND YOUR C.V with your photo & Type in the subject COD:-ERP01
Job Contact Person Tarek Milad
Job Contact Email hr@nationalpaints.com.eg
Job-Contact Information
Web Application Developer and DBA - Saudi Arabia
Web Application Developer.
Skills: 8+ year of total IT Experience
5+ years of Oracle/MSSQL Development experience
5+ years of VB.NET/C# Development Experience
Strong knowledge of programming for ASP.NET/MVC2/Win forms/WPF
Strong knowledge of programming using external controls like
DevExpress / Component One / Infragistics is a MUST.
CodeOnTime, IronSpeed knowledge and use will be an Advantage.
The successful candidate will be an expert developer in VB.NET or C-Sharp using Oracle/MSSQL and will be able to generate code quickly with an eye to developing reusable code.
The person hired will work alone or with team of people under a lead architect.
The person will be the lead application programmer developing an intuitive user interface and dynamic reporting application and expected to review and unit test all application code.
DBA
Install and running oracle on windows 2003 and 2008 versions.
Best practice configuration.
Monitoring and troubleshooting (log files, availability, session monitoring, storage monitoring, CPU utilization, Backup RMAN, profile changes)
Performance tuning (tuning database, tuning server, user tuning, trace files, query optimization)
Database patching with best practices.
Materialized views.
Data guard solution for recovery.
Importing / exporting, duplicating
Data warehousing / discoverer solutions and implementations.
Kindly, send your updated resume on naveed@sanad.com.sa
Software Developers - Intermediate or Senior - Saudi Arabia
We are particularly interested in hearing from you if you have expert skills in any or all of the following:
• Power Builder Development Tool
• Oracle Database Development
• .Net, ASP, C#, VB
• Management of software projects
Additionally, the desirable candidate will have:
• Strong teamwork and interpersonal skill.
• Experience in healthcare, hospital or clinical systems.
• Good motivation, and the ability to deliver quality software within desired time frames.
• Strong analysis and troubleshooting skills.
Please apply only if you are suitably qualified, professional, intermediate or senior software developer with a minimum of 4 years recent experience.
Your application and CV should be forwarded to: Softwarehouse.jeddah@gmail.com
Migrating from PHP to ASP.NET- part3
Wednesday, November 10, 2010
Migrating from PHP to ASP.NET- part2
Tuesday, November 9, 2010
Migrating from PHP to ASP.NET- part1
Sunday, November 7, 2010
Datareader vs dataset
I am trying to give some of basic understanding about and differences between DataReader and DataSet of ADO.NET.
DataReader
The ADO.NET DataReader is used to retrieve read-only(cannot update data back to datasource) and forward-only(cannot read backward/random) data from a database.
Using the DataReader increases application performance and reduces system overheads. This is due to one row at a time is stored in memory.
You create a DataReader by calling Command.ExecuteReader after creating an instance of the Command object.
This is a connected architecture: The data is available as long as the connection with database exists.
You need to open and close the connecton manually in code.
The following code statement is used to retrieve rows from a data source.
//opening connection is must
conn.open();
string SQLquery = "SELECT CustomerID, CompanyName FROM dbo.Customers";
SqlCommand cmd = new SqlCommand(SQLquery, conn);
// Call ExecuteReader to return a DataReader
SqlDataReader myReader = cmd.ExecuteReader();
//The Read method of the DataReader object is used to obtain a row from the results of the executed query.
while(myReader.Read())
{
Console.WriteLine("\t{0}\t{1}", myReader.GetInt32(0), myReader.GetString(1));
}
//Once you're done with the data reader, call the Close method to close a data reader:
myReader.Close();
//close the connection
conn.close();
DataSet
The DataSet is a in-memory representation of data.
It can be used with multiple data sources. That is A single DataSet can hold the data from different data sources holdng data from different databases/tables.
The DataSet represents a complete set of data including related tables, constraints, and relationships among the tables.
The DataSet can also persist and reload its contents as XML and its schema as XML Schema definition language (XSD) schema.
The DataAdapter acts as a bridge between a DataSet and a data source for retrieving and saving data.
The DataAdapter helps mapping the data in the DataSet to match the data in the data source.
Also, Upon an update of dataset, it allows changing the data in the data source to match the data in the DataSet.
No need to manually open and close connection in code.
Hence, point (8) says that it is a disconnected architecture. Fill the data in DataSet and that's it. No connection existence required
The following code statement is used to retrieve rows from a data source.
string SQLquery = "SELECT CustomerID, CompanyName FROM dbo.Customers";
// create DataSet that will hold your Tables/data
DataSet ds = new DataSet("CustomerDataSet");
//Create SqlDataAdapter which acts as bridge to put the data in DataSet,(data is table available by executing your SQL query)
SqlDataAdapter myAdapter = new SqlDataAdapter(SQLquery, conn);
//fill the dataset with the data by some name say "CustomersTable"
myAdapter.Fill(ds,"CustomersTable");
Sunday, October 24, 2010
Send Email in dotnet c# and vb
this a c# code u can easy convert it to vb
System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage();
message.To.Add("Someone @microsoft.com");
message.Subject = "This is the Subject line";
message.From = new System.Net.Mail.MailAddress("From@online.microsoft.com");
message.Body = "This is the message body";
System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient("yoursmtphost");
smtp.Send(message)
Thursday, May 27, 2010
What's New in the .NET Framework 4
This topic contains information about key features and improvements in the .NET Framework version 4. This topic does not provide comprehensive information about all new features and is subject to change.
The .NET Framework 4 introduces an improved security model. For more information, see Security Changes in the .NET Framework 4.
Other new features and improvements in the .NET Framework 4 are described in the following sections:
The .NET Framework 4 is highly compatible with applications that are built with earlier .NET Framework versions, except for some changes that were made to improve security, standards compliance, correctness, reliability, and performance.
The .NET Framework 4 does not automatically use its version of the common language runtime to run applications that are built with earlier versions of the .NET Framework. To run older applications with .NET Framework 4, you must compile your application with the target .NET Framework version specified in the properties for your project in Visual Studio, or you can specify the supported runtime with the
If your application or component does not work after .NET Framework 4 is installed, please submit a bug on the Microsoft Connect Web site. You can test compatibility as described in the .NET Framework 4 Application Compatibility topic and learn about new features by using the Visual Studio 2010 and .NET Framework 4 Walkthroughs. For additional information and known migration issues, visit the .NET Framework Compatibility blog.
The following sections describe deployment improvements.
Client Profile
The .NET Framework 4 Client Profile supports more platforms than in previous versions and provides a fast deployment experience for your applications. Several new project templates now target the Client Profile by default. For more information, see .NET Framework Client Profile.
In-Process Side-by-Side Execution
This feature enables an application to load and start multiple versions of the .NET Framework in the same process. For example, you can run applications that load add-ins (or components) that are based on the .NET Framework 2.0 SP1 and add-ins that are based on the .NET Framework 4 in the same process. Older components continue to use the older .NET Framework version, and new components use the new .NET Framework version. For more information, see In-Process Side-by-Side Execution.
The following sections describe new features and improvements provided by the common language runtime and the base class libraries.
Diagnostics and Performance
Earlier versions of the .NET Framework provided no way to determine whether a particular application domain was affecting other application domains, because the operating system APIs and tools, such as the Windows Task Manager, were precise only to the process level. Starting with the .NET Framework 4, you can get processor usage and memory usage estimates per application domain.
You can monitor CPU and memory usage of individual application domains. Application domain resource monitoring is available through the managed and native hosting APIs and event tracing for Windows (ETW). When this feature has been enabled, it collects statistics on all application domains in the process for the life of the process. See the new AppDomain.MonitoringIsEnabled property.
You can now access the ETW events for diagnostic purposes to improve performance. For more information, see CLR ETW Events and Controlling .NET Framework Logging. Also see Performance Counters and In-Process Side-By-Side Applications.
The System.Runtime.ExceptionServices.HandleProcessCorruptedStateExceptionsAttribute attribute enables managed code to handle exceptions that indicate corrupted process state.
Garbage Collection
The .NET Framework 4 provides background garbage collection. This feature replaces concurrent garbage collection in previous versions and provides better performance. For more information, see Fundamentals of Garbage Collection.
Code Contracts
Code contracts let you specify contractual information that is not represented by a method's or type's signature alone. The new System.Diagnostics.Contractsnamespace contains classes that provide a language-neutral way to express coding assumptions in the form of preconditions, postconditions, and object invariants. The contracts improve testing with run-time checking, enable static contract verification, and support documentation generation. For more information, see Code Contracts.
Design-Time-Only Interop Assemblies
You no longer have to ship primary interop assemblies (PIAs) to deploy applications that interoperate with COM objects. In the .NET Framework 4, compilers can embed type information from interop assemblies, selecting only the types that an application (for example, an add-in) actually uses. Type safety is ensured by the common language runtime. See Using COM Types in Managed Code and Walkthrough: Embedding Type Information from Microsoft Office Assemblies (C# and Visual Basic).
Dynamic Language Runtime
The dynamic language runtime (DLR) is a new runtime environment that adds a set of services for dynamic languages to the CLR. The DLR makes it easier to develop dynamic languages to run on the .NET Framework and to add dynamic features to statically typed languages. To support the DLR, the new System.Dynamicnamespace is added to the .NET Framework.
The expression trees are extended with new types that represent control flow, for example, System.Linq.Expressions.LoopExpression andSystem.Linq.Expressions.TryExpression. These new types are used by the dynamic language runtime (DLR) and not used by LINQ.
In addition, several new classes that support the .NET Framework infrastructure are added to the System.Runtime.CompilerServices namespace. For more information, see Dynamic Language Runtime Overview.
Covariance and Contravariance
Several generic interfaces and delegates now support covariance and contravariance. For more information, see Covariance and Contravariance in Generics.
BigInteger and Complex Numbers
The new System.Numerics.BigInteger structure is an arbitrary-precision integer data type that supports all the standard integer operations, including bit manipulation. It can be used from any .NET Framework language. In addition, some of the new .NET Framework languages (such as F# and IronPython) have built-in support for this structure.
The new System.Numerics.Complex structure represents a complex number that supports arithmetic and trigonometric operations with complex numbers.
Tuples
The .NET Framework 4 provides the System.Tuple class for creating tuple objects that contain structured data. It also provides generic tuple classes to support tuples that have from one to eight components (that is, singletons through octuples). To support tuple objects that have nine or more components, there is a generic tuple class with seven type parameters and an eighth parameter of any tuple type.
File System Enumeration Improvements
New file enumeration methods improve the performance of applications that access large file directories or that iterate through the lines in large files. For more information, see How to: Enumerate Directories and Files.
Memory-Mapped Files
The .NET Framework now supports memory-mapped files. You can use memory-mapped files to edit very large files and to create shared memory for interprocess communication.
64-Bit Operating Systems and Processes
You can identify 64-bit operating systems and processes with the Environment.Is64BitOperatingSystem and Environment.Is64BitProcess properties.
You can specify a 32-bit or 64-bit view of the registry with the Microsoft.Win32.RegistryView enumeration when you open base keys.
Other New Features
The following list describes additional new capabilities, improvements, and conveniences. Several of these are based on customer suggestions.
To support culture-sensitive formatting, the System.TimeSpan structure includes new overloads of the ToString, Parse, and TryParse methods, as well as newParseExact and TryParseExact methods.
The new String.IsNullOrWhiteSpace method indicates whether a string is null, empty, or consists only of white-space characters. New overloads have been added to the String.Concat and String.Join methods that concatenate members of System.Collections.Generic.IEnumerable(Of T) collections.
The String.Concat method lets you concatenate each element in an enumerable collection without first converting the elements to strings.
Two new convenience methods are available: StringBuilder.Clear and Stopwatch.Restart.
The new Enum.HasFlag method determines whether one or more bit fields or flags are set in an enumeration value. The Enum.TryParse method returns a Boolean value that indicates whether a string or integer value could be successfully parsed.
The System.Environment.SpecialFolder enumeration contains several new folders.
You can now easily copy one stream into another with the CopyTo method in classes that inherit from the System.IO.Stream class.
New Path.Combine method overloads enable you to combine file paths.
The new System.IObservable(Of T) and System.IObserver(Of T) interfaces provide a generalized mechanism for push-based notifications.
The System.IntPtr and System.UIntPtr classes now include support for the addition and subtraction operators.
You can now enable lazy initialization for any custom type by wrapping the type inside a System.Lazy(Of T) class.
The new System.Collections.Generic.SortedSet(Of T) class provides a self-balancing tree that maintains data in sorted order after insertions, deletions, and searches. This class implements the new System.Collections.Generic.ISet(Of T) interface.
The compression algorithms for the System.IO.Compression.DeflateStream and System.IO.Compression.GZipStream classes have improved so that data that is already compressed is no longer inflated. Also, the 4-gigabyte size restriction for compressing streams has been removed.
The new Monitor.Enter(Object, Boolean) method overload takes a Boolean reference and atomically sets it to true only if the monitor is successfully entered.
You can use the Thread.Yield method to have the calling thread yield execution to another thread that is ready to run on the current processor.
The System.Guid structure now contains the TryParse and TryParseExact methods.
The new Microsoft.Win32.RegistryOptions enumeration lets you specify a volatile registry key that does not persist after the computer restarts.
Registry keys are no longer restricted to a maximum length of 255 characters.
The Managed Extensibility Framework (MEF) is a new library in the .NET Framework 4 that helps you build extensible and composable applications. MEF enables you to specify points where an application can be extended, to expose services to offer to other extensible applications and to create parts for consumption by extensible applications. It also enables easy discoverability of available parts based on metadata, without the need to load the assemblies for the parts. For more information, see Managed Extensibility Framework. For a list of the MEF types, see the System.ComponentModel.Composition namespace.
The .NET Framework 4 introduces a new programming model for writing multithreaded and asynchronous code that greatly simplifies the work of application and library developers. The new model enables developers to write efficient, fine-grained, and scalable parallel code in a natural idiom without having to work directly with threads or the thread pool. The new System.Threading.Tasks namespace and other related types support this new model. Parallel LINQ (PLINQ), which is a parallel implementation of LINQ to Objects, enables similar functionality through declarative syntax. For more information, see Parallel Programming in the .NET Framework.
Networking improvements include the following:
Security improvements for Windows authentication in several classes, including System.Net.HttpWebRequest, System.Net.HttpListener,System.Net.Mail.SmtpClient, System.Net.Security.SslStream, and System.Net.Security.NegotiateStream. Extended protection is available for applications on Windows 7 and Windows Server 2008 R2. For more information, see Integrated Windows Authentication with Extended Protection.
Support for Network Address Translation (NAT) traversal using IPv6 and Teredo. For more information, see NAT Traversal using IPv6 and Teredo.
New networking performance counters that provide information about HttpWebRequest objects. For more information, see Networking Performance Counters.
In the System.Net.HttpWebRequest class, support for using large byte range headers (64-bit ranges) with new overloads for the AddRange method. New properties on the System.Net.HttpWebRequest class allow an application to set many HTTP headers. You can use the Host property to set the Host header value in an HTTP request that is independent from the request URI.
Secure Sockets Layer (SSL) support for the System.Net.Mail.SmtpClient and related classes.
Improved support for mail headers in the System.Net.Mail.MailMessage class.
Support for a null cipher for use in encryption. You can specify the encryption policy by using the System.Net.ServicePointManager class and theEncryptionPolicy property. Constructors for the System.Net.Security.SslStream class now take a System.Net.Security.EncryptionPolicy class as a parameter.
Credentials for password-based authentication schemes such as basic, digest, NTLM, and Kerberos authentication in the System.Net.NetworkCredential class. To improved security, passwords may now be treated as System.Security.SecureString instances rather than System.String instances.
Ability to specify how a URI with percent-encoded values is converted and normalized in the System.Uri and System.Net.HttpListener classes. For more information, see the System.Net.Configuration.HttpListenerElement, System.Configuration.SchemeSettingElement,System.Configuration.SchemeSettingElementCollection, and System.Configuration.UriSection classes.
ASP.NET version 4 introduces new features in the following areas:
Core services, including a new API that lets you extend caching, support for compression for session-state data, and a new application preload manager (autostart feature).
Web Forms, including more integrated support for ASP.NET routing, enhanced support for Web standards, updated browser support, new features for data controls, and new features for view state management.
Web Forms controls, including a new Chart control.
MVC, including new helper methods for views, support for partitioned MVC applications, and asynchronous controllers.
Dynamic Data, including support for existing Web applications, support for many-to-many relationships and inheritance, new field templates and attributes, and enhanced data filtering.
Microsoft Ajax, including additional support for client-based Ajax applications in the Microsoft Ajax Library.
Visual Web Developer, including improved IntelliSense for JScript, new auto-complete snippets for HTML and ASP.NET markup, and enhanced CSS compatibility.
Deployment, including new tools for automating typical deployment tasks.
Multi-targeting, including better filtering for features that are not available in the target version of the .NET Framework.
For more information about these features, see What's New in ASP.NET 4 and Visual Web Developer.
Windows Presentation Foundation
In the .NET Framework 4, Windows Presentation Foundation (WPF) contains changes and improvements in many areas, including controls, graphics, and XAML. For more information, see What's New in WPF Version 4.
ADO.NET
ADO.NET provides new features for the Entity Framework, including persistence-ignorant objects, functions in LINQ queries, and customized object layer code generation. For more information, see What's New in ADO.NET.
Dynamic Data
For ASP.NET 4, Dynamic Data has been enhanced to give you even more power for quickly building data-driven Web sites. This includes the following:
Automatic validation that is based on constraints that are defined in the data model.
The ability to easily change the markup that is generated for fields in the GridView and DetailsView controls by using field templates that are part of a Dynamic Data project.
For more information, see What's New in ASP.NET 4 and Visual Web Developer.
WCF Data Services
ADO.NET Data Service has been renamed to WCF Data Services, and has the following new features
Data binding.
Counting entities in an entity set.
Server-driven paging.
Query projections.
Custom data service providers.
Streaming of binary resources.
For more information, see What's New in WCF Data Services.
Windows Communication Foundation (WCF) provides the following improvements:
Configuration-based Activation: Removes the requirement for having an .svc file.
System.Web.Routing Integration: Allows you to have more control over your service's URL (extensionless URLs).
Multiple IIS Site Bindings Support: Allows you to have multiple base addresses with the same protocol on the same Web site.
Routing Service: Allows you to route messages based on content.
Support for WS-Discovery: Allows you to create and search for discoverable services.
Standard Endpoints: Predefined endpoints that allow you to specify only certain properties.
Workflow Services: Integrates WCF and WF by providing activities to send and receive messages, the ability to correlate messages based on content, and a workflow service host.
WCF REST features:
Web HTTP Caching: Allows caching of Web HTTP service responses.
Web HTTP Formats Support: Allows you to dynamically determine the best format for a service operation to respond in.
Web HTTP Services Help Page: Provides an automatic help page for Web HTTP services, similar to the WCF service help page.
Web HTTP Error Handling: Allows Web HTTP Services to return error information in the same format as the operation.
Web HTTP Cross-Domain JavaScript Support: Allows use of JSONP.
Simplified Configuration: Reduces the amount of configuration a service requires
For more information, see What's New in Windows Communication Foundation.
Windows Workflow Foundation provides improvements in the following areas:
Improved Workflow Activity Model: The Activity class provides the base abstraction of workflow behavior.
Rich Composite Activity Options: Workflows benefit from new flow-control activities that model traditional flow-control structures, such as Flowchart, TryCatch, and Switch.
Expanded Built-In Activity Library: New features of the activity library include new flow-control activities, activities for manipulating member data, and activities for controlling transactions.
Explicit Activity Data Model: New options for storing or moving data include variable and directional arguments.
Enhanced Hosting, Persistence, and Tracking Options: Hosting enhancements include more options for running workflows, explicit persistence using the Persist activity, persisting without unloading, preventing persistence using no-persist zones, using ambient transactions from the host, recording tracking information to the event log, and resuming pending workflows using Bookmark.
Easier ability to extend the WF designer: The new WF Designer is built on Windows Presentation Foundation (WPF) and provides an easier model to use when rehosting the WF Designer outside of Visual Studio.
For more information, see What's New in Windows Workflow Foundation.