Customize View, Partial View And Layout Search Locations

ASP.NET stores all the views associated to a controller indie a sub-folder of Views folder by default. This is on the same line partial views and layout pages are stored inside Shared sub-folder under View folder. This default argument works fine; however, in most cases you may want to deviate from the conventional based arrangement and store views, partial views , and a different folder structure. Or in most cases, some application may want to store views outside views folder. In this case, methods like View() , Html.Partial() and PartialView() the system will not be able to find the needed .cshtml files.

You can deal with this situation by creating a custom view engine.

Read the rest of the tutorial here:

ASP.NET Tutorial 1 – Creating Your First ASP.NET Website

ASP.NET is Microsoft’s open source server-side website application framework. It is designed mainly for creating dynamic web pages offering programming model, comprehensive software infrastructure and various services needed to build a robust web app for your desktop as well as mobile devices.

ASP.NET applications are compiled codes written in extensible and reusable components or objects present in the .NET framework. ASP.NET are written in either of the following languages:




Visual Basic .NET

So if you know any of these programming languages, then you can create a web application using ASP.NET.

To get you started, here’s a video on how to create your first ASP.NET.

New Real-Time Data Streaming and Data Factory Services in Azure

The last three weeks has been a busy day for Azure. Two weeks ago, they have announced a partnership with Docker to enable great containeer-based development experiences on Linux, Windows Server and Microsoft Azure. Last week, Azure held a Cloud Day even and announced the new G-Series of  Virtual Machines as well as Premium Services offering.

Now, Azure announced new services that have just been released in Azure Data Space. These are:

Event Hubs

Stream Analytics

Data Factory

Azure Event Hub is now available but Azure Stream Analytic and Data Factory services are available in public preview.

Read the rest of the article here:

ASP.NET Expired Session Problem

Most ASP.NET application are using sessions, particularl y data driven application. These kinds of applications are using “Inproc” mode of session. During the development phase, the developer does not face any of the problems with session. When the application is deployed, this problem arise one by one. This post will share and highlight some thoughts about expired session problems.

This usually happens in a shared hosting solution where the session is shared between the user and the session is about to expire. Usually the session timeout is set to 20 minutes so if you have an application that is tightly couple with Session, this means that you’ll have a bigger problem with expired sessions.

Read the rest of the post here:


Sudoku Game Using VB.NET 2013

Sudoku is a poplar game before that has been the favorites of most people who prefer spending time thinking critically. Like chess or any other puzzle games, Sudoku has also paved its way to the web, newspapers and even in mobile devices like Android and iOS. If you want to build your own Sudoku game, this tutorial is for you.

A basic Sudoku  game is played on a 9×9 grid that are subdivided into 3×3 mini grids. The game starts out with some cells filled with numbers from 1 to 9. The objective of the game is to fill the blank cells and each grid should contain the same number only once.

This article also describes how the game is put together as well as the background on the design and code decisions that the author has made along the way.

Read the rest of the post here:

Top Features of ASP.NET vNext

ASP.NET vNext is the upcoming version of ASP.NET. This version has been redesigned from the ground up. It has been designed to provide users with a lean and composable .NET stack for building cloud-based apps. Expect that applications will be faster, more modular and consumes less memory. .NET vNext is the next major release of .NET Framework. This version will have a cloud-optimized mode which will have a similar clone of the Famework comared to the full .NET Framework, ASP.NET will be built on .NET vNext.


Explore the rest of the features of ASP.NET vNExt. Read the rest of the post here:

Send Data From JavaScript to C# Server Code

This post describes how to send data from a JavaScript client to a C# handler on the server. The article will guide you through the development of small ASP.NET application that enables to send a JSON Data from a HTML page to a C# server code handler.

This assumes that you are an intermediate developer with some basic knowledge in C# and ASP.NET.


First, open Visual Studio then choose C# > Web > ASP.NET application then select Empty.

If using Visual Studio 2013, it will generate an empty ASP.NET project for you.

Add a new HTML and paste the following code:

<label id="From" />How to send Data from JavaScript to C# Handler<br />
            <td><label id="From"/>From : </td>
            <td><input id="TxtFrom"></td>
            <td><label id="To"/>To : </td>
            <td><input id="TxtTo" required="required"></td>
            <td><label id="To" />Body : </td>
            <td><textarea id="TxtBody" required="required" 
            rows="10" cols="30"></textarea></td>
            <td style="align-content:flex-end">
                <button onclick="loadJsonData();">Send Data to the Server</button>

Read the rest of the code here:

JQuery Plugin for Watching CSS Styles and Attributes

Years ago, the author wrote a small JQuery plug-in that is used to monitor changes to CSS styles of a DOM element. This plug-in allows for monitoring CSS styles and attributes on an element and get notified if the monitored CSS style changed. This is useful to sync up to objects or take actions when certain conditions are true after an element update.

However, this was years ago and old APIs have now been  depreciated by some browsers. There has always been a fallback but it is proved to be inefficient.

In this post, the author updated and created a new version of the jquery-watch plug-in. He also added a few features like the ability to monitor attributes and CSS styles and moving the code to a GitHub repository along with a better documentation. This now works with newer APIs that are supported by most modern browsers.

Read the rest of the post here:

Add Checkbox Column to GridView in ASP.NET

Oftentimes, we need to give users a checkbox in the GridView which let the users select multiple rows from the GridView. We can do that in WindowsForms, but in this post, we’ll see how you can add a CheckBox column to an existing GridView control in ASP.NET.

Before you get started, you should already have a GridView with existing set of columns that are populated with data.

Here’s a definition of the Gridview of the ASPX page:

<asp:gridview ID="grdData" runat="server" AutoGenerateColumns="False" CellPadding="4" CssClass="grdData"
            ForeColor="#333333" GridLines="None" Width="200">
            <alternatingrowstyle BackColor="White" ForeColor="#284775"></alternatingrowstyle>
                <asp:boundfield DataField="ID" HeaderText="ID"></asp:boundfield>
                <asp:boundfield DataField="Name" HeaderText="Name"></asp:boundfield>
            <editrowstyle BackColor="#999999"></editrowstyle>
            <footerstyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White"></footerstyle>
            <headerstyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White"></headerstyle>
            <pagerstyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center"></pagerstyle>
            <rowstyle BackColor="#F7F6F3" ForeColor="#333333"></rowstyle>
            <selectedrowstyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333"></selectedrowstyle>
            <sortedascendingcellstyle BackColor="#E9E7E2"></sortedascendingcellstyle>
            <sortedascendingheaderstyle BackColor="#506C8C"></sortedascendingheaderstyle>
            <sorteddescendingcellstyle BackColor="#FFFDF8"></sorteddescendingcellstyle>
            <sorteddescendingheaderstyle BackColor="#6F8DAE"></sorteddescendingheaderstyle>

Read the rest of the post here: