Archives

Archives / 2014 / February
  • Implementing Ajax Login in ASP.NET MVC

    Implementing Ajax based login involves many of the same steps as the normal forms authentication. However, the login page doesn't send user ID and password to the server through a standard form submission. Instead, user credentials are sent to the server via an Ajax request. The credentials are then validated on the server and the result of the verification process is conveyed to the client. If the login attempt was successful, the user is taken to the secured area of the website.

  • Model Binding to List of Objects in ASP.NET MVC

    Showing a single record for editing is quite common and the default model binding of ASP.NET MVC takes care of mapping the form fields to the model properties. However, sometimes you need to edit multiple records. For example, you may want to display an editable grid to the end user filled with existing data. The user can edit the values from multiple rows and hit Save in an attempt to save the data. In this case multiple model objects are being submitted to the action method. The single record editing works on the assumption that form field names from the view match the corresponding model property names. However, when multiple model objects are submitted this assumption is no longer valid. Luckily, by tweaking the form field names you can get this to work as expected.

  • Back to Basics : Understanding .NET Attributes

    .NET assemblies are said to be self-describing. That means the information about an assembly is stored in the assembly itself. This information is called Metadata. Moreover, .NET allows you to put additional information in the metadata through Attributes. Attributes are used in many places within the .NET framework. Some examples of attributes are [WebMethod], [ServiceContract], and several data annotation attributes such as [Required] and [StringLength]. This article discusses what attributes are, how to use inbuilt attributes and how to create custom attributes.

  • Working with Facebook SDK for JavaScript

    Now-a-days many websites provide Facebook integration to enhance the user experience. Features such as Facebook authentication, displaying Like or comments widgets, posting something on a user's wall are parts of this integration. The Facebook SDK for JavaScript provides functionality that can be consumed from the client side script to leverage such an integration. To that end this article shows you how to implement Facebook authentication, how to retrieve a user's details, such as user name and profile picture, and also illustrates how to post on the user's wall.

  • 5 CSS3 Features That Simplify Your Web Page Styling

    If you are a professional web developer chances are you use CSS for styling your web pages. The latest version of CSS - version 3 - adds many features to the CSS2 feature set, making it appealing to any web developer. This article discusses five features of CSS3 that you will find interesting. The features discussed in this article include - New selectors, border images, gradient, setting opacity and multicolumn layouts.

  • Learning, Unlearning and ASP.NET

    Software industry is one of the most dynamic industries to work with. Everyday something new comes up and you have no option but to learn it to be in the race. While learning is a commonly acquired skill by software developers, not many can acquire the unlearning abilities. My experience of training software developers tells me that this skill - unlearning - can dramatically affect your experience with a technology or tool you are learning.

  • Working with Stored Procedures in Entity Framework - Part 1

    By default entity framework generates SELECT, INSERT, UPDATE, DELETE queries to perform the respective operations on the database. At times, however, you may want to deviate from this default behavior and use stored procedures for these operations. Additionally, you may want to call arbitrary stored procedures to perform some task at hand. To that end this two part article explains how stored procedures can be dealt with in Entity Framework.

  • Creating a Slide Show Using the History API and jQuery

    During Ajax communication, page content is often modified in some way or another. Since Ajax requests are sent through a client side script, the browser address bar remains unchanged even if the page content is being changed. Although this behavior doesn't create any problem for an application's functionality, it has pitfalls of its own. That's where History API comes to your rescue. History API allows you to programmatically change the URL being shown in the browser's address bar. This article demonstrates how History API can be used with an example of a slide show.