Archives for September 2013

Working with New FlyOut Control in Windows 8.1

In Build 2013, Microsoft announced Windows 8.1. Along with this announcement, 5000 APIs will be introduced and one notable is the FlyOut control. The FlyOut Control allows the application to display temporary information to the current user interaction. The content can be informational or it can be the one that needs user input. The FlyOut control can be dismissed outside if it is informational. It can also ask the user to conduct an action like confirming the order, etc. It is commonly used in conjunction with a button, so by default, the new button class has a FlyOut property.

This article will explain how a FlyOut Control works and what can your application do with it.

Read the rest of the tutorial here:

What to Expect in Visual Studio 2013 and .NET Framework 4.5.1

Not so long ago, Visual Studio 2012 was released and now we are expecting yet another major update for the popular IDE. Visual Studio 2013 Preview and .NET Framework 4,5,1 are now available for download. If you are as excited as I am, then lets take a quick look at what to expect from this major release.

Visual Studio 2013 offers debugging tool advancements like Async-aware debugging, x64 Edit and Continue and Autos Window. In terms of Language Advancements, XAML offers more support and JavaScript and HTML has new tools to make it easier to navigate the source code.

There are also new tools available like the CodeLens and Performance and Diagnostic Hub.

Read the rest of the update here:

Ways to Pass HTML5 Web Storage Data to ASP.NET

HTML5 web storage data allows you to store data on the client side. But unlike cookies, this data is not passed to the server automatically with every request-response cycle. To pass this data you need to program a few code. There are two ways in which a data transfer can be facilitated – hidden form field and Ajax call. This article will explain how to use these techniques.

The first approach uses postback and a hidden form field to pass data to the server. The second approach involves an AJAX call to a web method to pass client side data.

Each method works at its best, so what you use is based on which are you more comfortable in using.

Read the rest of the post here:

How to Perform Custom Validations Using Data Annotations

ASP.NET MVC applications are able to use data annotation attributes to enforce validation on model properties. It provides a few data annotations that can cover frequently needed validations. But there are time where you need to perform custom variation to model properties. This article will show you how these tasks can be accomplished.

Data annotation attributes will allow you to validate model properties. You can create yur own data annotations by creating a class that inherits the ValidationAttribute base class. You can also add client side validation capabilities to a custom data annotation by implementing IClientValidatable interface.
Read the rest of the tutorial here:

How to Prevent Cross Site Scripting Attacks in ASP.NET MVC 4

A Cross Site Scripting Attack or XSS is a malicious markup and script that enters a web page then stores in the system and be rendered in a web page. Depending on the script injected, it can cause damage to a website ranging from annoying popups to  stealing credentials. It is vital for ASP.NET MVC developers to prevent this kind of attack.


Most Cross Site Scripting attacks can be prevented if you encode the user input properly. You need to make sure that it is encoded properly at two distinct places as far as ASP.NET MVC is concerned.

Read the rest of the tutorial here:

How to Use SSL in ASP.NET Web API

If you are developing a website that needs to deal with sensitive data, you’ll use authentication schemes such as ASP.NET forms authentication. However, these authentication schemes prevent access to web pages, the user credentials, and the data involved in the communication is sent as plain text. This is bad for your site because the data is sent in an unencrypted form, which means it can be easily intercepted by any malicious programs and can pose security threat to your website.

To secure the information, the sent text must be encrypted first before it is sent. An industry standard process is to use Secure Sockets Layer. This article will show how to use SSL in ASP.NET Web API.


Read the rest of the post here:

How to Create Cascading Dropdown List Using ASP.NET MVC and JQuery

There are times where you need to display DropDownLists in your ASP.NET MVC views so that the values in one DropDownList will depend on the value of another DropDownList. This is useful for countries and states where based on a selected country, you will populate the list of the states in another DropDownList. This article will show you how to develop cascading DropDownList using ASP.NET MVC 4 and JQuery.

Begin the project by creating an empty ASP.NET MVC 4 project template. Then, add the HomeController to the Controllers folder and then add the Scripts to the folder and JQuery library in it.

This is just a simple example on how this works because in a real world scenario, you’ll rely on the database for data.


Read the rest of the tutorial here:

Using NUnit to Unit Test Projects

The Unit Test projects use MS-Test by default in Visual Studio 2012. It is Microsoft’s unit testing framework that also allows you to use third party unit testing framework such as NUnit, MbUnit, and xUnit.NET. This will allow you to perform any unit testing of your choice and still use Visual Studio IDE to run tests.

This article will show you the capabilities of Visual Studio 2012 and its features. You may already know that Visual Studio 2012 will let you use third-party testing frameworks for your applications and in this lecture, we’ll teach you how to use NUnit to for unit testing.

Read the rest of the tutorial here:

How to Use Value Providers in ASP.NET 4.5

ASP.NET Web Forms support model binding and Value Providers are a part of the overall model binding feature. It grabs values from request and bind those values with method parameters. ASP.NET has inbuilt value providers and you can also create your own.

With this binding model, it is possible to have custom methods to perform select, insert, delete, and update operations. To create your own method, you need to create a class that implements IValue Provider interface.

Value Providers are classes that bind values from request to select method parameters. To learn more on how to use it, read the tutorial in this blog post:

How to Use Unobtrusive Validation in ASP.NET

ASP.NET Web Forms already has validation controls ever since its first release. In the earlier releases, these validation controls used JavaScript that is emitted by ASP.NET Web Framework. The unobtrusive validation, however, will make use of the data-* attribute of HTML5 for validation.


Unobtrusive validation emits data-* attributes of HTML5 that contain the validation information. There is no JavaScript generated which means it reduces your page size. Additionally unobtrusive validation relies on JQuery library rather than a proprietary script.

Unobtrusive validation is enabled by default when you  create a new Web Forms project. If you open web.config in your newly create Web Forms project, you’ll see this markup: <appSettings>.


Read the rest of the tutorial here: